How moussasamoil/todo-list works
This is a NestJS starter extended with authentication, user management, and task endpoints. The user-facing flow is HTTP requests through controllers into services, which use repositories and token/password helpers; a global guard protects non-public routes. The app configures MongoDB through Mongoose. The README documents only the NestJS starter, so it does not establish further product behavior. Some service and repository relationships are supported by the source index rather than inspected excerpts; uncertain database persistence details are not expanded.
Main entry points: app.module.ts App composition · auth.service.ts Auth workflow · user.repo.ts User repository · auth.controller.ts Auth endpoints
Components 24
Application
- App composition
src/app.module.ts - Root controller
src/app.controller.ts - Root service
src/app.service.ts
Authentication
- Authentication guard
src/guards/authentication.guard.ts - Auth endpoints
src/modules/auth/auth.controller.ts - Auth workflow
src/modules/auth/auth.service.ts - Auth DTOs
src/modules/auth/dto/auth.dto.ts - JWT service
src/common/services/jwt.service.ts - Public route marker
src/common/decorators/public.decorator.ts
User and Tasks
- User endpoints
src/modules/user/user.controller.ts - User operations
src/modules/user/user.service.ts - Task endpoints
src/modules/tasks/tasks.controller.ts - Task operations
src/modules/tasks/tasks.service.ts - Task DTOs
src/modules/tasks/dto/tasks.dto.ts
Data and Security
- User repository
src/repositories/user.repo.ts - Task repository
src/repositories/task.repo.ts - Repository base
src/repositories/base.repo.ts - Password hashing
src/common/services/bcrypt.service.ts - User model
src/models/user.model.ts - Task model
src/models/task.model.ts - User schema
src/schema/user.schema.ts - Task schema
src/schema/task.schema.ts
Other components
- API client
- MongoDB
Connections 30
- API client → Auth endpoints: sends requests
src/modules/auth/auth.controller.ts - API client → User endpoints: requests users
src/modules/user/user.controller.ts - API client → Task endpoints: requests tasks
- Auth endpoints → Auth workflow: delegates to
src/modules/auth/auth.controller.ts - Auth workflow → Auth DTOs: accepts data
src/modules/auth/auth.service.ts - Auth workflow → User repository: looks up users
src/modules/auth/auth.service.ts - Auth workflow → Password hashing: checks passwords
src/modules/auth/auth.service.ts - Auth workflow → JWT service: generates tokens
src/modules/auth/auth.service.ts - Auth endpoints → Public route marker: marks public
src/modules/auth/auth.controller.ts - Authentication guard → JWT service: verifies tokens
src/guards/authentication.guard.ts - Authentication guard → Public route marker: checks marker
src/guards/authentication.guard.ts - User endpoints → User operations: delegates to
src/modules/user/user.controller.ts - User operations → User repository: loads users
src/modules/user/user.service.ts - Task endpoints → Task operations: delegates to
src/modules/tasks/tasks.controller.ts - Task operations → Task repository: uses repository
src/modules/tasks/tasks.service.ts - Root controller → Root service: delegates to
src/app.controller.ts - App composition → Root controller: registers
src/app.module.ts - App composition → Authentication guard: installs globally
src/app.module.ts - App composition → User repository: provides
src/app.module.ts - App composition → MongoDB: configures connection
src/app.module.ts - User repository → Repository base: extends
src/repositories/user.repo.ts - Task repository → Repository base: extends
src/repositories/task.repo.ts - User repository → User schema: uses model schema
src/repositories/user.repo.ts - Task repository → Task schema: uses schema
src/repositories/task.repo.ts - User model → User schema: configures schema
src/models/user.model.ts - Task model → Task schema: uses schema
src/models/task.model.ts - Task schema → User schema: references user
src/schema/task.schema.ts - App composition → Auth endpoints: loads auth module
src/app.module.ts - App composition → User endpoints: loads user module
src/app.module.ts - App composition → Task endpoints: loads task module
src/app.module.ts