This is a scalable and modular eCommerce backend system built using the microservices architecture pattern. Each service is independently developed and maintained, which helps in scalability, maintainability, and fault isolation. The services communicate via REST APIs and are orchestrated using Docker and Docker Compose.
| Service | Description |
|---|---|
| Auth | Handles user authentication and JWT-based login/registration. |
| User | Manages user profiles and related data. |
| Products | Manages product listing, creation, and updates. |
| Inventorys | Tracks and manages inventory stock. |
| Cart | Handles shopping cart operations. |
| Order | Manages order placement, status, and history. |
| Sends emails for notifications, verifications, etc. | |
| API Gateway | Acts as the single entry point for routing and load balancing. |
ecommerce-microservice/
โโโ api-geteway/ # Central API gateway for routing requests
โโโ services/
โ โโโ auth/ # Authentication service
โ โโโ user/ # User service
โ โโโ products/ # Product catalog service
โ โโโ inventorys/ # Inventory service
โ โโโ cart/ # Cart management service
โ โโโ order/ # Order processing service
โ โโโ email/ # Email notification service
โโโ docker-compose.yml # Docker orchestration file
โโโ .gitignore # Git ignored files list
- Docker
- Docker Compose
- Node.js (for local service testing if needed)
- Clone the repository
git clone https://github.com/arifnextdev/ecommerce-microservice.git cd ecommerce-microservice
2. **Run using Docker Compose**
```bash
docker-compose up --build
```
3. **Access Services**
Each service will be available on its respective port (check `docker-compose.yml` for details).
---
## โ๏ธ Technologies Used
* **Node.js** & **Express.js**
* **Docker** & **Docker Compose**
* **REST APIs**
* **JWT Authentication**
* **Microservices Design Pattern**
---
## ๐ Features
* Independent deployable services
* Containerized architecture with Docker
* API Gateway routing
* Secure JWT authentication
* Scalable and fault-tolerant design
---
## ๐งช Testing
You can test individual services by accessing their API endpoints locally, or through Postman.
For example:
```
GET http://localhost:<auth_port>/api/auth/health
```
---
## ๐ฌ Contact
**Developer**: [Arif NextDev](https://github.com/arifnextdev)
๐ง **Email**: [[email protected]](mailto:[email protected])
---
## ๐ License
This project is open source and available under the [MIT License](LICENSE).
---
> ๐ง This project is under active development. Feedback and contributions are welcome!