How hossam7amdy/todo-server works
Main System Components
a) API Layer
• Entry point through NestJS controllers (auth, todos, user)
• Authentication middleware/guards
• REST endpoints structure
b) Service Layer
• Business logic implementation
• Core services: AuthService, TodosService, UserService, MailerService
c) Data Layer
• MongoDB integration
• Schemas: User and Todo
d) Authentication System
• JWT implementation
• Google OAuth integration
• Password reset flow
Component Relationships
a) Client-Server Communication
• HTTP/REST endpoints
• Authentication flow
• Protected routes
b) Internal Service Communication
• Auth service → User service
• Todos service → User service
• Mailer service interactions
Specific Implementation Details
Technical aspects:
a) Authentication Flow
• JWT token flow
• Google OAuth flow
• Password reset process
b) Data Flow
• Todo CRUD operations
• User management
• Email notifications
Detailed Component Breakdown
a) NestJS Modules:
• AppModule (root)
• AuthModule
• TodosModule
• UserModule
• MailerModule
b) Controllers & Services:
• Relationship between controllers and their corresponding services
• DTOs and schema models
c) External Integrations:
• MongoDB connection
• Google OAuth
• Email service