implement chat messaging with event proposals
- Add functional chat with server communication and test responses - Add ProposedEventCard component for confirm/reject actions - Move Constants (Day, Month) from client to shared package - Add dateHelpers utility for weekday calculations - Extend Themes.tsx with button and text colors - Update CLAUDE.md with current implementation status - Add *.tsbuildinfo to .gitignore
This commit is contained in:
42
CLAUDE.md
42
CLAUDE.md
@@ -78,7 +78,9 @@ src/
|
||||
│ ├── BaseBackground.tsx # Common screen wrapper
|
||||
│ ├── Header.tsx # Header component
|
||||
│ ├── EventCard.tsx # Event card for calendar display
|
||||
│ └── EventConfirmDialog.tsx # AI-proposed event confirmation modal
|
||||
│ ├── EventConfirmDialog.tsx # AI-proposed event confirmation modal
|
||||
│ └── ProposedEventCard.tsx # Inline event proposal with confirm/reject buttons
|
||||
├── Themes.tsx # Centralized color/theme definitions
|
||||
├── services/
|
||||
│ ├── index.ts # Re-exports all services
|
||||
│ ├── ApiClient.ts # HTTP client (get, post, put, delete)
|
||||
@@ -159,13 +161,17 @@ src/
|
||||
```
|
||||
src/
|
||||
├── index.ts
|
||||
└── models/
|
||||
├── models/
|
||||
│ ├── index.ts
|
||||
│ ├── User.ts # User, CreateUserDTO, LoginDTO, AuthResponse
|
||||
│ ├── CalendarEvent.ts # CalendarEvent, CreateEventDTO, UpdateEventDTO
|
||||
│ ├── ChatMessage.ts # ChatMessage, Conversation, SendMessageDTO, CreateMessageDTO,
|
||||
│ │ # GetMessagesOptions, ChatResponse, ConversationSummary,
|
||||
│ │ # ProposedEventChange, EventAction
|
||||
│ └── Constants.ts # DAYS, MONTHS, Day, Month, DAY_INDEX
|
||||
└── utils/
|
||||
├── index.ts
|
||||
├── User.ts # User, CreateUserDTO, LoginDTO, AuthResponse
|
||||
├── CalendarEvent.ts # CalendarEvent, CreateEventDTO, UpdateEventDTO
|
||||
└── ChatMessage.ts # ChatMessage, Conversation, SendMessageDTO, CreateMessageDTO,
|
||||
# GetMessagesOptions, ChatResponse, ConversationSummary,
|
||||
# ProposedEventChange, EventAction
|
||||
└── dateHelpers.ts # getDay() - get date for specific weekday relative to today
|
||||
```
|
||||
|
||||
**Key Types:**
|
||||
@@ -177,6 +183,8 @@ src/
|
||||
- `CreateEventDTO`: Used for creating events AND for AI-proposed events
|
||||
- `GetMessagesOptions`: Cursor-based pagination with `before?: string` and `limit?: number`
|
||||
- `ConversationSummary`: id, lastMessage?, createdAt? (for conversation list)
|
||||
- `Day`: "Monday" | "Tuesday" | ... | "Sunday"
|
||||
- `Month`: "January" | "February" | ... | "December"
|
||||
|
||||
### Database Abstraction
|
||||
|
||||
@@ -230,24 +238,30 @@ MONGODB_URI=mongodb://root:mongoose@localhost:27017/calchat?authSource=admin
|
||||
- `utils/password`: hash(), compare() using bcrypt
|
||||
- `utils/jwt`: signToken() (verifyToken() pending)
|
||||
- `dotenv` integration for environment variables
|
||||
- `ChatController`: sendMessage(), confirmEvent(), rejectEvent()
|
||||
- `ChatService`: processMessage() with test responses, confirmEvent(), rejectEvent()
|
||||
- **Stubbed (TODO):**
|
||||
- `AuthMiddleware.authenticate()`: Currently uses fake user for testing
|
||||
- `AuthController`: refresh(), logout()
|
||||
- `AuthService`: refreshToken()
|
||||
- All Chat and Event functionality
|
||||
- `ChatController`: getConversations(), getConversation()
|
||||
- `MongoChatRepository`: Database persistence for chat
|
||||
- All Event functionality
|
||||
- **Not started:**
|
||||
- `ChatController`, `ChatService`, `MongoChatRepository`
|
||||
- `EventController`, `EventService`, `MongoEventRepository`
|
||||
- `ClaudeAdapter` (AI integration)
|
||||
- `ClaudeAdapter` (AI integration - currently using test responses)
|
||||
|
||||
**Shared:** Types and DTOs defined and exported.
|
||||
**Shared:** Types, DTOs, constants (Day, Month), and date utilities defined and exported.
|
||||
|
||||
**Frontend:** Skeleton complete with file-based routing structure:
|
||||
**Frontend:**
|
||||
- Tab navigation (Chat, Calendar) implemented with basic UI
|
||||
- Calendar screen has month navigation and grid display (partially functional)
|
||||
- Chat screen has message list UI with FlashList (mock data only)
|
||||
- Chat screen functional with FlashList, message sending, and event confirm/reject
|
||||
- `ApiClient`: get(), post() implemented
|
||||
- `ChatService`: sendMessage(), confirmEvent(), rejectEvent() implemented
|
||||
- `ProposedEventCard`: Displays proposed events with confirm/reject buttons, theming support
|
||||
- `Themes.tsx`: Centralized color definitions including button colors
|
||||
- Auth screens (Login, Register), Event Detail, and Note screens exist as skeletons
|
||||
- Services (ApiClient, AuthService, EventService, ChatService) defined with `throw new Error('Not implemented')`
|
||||
- Zustand stores (AuthStore, EventsStore) defined with `throw new Error('Not implemented')`
|
||||
- Components (EventCard, EventConfirmDialog) exist as skeletons
|
||||
|
||||
|
||||
Reference in New Issue
Block a user