How enescelebii/microservice-e-commerce-app works
This is a Spring Boot e-commerce microservices system. A client enters through the secured API Gateway; order creation coordinates customer lookup, product purchase, payment, order-line persistence, and an order-confirmation event. Payment processing also emits a payment event; notifications consume events, send email, and retain history. The graph includes catalog, customer, order, payment, and platform capabilities documented in the README. Some wiring is documented rather than shown in sampled code, so those links cite the README; unsampled implementation details are not inferred.
Main entry points: GatewayApplication.java API Gateway · OrderService.java Order lifecycle · PaymentService.java Payment processing · NotificationConsumer.java Notification consumer
Components 27
API access
- API Gateway
services/gateway/src/main/java/com/vena/gateway/GatewayApplication.java - Gateway security
services/gateway/src/main/java/com/vena/gateway/security/SecurityConfig.java - Keycloak
Commerce domains
- Customer API
services/customer/src/main/java/com/vena/ecommerce/controller/CustomerController.java - Customer management
services/customer/src/main/java/com/vena/ecommerce/service/CustomerService.java - Product API
services/product/src/main/java/com/vena/ecommerce/product/controller/ProductController.java - Catalog and stock
services/product/src/main/java/com/vena/ecommerce/product/service/ProductService.java - Order API
services/order/src/main/java/com/vena/order/order/OrderController.java - Order lifecycle
services/order/src/main/java/com/vena/order/order/OrderService.java - Order lines
services/order/src/main/java/com/vena/order/orderLine/OrderLineService.java - Payment API
services/payment/src/main/java/com/vena/payment/payment/PaymentController.java - Payment processing
services/payment/src/main/java/com/vena/payment/payment/PaymentService.java
Events and notifications
- Kafka event bus
- Order event producer
services/order/src/main/java/com/vena/order/kafka/OrderProducer.java - Payment event producer
services/payment/src/main/java/com/vena/payment/notification/NotificationProducer.java - Notification consumer
services/notification/src/main/java/com/vena/notification/kafka/NotificationConsumer.java - Email delivery
services/notification/src/main/java/com/vena/notification/email/EmailService.java - SMTP service
Platform services
- Service discovery
services/discovery/src/main/java/com/vena/discovery/DiscoveryApplication.java - Configuration server
services/config-server/src/main/java/com/vena/config_server/ConfigServerApplication.java - Distributed tracing
Persistence
- Customer MongoDB
- Product PostgreSQL
- Order PostgreSQL
- Payment PostgreSQL
- Notification MongoDB
Other components
- API client
Connections 30
- API client → API Gateway: sends requests
- API Gateway → Gateway security: enforces access
- Gateway security → Keycloak: authenticates with
- API Gateway → Customer API: routes requests
- API Gateway → Product API: routes requests
- API Gateway → Order API: routes requests
- API Gateway → Payment API: routes requests
- Customer API → Customer management: delegates to
services/customer/src/main/java/com/vena/ecommerce/controller/CustomerController.java - Customer management → Customer MongoDB: reads and writes
- Product API → Catalog and stock: delegates to
services/product/src/main/java/com/vena/ecommerce/product/controller/ProductController.java - Catalog and stock → Product PostgreSQL: reads and updates stock
services/product/src/main/java/com/vena/ecommerce/product/service/ProductService.java - Order API → Order lifecycle: delegates to
services/order/src/main/java/com/vena/order/order/OrderController.java - Order lifecycle → Customer API: looks up customer
services/order/src/main/java/com/vena/order/order/OrderService.java - Order lifecycle → Product API: purchases products
services/order/src/main/java/com/vena/order/order/OrderService.java - Order lifecycle → Order lines: saves order lines
services/order/src/main/java/com/vena/order/order/OrderService.java - Order lifecycle → Payment API: requests payment
services/order/src/main/java/com/vena/order/order/OrderService.java - Order lifecycle → Order PostgreSQL: persists orders
- Order lifecycle → Order event producer: publishes confirmation
services/order/src/main/java/com/vena/order/order/OrderService.java - Order event producer → Kafka event bus: sends event
- Payment API → Payment processing: delegates to
services/payment/src/main/java/com/vena/payment/payment/PaymentController.java - Payment processing → Payment PostgreSQL: persists payment
services/payment/src/main/java/com/vena/payment/payment/PaymentService.java - Payment processing → Payment event producer: requests notification
services/payment/src/main/java/com/vena/payment/payment/PaymentService.java - Payment event producer → Kafka event bus: sends event
- Kafka event bus → Notification consumer: dispatches events
- Notification consumer → Email delivery: sends email
services/notification/src/main/java/com/vena/notification/kafka/NotificationConsumer.java - Notification consumer → Notification MongoDB: records history
- Email delivery → SMTP service: delivers mail
services/notification/src/main/java/com/vena/notification/email/EmailService.java - Service discovery → API Gateway: supports routing
- Configuration server → API Gateway: provides configuration
- Distributed tracing → API Gateway: traces requests