How rodion-arr/nestjs-starter-kit works
Main Components
a. Client Layer:
• External API consumers
• Swagger UI (running on port 3000/api)
b. Application Layer:
• Nest.js API Server (port 3000)
• Main Modules:
• User Module (auth, JWT)
• Health Module
• Logger Module
• Cache Module
• Global Module
• DB Module
c. Infrastructure Layer:
• PostgreSQL Database
• Redis Cache
• MailHog SMTP Server (port 8025)
┌─────────────┐
• Clients │
• ┘
• ↓
┌─────────────┐
• Application │
• ┘
• ↓
┌─────────────┐
• Infrastructure│
• ┘
Specific Implementation Details
• Main NestJS Application Container showing:
• Middleware (AsyncStorage for TraceID)
• Global Interceptors (Request Logger)
• Guards (JWT Auth)
• Core Modules
b. Service interactions:
• User Authentication Flow
• Cache Management
• Email Service
• Health Check endpoints
Important Relationships to Highlight
• JWT authentication flow
• Cache interactions with Redis
• Database migrations and TypeORM connections
• Email service flow to MailHog
• Health check connections to all services
Technical Details
Annotations for:
• Environment configuration flow
• TypeORM migrations
• Cache TTL configuration
• TraceID generation and propagation
• Graceful shutdown hooks
[Client] → [Swagger UI]
• ↓
[NestJS API Server]
• [Middleware Layer (AsyncStorage, Validation)]
• [Core Modules]
• [User Module (Auth, JWT)]
• [Health Module]
• [Cache Module]
• [Logger Module]
• [Services Layer]
• [Mail Service]
• [Config Service]
• [Cache Service]
• [Data Layer]
• [TypeORM]
• [Migrations]
• ↓
[Infrastructure]
• [PostgreSQL]
• [Redis]
• [MailHog]