How fh-fahad/nest-main-service works
Main Components
a. Application Core:
• NestJS Application Module (app.module.ts)
• Configuration Layer
• App Config (app.config.ts)
• Database Module (db.module.ts)
• PostgreSQL Module (pg.module.ts)
• RabbitMQ Module (rmq.module.ts)
b. Feature Modules:
• User Module
• Controller Layer
• Service Layer
• DTOs
• Entities
c. External Services:
• PostgreSQL Database
• RabbitMQ Message Broker
┌─────────────────────────────────────────────────────┐
• Client Requests │
• ┬───────────────────────────────────┘
• ↓
┌─────────────────────────────────────────────────────┐
• NestJS Application │
• ┌───────────────────┐ ┌────────────────────┐ │
• Configuration │ │ User Module │ │
• App Config │ │ ┌──────────────┐ │ │
• DB Config │ │ │ Controller │ │ │
• PG Config │ │ └──────┬───────┘ │ │
• RMQ Config │ │ ↓ │ │
• ┘ │ ┌──────────────┐ │ │
• Service │ │ │
• ┬───────┘ │ │
• ↓ │ │
• ┌──────────────┐ │ │
• Entities │ │ │
• ┘ │ │
• ┘ │
• ┬───────────────────────┘
• ↓
┌─────────────────────────────────────────────────────┐
• External Services Layer │
• ┌───────────────────┐ ┌────────────────────┐ │
• PostgreSQL │ │ RabbitMQ │ │
• ┘ └────────────────────┘ │
• ┘
Important Elements to Highlight
a. Dependency Flow:
• How the User module depends on the configuration modules
• Connection between controllers and services
• Database interactions through entities
b. Message Flow:
• RabbitMQ integration points if used for event-driven communication