How elafhakim/e_commerce_shop works
E-Commerce Shop V2 is a contract-first commerce platform: the Shop service is the sole public business gateway, with a customer storefront, staff backoffice, and four internal domain services. The principal journey runs from product discovery through basket and checkout to order status; administration, warehouse operations, audit, and simulation are separate capabilities. The README documents the service topology and frontends; sampled controller excerpts support several internal calls. Some downstream service wiring is not shown, so those integrations are marked unverified.
Main entry points: app.module.ts Shop gateway · StorefrontRoutes.tsx Storefront routes · AdminRoutes.tsx Backoffice UI · App.tsx Storefront UI
Components 21
Customer journey
- Storefront UI
frontends/storefront-ui/src/App.tsx - Storefront routes
frontends/storefront-ui/src/features/storefront/StorefrontRoutes.tsx - Product catalog
frontends/storefront-ui/src/features/catalog/CatalogPage.tsx - Basket and checkout
frontends/storefront-ui/src/features/storefront/CheckoutPage.tsx - Order status
frontends/storefront-ui/src/features/storefront/OrderPage.tsx
Public shop
- Shop gateway
shop-service/src/app.module.ts - Order API
shop-service/src/modules/orders/controllers/orders.controller.ts - Checkout service
shop-service/src/modules/orders/checkout.service.ts - Commerce persistence
shop-service/src/modules/commerce/commerce.repository.ts - Admin API
shop-service/src/modules/admin/controllers/admin.controller.ts
Domain services
- Warehouse service
warehouse-service/src/modules/stock/stock.service.ts - Reservations
warehouse-service/src/modules/reservations/reservations.service.ts - Stock bookings
warehouse-service/src/modules/bookings/bookings.service.ts - Billing service
billing-service/src/modules/charges/controllers/billing-charges.controller.ts - Payment use cases
billing-service/src/application/charge-payment.use-case.ts - Invoice service
invoice-service/src/modules/invoices/invoice.service.ts - Audit service
audit-service/src/modules/events/controllers/audit-events.controller.ts
Staff operations
- Backoffice UI
frontends/backoffice-ui/src/features/admin/AdminRoutes.tsx - Simulation controls
shop-service/src/modules/admin/simulation/controllers/simulation-runs.controller.ts
Shared infrastructure
- RabbitMQ
Other components
- Customer
Connections 20
- Customer → Storefront UI: uses
README.md - Storefront UI → Storefront routes: routes to
frontends/storefront-ui/src/App.tsx - Storefront routes → Product catalog: routes to
frontends/storefront-ui/src/features/storefront/StorefrontRoutes.tsx - Storefront routes → Basket and checkout: routes to
frontends/storefront-ui/src/features/storefront/StorefrontRoutes.tsx - Storefront routes → Order status: routes to
frontends/storefront-ui/src/features/storefront/StorefrontRoutes.tsx - Storefront UI → Shop gateway: calls API
- Shop gateway → Order API: routes orders
- Order API → Checkout service: uses
shop-service/src/modules/orders/controllers/orders.controller.ts - Order API → Commerce persistence: reads status
shop-service/src/modules/orders/controllers/orders.controller.ts - Backoffice UI → Shop gateway: calls API
- Backoffice UI → Admin API: routes admin
- Admin API → Billing service: lists payments
shop-service/src/modules/admin/controllers/admin.controller.ts - Shop gateway → Warehouse service: integrates
- Warehouse service → Reservations: delegates
warehouse-service/src/modules/integration/controllers/warehouse-integration.controller.ts - Warehouse service → Stock bookings: delegates
warehouse-service/src/modules/integration/controllers/warehouse-integration.controller.ts - Billing service → Payment use cases: executes
billing-service/src/modules/charges/controllers/billing-charges.controller.ts - Shop gateway → Invoice service: integrates
- Audit service → RabbitMQ: event transport
README.md - Shop gateway → Audit service: integrates
- Backoffice UI → Simulation controls: exposes controls
README.md