This project demonstrates a simple microservices architecture using NestJS for a Zomato-style system with an API Gateway, a Restaurant Service, and a Menu Service. Built using Domain-Driven Design principles and MongoDB as the database.
- Acts as a single entry point for all external requests.
- Explicitly routes requests to either
restaurant-serviceormenu-service. - Handles all communication via
HttpService. - Includes correlation ID support and Winston logger for traceable logs.
- Manages restaurant-related operations.
- Exposes endpoints:
GET /restaurantsPOST /restaurants
- Manages menu items linked to restaurants.
- Exposes endpoints:
GET /menusPOST /menus
git clone https://github.com/simerdev/api-gatway-example.git
cd zomato-microservicescd api-gateway && npm install
cd ../restaurant-service && npm install
cd ../menu-service && npm installcd restaurant-service && npm run start:dev
cd ../menu-service && npm run start:dev
cd ../api-gateway && npm run start:devTechnolgies Used
NestJS MongoDB (via Mongoose) Winston Logger Axios (HttpService) Domain-Driven Design (DDD)