NestJs-Microservices-POC
Discription

image
NestJS Microservices Proof of Concept A comprehensive demonstration of NestJS microservices architecture with two core services communicating over TCP transport, featuring resilience patterns, validation, and event-driven communication. ๐Ÿ—๏ธ Architecture Overview This project demonstrates a microservices architecture with the following components: User Service (Port 4000/4001): Manages user registration and data Notification Service (Port 4002/4003): Handles notification sending and tracking API Gateway (Port 4004): Orchestrates communication between services Shared Package: Common DTOs, interfaces, and constants ๐Ÿ“ Project Structure nest-microservices-poc-2/ โ”œโ”€โ”€ packages/ โ”‚ โ””โ”€โ”€ shared/ # Shared utilities and types โ”‚ โ”œโ”€โ”€ src/ โ”‚ โ”‚ โ”œโ”€โ”€ dto/ # Data Transfer Objects โ”‚ โ”‚ โ”œโ”€โ”€ interfaces/ # TypeScript interfaces โ”‚ โ”‚ โ”œโ”€โ”€ constants/ # Message and event patterns โ”‚ โ”‚ โ””โ”€โ”€ index.ts # Public exports โ”‚ โ”œโ”€โ”€ package.json โ”‚ โ””โ”€โ”€ tsconfig.json โ”œโ”€โ”€ services/ โ”‚ โ”œโ”€โ”€ user-service/ # User Management Service โ”‚ โ”‚ โ”œโ”€โ”€ src/ โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ entities/ # TypeORM entities โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ users/ # User module โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ config/ # Database configuration โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ common/ # Filters, interceptors, retry logic โ”‚ โ”‚ โ”‚ โ”œโ”€โ”€ app.module.ts โ”‚ โ”‚ โ”‚ โ””โ”€โ”€ main.ts โ”‚ โ”‚ โ””โ”€โ”€ package.json โ”‚ โ”œโ”€โ”€ notification-service/ #…Read More

Back to Main

Subscribe for the latest news: