Notification updates
This commit is contained in:
26
CLAUDE.md
26
CLAUDE.md
@@ -19,6 +19,32 @@ Maintain professional documentation standards without emoji usage.
|
||||
- **Delete** old code when replacing it
|
||||
- **Meaningful names**: `userID` not `id`
|
||||
|
||||
## Naming Conventions
|
||||
|
||||
### Case Standards
|
||||
| Layer | Convention | Example |
|
||||
|-------|------------|---------|
|
||||
| Database columns | snake_case | `user_id`, `created_at`, `is_active` |
|
||||
| Backend TypeScript types | camelCase | `userId`, `createdAt`, `isActive` |
|
||||
| API responses | camelCase | `{ "userId": "...", "createdAt": "..." }` |
|
||||
| Frontend TypeScript types | camelCase | `userId`, `createdAt`, `isActive` |
|
||||
|
||||
### Repository Pattern for Case Conversion
|
||||
All repositories MUST implement private `mapRow()` or similar mapper functions to convert database snake_case to TypeScript camelCase:
|
||||
|
||||
```typescript
|
||||
private mapRow(row: any): MyType {
|
||||
return {
|
||||
id: row.id,
|
||||
userId: row.user_id, // snake_case -> camelCase
|
||||
createdAt: row.created_at,
|
||||
isActive: row.is_active,
|
||||
};
|
||||
}
|
||||
```
|
||||
|
||||
All methods returning data to the API must use these mappers - never return raw database rows.
|
||||
|
||||
## Docker-First Implementation Strategy
|
||||
|
||||
### 1. Package.json Updates Only
|
||||
|
||||
Reference in New Issue
Block a user