add event CRUD actions and recurring event expansion
- Implement full CRUD in MongoEventRepository (findById, findByUserId, findByDateRange, update, delete) - Extend ChatService to handle create/update/delete actions with dynamic test responses - Add recurrenceExpander utility using rrule library for RRULE parsing - Add eventFormatters utility for German-localized week/month overviews - Add German translations for days and months in shared Constants - Update client ChatService to support all event actions (action, eventId, updates params)
This commit is contained in:
17
CLAUDE.md
17
CLAUDE.md
@@ -135,7 +135,9 @@ src/
|
||||
│ └── ClaudeAdapter.ts # Implements AIProvider
|
||||
└── utils/
|
||||
├── jwt.ts # signToken(), verifyToken()
|
||||
└── password.ts # hash(), compare()
|
||||
├── password.ts # hash(), compare()
|
||||
├── eventFormatters.ts # getWeeksOverview(), getMonthOverview() - formatted event listings
|
||||
└── recurrenceExpander.ts # expandRecurringEvents() - expand recurring events into occurrences
|
||||
```
|
||||
|
||||
**API Endpoints:**
|
||||
@@ -169,7 +171,8 @@ src/
|
||||
│ ├── ChatMessage.ts # ChatMessage, Conversation, SendMessageDTO, CreateMessageDTO,
|
||||
│ │ # GetMessagesOptions, ChatResponse, ConversationSummary,
|
||||
│ │ # ProposedEventChange, EventAction
|
||||
│ └── Constants.ts # DAYS, MONTHS, Day, Month, DAY_INDEX
|
||||
│ └── Constants.ts # DAYS, MONTHS, Day, Month, DAY_INDEX, DAY_INDEX_TO_DAY,
|
||||
│ # DAY_TO_GERMAN, DAY_TO_GERMAN_SHORT, MONTH_TO_GERMAN
|
||||
└── utils/
|
||||
├── index.ts
|
||||
└── dateHelpers.ts # getDay() - get date for specific weekday relative to today
|
||||
@@ -269,26 +272,28 @@ MONGODB_URI=mongodb://root:mongoose@localhost:27017/calchat?authSource=admin
|
||||
- `utils/jwt`: signToken() (verifyToken() pending)
|
||||
- `dotenv` integration for environment variables
|
||||
- `ChatController`: sendMessage(), confirmEvent(), rejectEvent()
|
||||
- `ChatService`: processMessage() with test responses, confirmEvent() saves events to DB, rejectEvent()
|
||||
- `ChatService`: processMessage() with test responses (create, update, delete actions), confirmEvent() handles all CRUD actions
|
||||
- `MongoEventRepository`: Full CRUD implemented (findById, findByUserId, findByDateRange, create, update, delete)
|
||||
- `utils/eventFormatters`: getWeeksOverview(), getMonthOverview() with German localization
|
||||
- `utils/recurrenceExpander`: expandRecurringEvents() using rrule library for RRULE parsing
|
||||
- **Stubbed (TODO):**
|
||||
- `AuthMiddleware.authenticate()`: Currently uses fake user for testing
|
||||
- `AuthController`: refresh(), logout()
|
||||
- `AuthService`: refreshToken()
|
||||
- `ChatController`: getConversations(), getConversation()
|
||||
- `MongoChatRepository`: Database persistence for chat
|
||||
- `MongoEventRepository`: Only create() implemented, rest stubbed
|
||||
- **Not started:**
|
||||
- `EventController`, `EventService`
|
||||
- `ClaudeAdapter` (AI integration - currently using test responses)
|
||||
|
||||
**Shared:** Types, DTOs, constants (Day, Month), and date utilities defined and exported.
|
||||
**Shared:** Types, DTOs, constants (Day, Month with German translations), and date utilities defined and exported.
|
||||
|
||||
**Frontend:**
|
||||
- Tab navigation (Chat, Calendar) implemented with basic UI
|
||||
- Calendar screen has month navigation and grid display (partially functional)
|
||||
- Chat screen functional with FlashList, message sending, and event confirm/reject
|
||||
- `ApiClient`: get(), post() implemented
|
||||
- `ChatService`: sendMessage(), confirmEvent(convId, msgId, event), rejectEvent() - confirmEvent sends CreateEventDTO in body
|
||||
- `ChatService`: sendMessage(), confirmEvent(convId, msgId, action, event?, eventId?, updates?), rejectEvent() - supports create/update/delete actions
|
||||
- `ProposedEventCard`: Displays proposed events (title, date, description, recurring indicator) with confirm/reject buttons
|
||||
- `Themes.tsx`: Centralized color definitions including button colors
|
||||
- Auth screens (Login, Register), Event Detail, and Note screens exist as skeletons
|
||||
|
||||
Reference in New Issue
Block a user