How mnabli94/ecommerce-microservices works
This is an event-driven e-commerce backend. A customer request enters through the API Gateway; order creation synchronously validates stock with the Product Service, while Kafka supports asynchronous consistency. Authentication and payment are distinct service capabilities in the repository. The README documents the gateway and stock-validation relationships; event-service routing and payment flow are not shown in the available evidence, so those links are omitted.
Main entry points: ApiGatewayApplication.java API Gateway · OrderService.java Order management · StockService.java Product catalog and stock · ConfigServerApplication.java Config Server
Components 15
Entry and identity
- API Gateway
api-gateway/src/main/java/com/demo/apigateway/ApiGatewayApplication.java - Authentication
auth-service/src/main/java/com/demo/auth/controller/AuthController.java - Users database
auth-service/src/main/resources/db/migration
Commerce services
- Order management
order-service/src/main/java/com/demo/order/service/OrderService.java - Orders database
order-service/src/main/resources/db/migration - Product catalog and stock
product-service/src/main/java/com/demo/product/service/StockService.java - Products database
product-service/src/main/resources/db/migration - Payment processing
payment-service/src/main/java/com/demo/payment/service/PaymentService.java
Messaging
- Event contracts
events-api/src/main/java/com/demo/events - Kafka
- Kafka utilities
kafka-utils/src/main/java/com/demo/kafka/utils/producer/EventPublisher.java
Configuration and monitoring
- Config Server
config-server/src/main/java/com/demo/config/ConfigServerApplication.java - Service configuration
config-repo - Monitoring
prometheus.yml
Other components
- API client
Connections 6
- API client → API Gateway: sends requests
README.md - API Gateway → Authentication: routes requests
README.md - API Gateway → Order management: routes requests
README.md - API Gateway → Product catalog and stock: routes requests
README.md - Order management → Product catalog and stock: checks stock
README.md - Config Server → Service configuration: loads configuration