How senaustun-dev/springboot-microservices-ecommerce works
This is a Spring Boot e-commerce microservices practice project. A client sends product, order, or inventory requests through the API gateway; the gateway routes them to services, with Eureka-backed discovery documented for service lookup. Product and inventory requests are handled by their respective services. Order placement checks inventory synchronously, persists the order, and emits an event for asynchronous notification. The README also documents centralized security, aggregated API docs, resilience, and observability. Order-service implementation details and infrastructure wiring are partly inferred from the README and tree; their exact call paths were not sampled.
Main entry points: Routes.java Gateway Routes · OrderServiceImpl.java Order Service · InventoryController.java Inventory API · ProductController.java Product API
Components 27
API Gateway
- Gateway Routes
api-gateway/src/main/java/com/github/senaustundev/api_gateway/routes/Routes.java - Gateway Security
api-gateway/src/main/java/com/github/senaustundev/api_gateway/config/SecurityConfig.java - Fallback Handler
api-gateway/src/main/java/com/github/senaustundev/api_gateway/controller/FallbackController.java
Service Discovery
- Eureka Server
eureka-server/src/main/java/com/github/senaustundev/eureka_server/EurekaServerApplication.java
Commerce Services
- Product API
product-service/src/main/java/com/github/senaustundev/product_service/controller/ProductController.java - Product Service
product-service/src/main/java/com/github/senaustundev/product_service/service/impl/ProductSerciveImpl.java - Product Repository
product-service/src/main/java/com/github/senaustundev/product_service/repository/ProductRepository.java - Product Database
- Order API
order-service/src/main/java/com/github/senaustundev/order_service/controller/OrderController.java - Order Service
order-service/src/main/java/com/github/senaustundev/order_service/service/impl/OrderServiceImpl.java - Inventory Client
order-service/src/main/java/com/github/senaustundev/order_service/client/InventoryClient.java - Order Repository
order-service/src/main/java/com/github/senaustundev/order_service/repository/OrderRepository.java - Order Database
- Inventory API
inventory-service/src/main/java/com/github/senaustundev/inventory_service/controller/InventoryController.java - Inventory Service
inventory-service/src/main/java/com/github/senaustundev/inventory_service/service/impl/InventoryServiceImpl.java - Inventory Repository
inventory-service/src/main/java/com/github/senaustundev/inventory_service/repository/InventoryRepository.java - Inventory Database
Notifications
- Kafka
- Notification Service
notification-service/src/main/java/com/github/senaustundev/notification_service/service/impl/NotificationServiceImpl.java
Security And Observability
- Keycloak
- Observability Stack
- Gateway Telemetry
api-gateway/src/main/java/com/github/senaustundev/api_gateway/config/ObservabilityConfig.java - Product Telemetry
product-service/src/main/java/com/github/senaustundev/product_service/config/ObservabilityConfig.java - Order Telemetry
order-service/src/main/java/com/github/senaustundev/order_service/config/ObservabilityConfig.java - Inventory Telemetry
inventory-service/src/main/java/com/github/senaustundev/inventory_service/config/ObservabilityConfig.java - Notification Telemetry
notification-service/src/main/java/com/github/senaustundev/notification_service/config/ObservabilityConfig.java
Other components
- API Client
Connections 25
- API Client → Gateway Routes: sends request
- Gateway Routes → Product API: routes product
- Gateway Routes → Order API: routes order
- Gateway Routes → Inventory API: routes inventory
- Gateway Routes → Fallback Handler: forwards fallback
- Gateway Routes → Eureka Server: resolves service
- Gateway Security → Keycloak: authenticates with
- Product API → Product Service: invokes
- Product Service → Product Repository: uses repository
- Product Repository → Product Database: reads and writes
- Order API → Order Service: invokes
- Order Service → Inventory Client: checks stock
- Inventory Client → Inventory API: requests availability
- Order Service → Order Repository: saves order
- Order Repository → Order Database: reads and writes
- Order Service → Kafka: publishes event
- Kafka → Notification Service: delivers event
- Inventory API → Inventory Service: invokes
- Inventory Service → Inventory Repository: uses repository
- Inventory Repository → Inventory Database: reads stock
- Gateway Telemetry → Observability Stack: exports telemetry
- Product Telemetry → Observability Stack: exports telemetry
- Order Telemetry → Observability Stack: exports telemetry
- Inventory Telemetry → Observability Stack: exports telemetry
- Notification Telemetry → Observability Stack: exports telemetry