How armandwipangestu/nestjs-boilerplate works
This is a production-oriented NestJS API boilerplate. Its main request workflow is HTTP endpoints through authentication/authorization where required, into domain services and repositories, then Prisma-backed persistence; user avatar uploads additionally use configurable storage. The graph also preserves the documented caching, rate limiting, health, logging, and observability capabilities. Some modules were not excerpted, so those capability links are documented at subsystem level and are not expanded into unverified call chains.
Main entry points: main.ts Application bootstrap · prisma.service.ts Prisma database access · user.service.ts User service · auth.service.ts Authentication
Components 24
API entry
- Application bootstrap
src/main.ts - Root endpoint
src/app.controller.ts
Identity and access
- Auth endpoints
src/auth/auth.controller.ts - Authentication
src/auth/auth.service.ts - Auth repository
src/auth/auth.repository.ts - JWT and ACL
src/auth/guards/acl.guard.ts
Domain services
- Post endpoints
src/post/post.controller.ts - Post service
src/post/post.service.ts - Post repository
src/post/post.repository.ts - User endpoints
src/user/user.controller.ts - User service
src/user/user.service.ts - User repository
src/user/user.repository.ts
Data and infrastructure
- File storage
src/common/storage/storage.service.ts - Local and S3 providers
src/common/storage/strategies - Prisma database access
src/prisma/prisma.service.ts - Cache subsystem
src/common/cache - Redis integration
src/common/redis/redis.module.ts - Application configuration
src/config/app.config.ts
Operations and observability
- Structured logger
src/common/logger/logger.service.ts - Metrics and tracing
src/common/observability/metrics.service.ts - Health checks
src/common/health/health.controller.ts - Rate limiting
src/common/throttler/hybrid-throttler-storage.ts
Other components
- API client
- Telemetry and monitoring
Connections 31
- API client → Application bootstrap: sends requests
README.md - Application bootstrap → Auth endpoints: routes requests
- Application bootstrap → Post endpoints: routes requests
- Application bootstrap → User endpoints: routes requests
- API client → Root endpoint: requests root
src/app.controller.ts - Root endpoint → Application bootstrap: uses app service
- Auth endpoints → Authentication: calls
src/auth/auth.controller.ts - Authentication → Auth repository: queries
src/auth/auth.service.ts - Post endpoints → Post service: calls
src/post/post.controller.ts - Post endpoints → JWT and ACL: guards routes
src/post/post.controller.ts - Post service → Post repository: queries
src/post/post.service.ts - Post service → Cache subsystem: uses cache
src/post/post.service.ts - User endpoints → User service: calls
src/user/user.controller.ts - User endpoints → JWT and ACL: guards routes
src/user/user.controller.ts - User service → User repository: queries
src/user/user.service.ts - User service → File storage: uploads avatars
src/user/user.service.ts - User service → Cache subsystem: uses cache
src/user/user.service.ts - File storage → Local and S3 providers: selects provider
src/common/storage/storage.service.ts - Auth repository → Prisma database access: uses Prisma
src/auth/auth.repository.ts - User repository → Prisma database access: uses Prisma
src/user/user.repository.ts - Post repository → Prisma database access: uses Prisma
- Prisma database access → Metrics and tracing: records query metrics
src/prisma/prisma.service.ts - Prisma database access → Structured logger: logs query events
src/prisma/prisma.service.ts - Authentication → Structured logger: logs auth events
src/auth/auth.service.ts - Application configuration → File storage: selects backend
src/common/storage/storage.service.ts - Redis integration → Rate limiting: backs rate limits
src/common/throttler/hybrid-throttler-storage.ts - Application bootstrap → Application configuration: loads settings
- API client → Health checks: checks health
README.md - API client → Metrics and tracing: scrapes metrics
README.md - Metrics and tracing → Telemetry and monitoring: exports telemetry
README.md - Structured logger → Telemetry and monitoring: supports log correlation
README.md