How aliyavarguluzada/ecommerce works
This is a multi-service commerce application with a storefront/admin workspace and authenticated APIs. The main customer workflow is storefront access, catalog browsing, cart management, checkout into an order, inventory reservation, and payment; order and payment recovery support unfinished workflows. The README documents the service map, while excerpts and the source index confirm several controller-to-service and service-to-domain interactions. Some cross-service links and persistence details are documented rather than verified from sampled callers.
Main entry points: Program.cs API gateway · OrderService.cs Order coordination · CartService.cs Cart and checkout · PaymentService.cs Payment processing
Components 30
Storefront and identity
- API gateway
src/ECommerce.ApiGateway/Program.cs - Storefront workspace
src/ECommerce.ApiGateway/wwwroot/shop/app.js - Identity API
src/ECommerce.Identity.Api/Controllers/IdentityController.cs - Identity service
src/ECommerce.Identity.Infrastructure/IdentityService.cs - Identity database
src/ECommerce.Identity.Infrastructure/IdentityDbContext.cs - Token security
src/ECommerce.Security/SecurityExtensions.cs
Catalog management
- Product API
src/ECommerce.Catalog.Api/Products/ProductController.cs - Category API
src/ECommerce.Catalog.Api/Categories/CategoryController.cs - Catalog handlers
src/ECommerce.Catalog.Application - Product and category rules
src/ECommerce.Catalog.Domain/Aggregates/Products/Product.cs - Catalog persistence
src/ECommerce.Catalog.Infrastructure/Persistence/CatalogDbContext.cs
Cart and orders
- Cart API
src/ECommerce.Cart.Api/Controllers/CartController.cs - Cart and checkout
src/ECommerce.Cart.Application/CartService.cs - Shopping cart state
src/ECommerce.Cart.Domain/ShoppingCart.cs - Cart database
src/ECommerce.Cart.Infrastructure/CartDbContext.cs - Order API
src/ECommerce.Order.Api/Controllers/OrdersController.cs - Order coordination
src/ECommerce.Order.Application/OrderService.cs - Order lifecycle
src/ECommerce.Order.Domain/PurchaseOrder.cs - Order database
src/ECommerce.Order.Infrastructure/OrderDbContext.cs - Order recovery
src/ECommerce.Order.Api/Common/OrderRecoveryWorker.cs
Inventory
- Inventory API
src/ECommerce.Inventory.Api/Controllers/ReservationsController.cs - Stock and reservations
src/ECommerce.Inventory.Application/InventoryService.cs - Inventory database
src/ECommerce.Inventory.Infrastructure/InventoryDbContext.cs
Payments
- Payment API
src/ECommerce.Payment.Api/Controllers/PaymentsController.cs - Payment processing
src/ECommerce.Payment.Application/PaymentService.cs - Payment database
src/ECommerce.Payment.Infrastructure/PaymentDbContext.cs - Development payment provider
src/ECommerce.Payment.Infrastructure/DevelopmentPaymentProvider.cs - Payment recovery
src/ECommerce.Payment.Api/Common/PaymentRecoveryWorker.cs
Other components
- Customer
- Administrator
Connections 38
- Customer → Storefront workspace: uses
README.md - Administrator → Storefront workspace: manages through
README.md - Storefront workspace → API gateway: accesses
- Customer → API gateway: requests APIs
README.md - Administrator → API gateway: requests APIs
README.md - API gateway → Identity API: routes requests
README.md - API gateway → Product API: routes requests
README.md - API gateway → Category API: routes requests
README.md - API gateway → Cart API: routes requests
README.md - API gateway → Order API: routes requests
README.md - API gateway → Inventory API: routes requests
README.md - API gateway → Payment API: routes requests
README.md - Identity API → Identity service: delegates identity
README.md - Identity service → Identity database: reads and writes
README.md - Token security → Identity API: secures endpoints
README.md - Product API → Catalog handlers: dispatches requests
src/ECommerce.Catalog.Api/Products/ProductController.cs - Category API → Catalog handlers: dispatches requests
src/ECommerce.Catalog.Api/Categories/CategoryController.cs - Catalog handlers → Product and category rules: applies rules
src/ECommerce.Catalog.Application/Products/Commands/CreateProduct/CreateProductHandler.cs - Catalog handlers → Catalog persistence: persists catalog
- Cart API → Cart and checkout: calls service
src/ECommerce.Cart.Api/Controllers/CartController.cs - Cart and checkout → Shopping cart state: updates cart state
src/ECommerce.Cart.Application/CartService.cs - Cart and checkout → Cart database: stores cart state
- Cart and checkout → Product API: checks products
- Cart and checkout → Order API: creates orders
src/ECommerce.Order.Api/Controllers/OrdersController.cs - Order API → Order coordination: calls service
src/ECommerce.Order.Api/Controllers/OrdersController.cs - Order coordination → Order lifecycle: advances lifecycle
src/ECommerce.Order.Application/OrderService.cs - Order coordination → Order database: stores order state
- Order coordination → Product API: gets product data
- Order coordination → Inventory API: reserves stock
- Order coordination → Payment API: requests refunds
src/ECommerce.Payment.Api/Controllers/PaymentsController.cs - Order recovery → Order coordination: retries workflows
README.md - Inventory API → Stock and reservations: calls service
- Stock and reservations → Inventory database: stores stock state
- Payment API → Payment processing: calls service
src/ECommerce.Payment.Api/Controllers/PaymentsController.cs - Payment processing → Payment database: stores payment state
- Payment processing → Development payment provider: processes charges
- Payment processing → Order API: confirms payment
src/ECommerce.Order.Api/Controllers/OrdersController.cs - Payment recovery → Payment processing: recovers payments
src/ECommerce.Payment.Api/Common/PaymentRecoveryWorker.cs