implement backend skeleton with MongoDB and Claude AI integration

- Add controllers (Auth, Chat, Event) with placeholder implementations
- Add services (Auth, Chat, Event) with business logic interfaces
- Add repositories with MongoDB/Mongoose models (User, Event, Chat)
- Add middleware for JWT authentication
- Add Claude AI adapter implementing AIProvider interface
- Add utility modules for JWT and password handling
- Add shared types and DTOs for User, CalendarEvent, ChatMessage
- Configure routes with proper endpoint structure
- Update app.ts with dependency injection setup
- Add required dependencies: mongoose, bcrypt, jsonwebtoken, @anthropic-ai/sdk
This commit is contained in:
2026-01-02 20:09:42 +01:00
parent 5af6cffa9c
commit 5cc1ce7f1c
47 changed files with 1397 additions and 13 deletions

View File

@@ -0,0 +1,17 @@
import { Router } from 'express';
import { ChatController } from '../controllers';
import { authenticate } from '../middleware';
export function createChatRoutes(chatController: ChatController): Router {
const router = Router();
router.use(authenticate);
router.post('/message', (req, res) => chatController.sendMessage(req, res));
router.post('/confirm/:conversationId/:messageId', (req, res) => chatController.confirmEvent(req, res));
router.post('/reject/:conversationId/:messageId', (req, res) => chatController.rejectEvent(req, res));
router.get('/conversations', (req, res) => chatController.getConversations(req, res));
router.get('/conversations/:id', (req, res) => chatController.getConversation(req, res));
return router;
}