Spring Boot: Backend framework for building microservices.
PostgreSQL: Database for persisting orders, products, and inventory.
Kafka: Message broker for asynchronous communication.
Redis: Caching layer to improve performance.
Spring Security & OAuth2: Authentication and authorization.
Spring Cloud Gateway: API gateway with security and routing.
Eureka Server: Service discovery.
Prometheus & Zipkin: Monitoring and distributed tracing.
Docker: Containerization for deployment.
Order Processing System is a microservices-based application designed to handle order management efficiently. It utilizes modern programming technologies such as Spring Boot, Kafka, Redis, OAuth2, and Eureka for service discovery.
Spring Boot: Backend framework for building microservices.
PostgreSQL: Database for persisting orders, products, and inventory.
Kafka: Message broker for asynchronous communication.
Redis: Caching layer to improve performance.
Spring Security & OAuth2: Authentication and authorization.
Spring Cloud Gateway: API gateway with security and routing.
Eureka Server: Service discovery.
Prometheus & Zipkin: Monitoring and distributed tracing.
Docker: Containerization for deployment.
-
Order Service: Manages order creation and status.
-
Inventory Service: Handles stock management.
-
Product Service: Stores product details.
-
Notification Service: Sends order-related notifications.
-
API Gateway: Routes requests and enforces security.
-
Discovery Server: Manages service discovery.
Docker & Docker Compose
Java 17+
Node.js (for frontend, if applicable)
PostgreSQL & Redis
Kafka & Zookeeper
| Step | Command |
|---|---|
| 🛠 Clone the repository and navigate to the project | git clone https://github.comTaun0813ProjectAPI cd ProjectAPI |
| 🚀 Start required services | docker-compose up -d |
| cd order-service mvn spring-boot:run |
POST /v1/api/product{
"name": "iPhone 13",
"description": "iPhone 13",
"price": 1200
}
HTTP Status 201 (Created)
GET /v1/api/product[
{
"id": "12345",
"name": "iPhone 13",
"description": "iPhone 13",
"price": 1200
}
]
GET /v1/api/inventory?skuCode={}Query parameters: skuCode.
[
{
"skuCode": "iphone_13",
"quantity": 100,
"isInStock": true
}
]
POST /v1/api/order{
"skuCode": "iphone_13",
"price": 1200,
"quantity": 1
}
Uses OAuth2 with JWT for authentication.
API Gateway allows /eureka/** without authentication.
All other requests require a valid OAuth2 token.
Prometheus for metrics.
Zipkin for distributed tracing.
1. Fork the repository.
2. Create a feature branch.
3. Submit a pull request.