Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🛒 E-Commerce Microservices Platform

Java Spring Boot Spring Cloud Docker Maven

A fully distributed e-commerce backend built with a microservices architecture using Spring Boot, Spring Cloud (Eureka + API Gateway), and Docker Compose.


📐 Architecture Overview

                        ┌──────────────────────────────────────────┐
                        │              Docker Compose               │
                        │                                          │
  Client ──REST──►      │  ┌─────────────────┐                    │
                        │  │   API Gateway   │◄── Entry point      │
                        │  └────────┬────────┘                    │
                        │           │ routes requests              │
                        │  ┌────────▼────────┐                    │
                        │  │  Eureka Server  │  Service Discovery  │
                        │  └────────┬────────┘                    │
                        │           │ registers & discovers        │
                        │  ┌────────┴──────────────────────┐      │
                        │  │                               │      │
                        │  ▼           ▼           ▼       ▼      │
                        │ ┌──────┐ ┌──────┐ ┌─────────┐ ┌──────┐ │
                        │ │Orders│ │Paymt.│ │Products │ │Secur.│ │
                        │ │:8082 │ │:8083 │ │  :8084  │ │:8085 │ │
                        │ └──────┘ └──────┘ └─────────┘ └──────┘ │
                        └──────────────────────────────────────────┘

🧩 Services

🌐 API Gateway — localhost:8080

Single entry point for all client requests. Routes traffic to the appropriate microservice and handles cross-cutting concerns.

🔍 Eureka Server — localhost:8761

Service registry that allows microservices to discover and communicate with each other dynamically.

📦 Products Service — localhost:8084

Manages the product catalog: creation, updates, queries, and inventory tracking.

🧾 Orders Service — localhost:8082

Handles order creation, status tracking, and coordination with the payment and products services.

💳 Payment Service — localhost:8083

Processes payment transactions associated with orders.

🔐 Security Service — localhost:8085

Manages authentication and authorization across the platform.


🚀 Getting Started

Prerequisites

  • Java 21+
  • Maven 3.9+
  • Docker & Docker Compose

Build all services

mvn clean package -DskipTests

Run with Docker

docker-compose up --build

Service URLs

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

📬 Postman Collection

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.


🛠️ Tech Stack

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

👨‍💻 Author

Antony Chávez — Backend Developer LinkedIn GitHub

About

E-commerce backend built with microservices, Spring Cloud Eureka, API Gateway and Docker

Topics

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages