implement auth login and register with MongoDB
- Add AuthController login/register endpoints with error handling - Implement AuthService with password validation and user creation - Add MongoUserRepository with findByEmail and create methods - Implement password hashing with bcrypt - Add dotenv for environment variable support - Add Docker Compose setup for MongoDB + Mongo Express - Stub AuthMiddleware with fake user for testing - Update CLAUDE.md with implementation status
This commit is contained in:
54
docs/api-routes.md
Normal file
54
docs/api-routes.md
Normal file
@@ -0,0 +1,54 @@
|
||||
# CalChat API Routes
|
||||
|
||||
Base URL: `/api`
|
||||
|
||||
## Authentication
|
||||
|
||||
### Auth Endpoints (`/api/auth`)
|
||||
Öffentliche Endpoints - keine Authentifizierung erforderlich.
|
||||
|
||||
| Method | Endpoint | Beschreibung |
|
||||
|--------|----------|--------------|
|
||||
| POST | `/auth/login` | User Login |
|
||||
| POST | `/auth/register` | User Registrierung |
|
||||
| POST | `/auth/refresh` | JWT Token erneuern |
|
||||
| POST | `/auth/logout` | User Logout |
|
||||
|
||||
---
|
||||
|
||||
## Events
|
||||
|
||||
### Event Endpoints (`/api/events`)
|
||||
Alle Endpoints erfordern JWT-Authentifizierung.
|
||||
|
||||
| Method | Endpoint | Beschreibung |
|
||||
|--------|----------|--------------|
|
||||
| GET | `/events` | Alle Events des Users abrufen |
|
||||
| GET | `/events/range` | Events nach Zeitraum filtern |
|
||||
| GET | `/events/:id` | Einzelnes Event abrufen |
|
||||
| POST | `/events` | Neues Event erstellen |
|
||||
| PUT | `/events/:id` | Event aktualisieren |
|
||||
| DELETE | `/events/:id` | Event löschen |
|
||||
|
||||
---
|
||||
|
||||
## Chat
|
||||
|
||||
### Chat Endpoints (`/api/chat`)
|
||||
Alle Endpoints erfordern JWT-Authentifizierung.
|
||||
|
||||
| Method | Endpoint | Beschreibung |
|
||||
|--------|----------|--------------|
|
||||
| POST | `/chat/message` | Nachricht an AI senden |
|
||||
| POST | `/chat/confirm/:conversationId/:messageId` | Vorgeschlagenes Event bestätigen |
|
||||
| POST | `/chat/reject/:conversationId/:messageId` | Vorgeschlagenes Event ablehnen |
|
||||
| GET | `/chat/conversations` | Alle Konversationen abrufen |
|
||||
| GET | `/chat/conversations/:id` | Nachrichten einer Konversation (mit Pagination) |
|
||||
|
||||
---
|
||||
|
||||
## Health
|
||||
|
||||
| Method | Endpoint | Beschreibung |
|
||||
|--------|----------|--------------|
|
||||
| GET | `/health` | Health Check |
|
||||
Reference in New Issue
Block a user