A production-ready microservices architecture built with NestJS, showcasing modern backend development practices.
# Start all services
npm run docker:up
# Stop services
npm run docker:down| Service | Port | Purpose |
|---|---|---|
| Auth Service | 3001 | JWT authentication & authorization |
| User Service | 3002 | User profile management |
| Order Service | 3004 | Order processing & management |
| Payment Service | 3005 | Payment processing & gateway |
- Backend: NestJS, TypeScript, Node.js
- Database: PostgreSQL with TypeORM
- Message Queue: RabbitMQ
- Cache: Redis
- Containerization: Docker & Docker Compose
- API Documentation: Swagger/OpenAPI
- ✅ Microservices Architecture - Domain-separated services with clear boundaries
- ✅ Event-Driven Communication - RabbitMQ-based async messaging
- ✅ JWT Authentication - Role-based access control (RBAC)
- ✅ Database per Service - Independent data stores
- ✅ Health Checks - Kubernetes-ready liveness/readiness probes
- ✅ API Versioning - Backward-compatible REST APIs
- ✅ Comprehensive Logging - Structured logging with correlation IDs
- ✅ Docker Ready - Multi-stage builds with development/production modes
GET /health # General health status
GET /health/ready # Kubernetes readiness probe
GET /health/live # Kubernetes liveness probe
POST /api/v1/auth/register # User registration
POST /api/v1/auth/login # User login
POST /api/v1/auth/refresh # Token refresh
GET /api/v1/orders # List orders
POST /api/v1/orders # Create order
GET /api/v1/orders/{id} # Get order details
POST /api/v1/payments # Process payment
GET /api/v1/payments/{id} # Get payment status
- Swagger UI:
http://localhost:3001/api(Auth Service) - Health Checks: Available on all service ports
- Database: PostgreSQL on port 5432
- RabbitMQ Management:
http://localhost:15672(guest/guest)
# Install dependencies
npm install
# Run in development mode
npm run start:dev
# Build for production
npm run build
# Run tests
npm run testapps/ # Microservices
├── auth-service/ # Authentication & JWT
├── user-service/ # User management
├── order-service/ # Order processing
└── payment-service/ # Payment handling
libs/ # Shared libraries
├── database/ # TypeORM entities & migrations
├── messaging/ # RabbitMQ constants & config
├── models/ # Shared DTOs & services
└── health-check/ # Pluggable health monitoring
Built with ❤️ using NestJS