A fully distributed e-commerce backend built with a microservices architecture using Spring Boot, Spring Cloud (Eureka + API Gateway), and Docker Compose.
┌──────────────────────────────────────────┐
│ Docker Compose │
│ │
Client ──REST──► │ ┌─────────────────┐ │
│ │ API Gateway │◄── Entry point │
│ └────────┬────────┘ │
│ │ routes requests │
│ ┌────────▼────────┐ │
│ │ Eureka Server │ Service Discovery │
│ └────────┬────────┘ │
│ │ registers & discovers │
│ ┌────────┴──────────────────────┐ │
│ │ │ │
│ ▼ ▼ ▼ ▼ │
│ ┌──────┐ ┌──────┐ ┌─────────┐ ┌──────┐ │
│ │Orders│ │Paymt.│ │Products │ │Secur.│ │
│ │:8082 │ │:8083 │ │ :8084 │ │:8085 │ │
│ └──────┘ └──────┘ └─────────┘ └──────┘ │
└──────────────────────────────────────────┘
Single entry point for all client requests. Routes traffic to the appropriate microservice and handles cross-cutting concerns.
Service registry that allows microservices to discover and communicate with each other dynamically.
Manages the product catalog: creation, updates, queries, and inventory tracking.
Handles order creation, status tracking, and coordination with the payment and products services.
Processes payment transactions associated with orders.
Manages authentication and authorization across the platform.
- Java 21+
- Maven 3.9+
- Docker & Docker Compose
mvn clean package -DskipTestsdocker-compose up --build| Service | URL |
|---|---|
| API Gateway | http://localhost:8080 |
| Eureka Dashboard | http://localhost:8761 |
| Orders Service | http://localhost:8082 |
| Payment Service | http://localhost:8083 |
| Products Service | http://localhost:8084 |
| Security Service | http://localhost:8085 |
A ready-to-use Postman collection is included in the root of the project:
collection.json
Import it directly into Postman to test all available endpoints across every service.
| Layer | Technology |
|---|---|
| Language | Java |
| Framework | Spring Boot |
| Service Discovery | Spring Cloud Netflix Eureka |
| API Routing | Spring Cloud Gateway |
| Containerization | Docker · Docker Compose |
| Build Tool | Maven |