A scalable microservices-based e-commerce platform built with Node.js, Express, and Docker.
This project implements a complete e-commerce system using a microservices architecture. Each service is independently deployable, scalable, and maintainable.
The platform consists of the following services:
- API Gateway (Port 3000): Routes requests to appropriate microservices
- User Service (Port 3001): Authentication, JWT tokens, and user profile management
- Product Service (Port 3002): Product catalog, categories, and inventory management
- Cart Service (Port 3003): Shopping cart operations per user
- Order Service (Port 3004): Order creation and tracking
- Payment Service (Port 3005): Mock payment processing (Stripe/PayPal simulation)
- Notification Service (Port 3006): Mock email/SMS notifications
- Runtime: Node.js 18
- Framework: Express.js
- Language: JavaScript (ES6+)
- Authentication: JWT (JSON Web Tokens)
- Containerization: Docker & Docker Compose
- Communication: REST APIs
- Logging: Morgan
# Start all services
docker compose up --build
# Access the API Gateway
curl http://localhost:3000/healthStart each service in separate terminals:
# Install dependencies for each service
cd user-service && npm install && npm start # Port 3001
cd product-service && npm install && npm start # Port 3002
cd cart-service && npm install && npm start # Port 3003
cd order-service && npm install && npm start # Port 3004
cd payment-service && npm install && npm start # Port 3005
cd notification-service && npm install && npm start # Port 3006
cd api-gateway && npm install && npm start # Port 3000For detailed documentation, please refer to the docs branch:
- Local setup instructions
- Complete API reference
- Architecture details
- Testing guide
.
├── api-gateway/ # API Gateway service
├── user-service/ # User authentication service
├── product-service/ # Product management service
├── cart-service/ # Shopping cart service
├── order-service/ # Order management service
├── payment-service/ # Payment processing service
├── notification-service/ # Notification service
├── docker-compose.yml # Docker orchestration
└── README.md # This file
All services expose a /health endpoint:
curl http://localhost:3000/health # API Gateway
curl http://localhost:3001/health # User Service
curl http://localhost:3002/health # Product Service
curl http://localhost:3003/health # Cart Service
curl http://localhost:3004/health # Order Service
curl http://localhost:3005/health # Payment Service
curl http://localhost:3006/health # Notification Service- User registration and authentication with JWT
- Product browsing and searching
- Shopping cart management
- Order creation and tracking
- Mock payment processing
- Automated notifications
- Microservices architecture
- Docker containerization
- RESTful API design
- Health check endpoints
Each service is developed in its own feature branch:
feature/user-servicefeature/product-servicefeature/cart-servicefeature/order-servicefeature/payment-servicefeature/notification-service
Documentation is maintained in the docs branch.