How amart302/nest-template works
This NestJS template provides a small HTTP API foundation. Its demonstrated request path is a client calling the health endpoint, whose controller delegates to a service; global HTTP handling formats successful and exceptional responses. Startup configures validation, CORS, Swagger, and environment checks, while a global Prisma service connects to PostgreSQL. The README documents the database and template capabilities; unsampled modules are represented only where the tree or documentation supports them.
Main entry points: app.module.ts Root module · main.ts HTTP bootstrap · app.controller.ts Health endpoint · app.service.ts Health service
Components 14
Application runtime
- HTTP bootstrap
src/main.ts - Root module
src/app.module.ts - Environment checks
src/common/config/env.validation.ts
HTTP capabilities
- Health endpoint
src/app.controller.ts - Health service
src/app.service.ts - Response types
src/common/types/service-response.types.ts - Success formatting
src/common/interceptors/response.interceptor.ts - Error formatting
src/common/filters/all-exceptions.filter.ts - Swagger setup
src/common/config/swagger.config.ts
Platform integrations
- Static uploads
src/app.module.ts - Prisma module
src/prisma/prisma.module.ts - Prisma service
src/prisma/prisma.service.ts - PostgreSQL
Other components
- API client
Connections 14
- API client → Health endpoint: requests health
src/app.controller.ts - HTTP bootstrap → Root module: creates app
src/main.ts - Root module → Environment checks: validates settings
src/app.module.ts - Root module → Health endpoint: registers controller
src/app.module.ts - Health endpoint → Health service: delegates health
src/app.controller.ts - Health endpoint → Response types: returns typed response
src/app.controller.ts - Health service → Response types: returns typed response
src/app.service.ts - HTTP bootstrap → Success formatting: installs globally
src/main.ts - HTTP bootstrap → Error formatting: installs globally
src/main.ts - HTTP bootstrap → Swagger setup: configures docs
src/main.ts - Root module → Static uploads: serves uploads
src/app.module.ts - Root module → Prisma module: imports module
src/app.module.ts - Prisma module → Prisma service: provides service
src/prisma/prisma.module.ts - Prisma service → PostgreSQL: connects to
src/prisma/prisma.service.ts