How elia-epita/students-app works
This is a NestJS students API: HTTP clients call student CRUD endpoints, which delegate to a service that loads and persists students and courses; the service also records recommendation events. Bootstrap configures global request handling and API reference docs, while application modules configure persistence and common request protections. The README is a generic NestJS starter description and does not document further product capabilities. Edges reflect shown calls and registrations; unsampled integrations are omitted.
Main entry points: main.ts HTTP bootstrap · app.module.ts Application module · students.module.ts Students module · students.controller.ts Students controller
Components 23
API and bootstrap
- HTTP bootstrap
src/main.ts - Application module
src/app.module.ts - Root controller
src/app.controller.ts - Greeting service
src/app.service.ts
Student domain
- Students module
src/students/students.module.ts - Students controller
src/students/students.controller.ts - Students service
src/students/students.service.ts - Create DTO
src/students/dto/create-student.dto.ts - Update DTO
src/students/dto/update-student.dto.ts - Pagination DTO
src/students/dto/pagination-query.dto.ts
Request cross-cutting
- Common module
src/common/common.module.ts - API key guard
src/common/guards/api-key.guard.ts - Public decorator
src/common/decorators/public.decorator.ts - Logging middleware
src/common/middleware/logging.middleware.ts - Exception filter
src/common/filters/http-exception.filter.ts - Response wrapper
src/common/interceptors/wrap-response.interceptor.ts - Timeout interceptor
src/common/interceptors/timeout.interceptor.ts - Integer parse pipe
src/common/pipes/parse-int.pipe.ts
Persistence
- Student entity
src/students/entites/student.entity.ts - Course entity
src/students/entites/course.entity.ts - Event entity
src/events/entities/event.entity.ts - PostgreSQL
Other components
- HTTP client
Connections 32
- HTTP client → HTTP bootstrap: sends requests
- HTTP bootstrap → Application module: creates app
src/main.ts - HTTP bootstrap → Exception filter: registers filter
src/main.ts - HTTP bootstrap → Response wrapper: registers interceptor
src/main.ts - HTTP bootstrap → Timeout interceptor: registers interceptor
src/main.ts - HTTP bootstrap → HTTP client: serves API docs
src/main.ts - Application module → Root controller: registers
src/app.module.ts - Application module → Greeting service: provides
src/app.module.ts - Application module → Students module: imports
src/app.module.ts - Application module → Common module: imports
src/app.module.ts - Application module → PostgreSQL: configures connection
src/app.module.ts - Root controller → Greeting service: calls greeting
src/app.controller.ts - Students module → Students controller: registers
src/students/students.module.ts - Students module → Students service: provides
src/students/students.module.ts - Students module → Student entity: registers entity
src/students/students.module.ts - Students module → Course entity: registers entity
src/students/students.module.ts - Students module → Event entity: registers entity
src/students/students.module.ts - Students controller → Students service: delegates requests
src/students/students.controller.ts - Students controller → Create DTO: accepts input
src/students/students.controller.ts - Students controller → Update DTO: accepts input
src/students/students.controller.ts - Students controller → Pagination DTO: accepts query
src/students/students.controller.ts - Students controller → Integer parse pipe: parses ID
src/students/students.controller.ts - Students service → Student entity: loads and saves
src/students/students.service.ts - Students service → Course entity: looks up courses
src/students/students.service.ts - Students service → Event entity: creates event
src/students/students.service.ts - Students service → PostgreSQL: persists records
src/students/students.service.ts - Student entity → Course entity: relates courses
src/students/entites/student.entity.ts - Course entity → Student entity: relates students
src/students/entites/course.entity.ts - Common module → API key guard: registers global guard
src/common/common.module.ts - Common module → Logging middleware: applies middleware
src/common/common.module.ts - API key guard → Public decorator: checks metadata
src/common/guards/api-key.guard.ts - Update DTO → Create DTO: reuses fields
src/students/dto/update-student.dto.ts