How irenanguyen23/e-commerce-order-processing-system works
CommerceFlow is a microservices e-commerce system. Customers browse products, manage a cart, authenticate or start a guest session, and check out; the Order Service coordinates fulfillment through an orchestration saga, with inventory and payment participants replying over Kafka. Customers can then track orders and request returns, while operators manage catalog, stock, orders, and reviews. The graph also shows shared event/outbox infrastructure and the frontend’s API boundary. Saga ownership follows the README; several service implementations and their wiring are not present in the sampled source.
Main entry points: ApiGatewayApplication.java API gateway · main.tsx Web application · api-client.ts API client · orderservice Order saga
Components 23
Storefront
- Web application
frontend/src/main.tsx - Account flows
frontend/src/features/auth/pages/login-page.tsx - Catalog browsing
frontend/src/features/product/pages/product-list-page.tsx - Cart and checkout
frontend/src/features/order/pages/checkout-page.tsx - Orders and returns
frontend/src/features/order/pages/my-orders-page.tsx - Admin console
frontend/src/features/admin/pages/dashboard-page.tsx - API client
frontend/src/services/api-client.ts
Commerce services
- API gateway
gateway/spring-cloud-gateway/src/main/java/com/commerceflow/gateway/ApiGatewayApplication.java - Authentication
services/auth-service/src/main/java/com/commerceflow/authservice/service/AuthService.java - Catalog and stock
services/inventory-service/src/main/java/com/commerceflow/inventoryservice/controller/ProductController.java - Product reviews
services/inventory-service/src/main/java/com/commerceflow/inventoryservice/review/ReviewController.java - Order queries
services/order-service/src/main/java/com/commerceflow/orderservice/service/OrderQueryService.java - Order saga
services/order-service/src/main/java/com/commerceflow/orderservice - Returns processing
services/order-service/src/main/java/com/commerceflow/orderservice/returns/ReturnService.java - Inventory reservations
services/inventory-service/src/main/java/com/commerceflow/inventoryservice/service/InventoryReservationService.java - Payment processing
services/payment-service/src/main/java/com/commerceflow/paymentservice/service/PaymentService.java - Notifications
Shared platform
- Kafka
- Event contracts
common/commerceflow-common/src/main/java/com/commerceflow/common/event/DomainEvent.java - Outbox relay
common/commerceflow-common/src/main/java/com/commerceflow/common/outbox/OutboxService.java - Service databases
Other components
- Customer
- Operator
Connections 36
- Customer → Web application: uses
- Operator → Web application: uses
- Web application → Account flows: renders
- Web application → Catalog browsing: renders
- Web application → Cart and checkout: renders
- Web application → Orders and returns: renders
- Web application → Admin console: renders
- Account flows → API client: requests
- Catalog browsing → API client: requests
- Cart and checkout → API client: requests
- Orders and returns → API client: requests
- Admin console → API client: requests
- API client → API gateway: sends API calls
- API gateway → Authentication: routes requests
- API gateway → Catalog and stock: routes requests
- API gateway → Product reviews: routes requests
- API gateway → Order queries: routes requests
- API gateway → Returns processing: routes requests
- API gateway → Payment processing: routes requests
- Authentication → Service databases: persists accounts
- Catalog and stock → Service databases: persists catalog and stock
- Product reviews → Service databases: stores reviews
- Order queries → Service databases: reads order projection
- Order saga → Kafka: sends commands
- Kafka → Inventory reservations: delivers commands
- Inventory reservations → Kafka: publishes replies
- Kafka → Order saga: delivers replies
- Kafka → Payment processing: delivers commands
- Payment processing → Kafka: publishes replies
- Order saga → Order queries: updates order state
- Returns processing → Outbox relay: appends notice
- Outbox relay → Kafka: relays events
- Kafka → Notifications: delivers notices
- Order saga → Event contracts: uses contracts
- Inventory reservations → Event contracts: uses contracts
- Payment processing → Event contracts: uses contracts