The backend is split into .NET 8 services: Identity (JWT and users), Catalog (products and inventory), Orders (checkout, SignalR, admin, webhooks, internal fulfillment HTTP), Analytics (event ingest), Fulfillment Worker (MassTransit + RabbitMQ), and an optional YARP gateway. The Angular storefront lives under client/ECommerce.Web.
| Service | Port |
|---|---|
| Identity API | 5101 |
| Catalog API | 5102 |
| Orders API | 5103 |
| Analytics API | 5104 |
| YARP gateway | 8080 |
| RabbitMQ UI | 15672 |
| SQL Server | 1433 |
- .NET 8 SDK
- Docker Desktop (optional: SQL Server + RabbitMQ + multi-service compose)
- Node.js 20+ for the Angular client
Each service owns its SQL Server database. After pulling the repo, apply migrations (from repository root):
dotnet ef database update --project src/Services/ECommerce.Identity.Api --startup-project src/Services/ECommerce.Identity.Api
dotnet ef database update --project src/Services/ECommerce.Analytics.Api --startup-project src/Services/ECommerce.Analytics.Api
dotnet ef database update --project src/Services/ECommerce.Orders.Api --startup-project src/Services/ECommerce.Orders.Api
dotnet ef database update --project src/Services/ECommerce.Catalog.Api --startup-project src/Services/ECommerce.Catalog.ApiTo add new migrations after model changes:
dotnet ef migrations add <Name> --project src/Services/<Project> --startup-project src/Services/<Project>- Start SQL Server and RabbitMQ (or
docker compose up sql rabbitmqusing only those services). - Apply migrations (see above).
- Start each API and the worker in separate terminals (or your IDE), for example:
dotnet run --project src/Services/ECommerce.Identity.Api
dotnet run --project src/Services/ECommerce.Catalog.Api
dotnet run --project src/Services/ECommerce.Orders.Api
dotnet run --project src/Services/ECommerce.Analytics.Api
dotnet run --project src/Workers/ECommerce.Fulfillment.Worker
dotnet run --project src/Gateway/ECommerce.GatewayUse the same Jwt:SigningKey (32+ characters), Catalog:InternalApiKey, and Orders:InternalApiKey in Identity, Orders, Catalog, Worker, and gateway-backed clients where applicable. appsettings.json files use aligned demo keys for local development.
From the repository root:
docker compose up --buildThis builds each service from docker/Dockerfile.web (ASP.NET apps) or docker/Dockerfile.worker (worker runtime image), wires SQL and RabbitMQ, and sets in-cluster URLs (for example Catalog__BaseUrl=http://catalog:8080). The gateway listens on http://localhost:8080 and overrides YARP cluster addresses to Docker DNS names.
Apply EF migrations against the SQL container before or after first boot (the apps call MigrateAsync where migrations exist; ensure migrations have been generated and committed).
- Shopper:
POST http://localhost:8080/api/auth/demo-token(or port 5101 without gateway) - Admin:
POST http://localhost:8080/api/auth/admin-demo-token
cd client/ECommerce.Web
npm install
npm startThe dev server proxies /api and /hubs to the gateway at http://localhost:8080 (proxy.conf.json).
- Catalog inventory:
POST /internal/v1/inventory/reserve|release|commit-shipmentwith headerX-Internal-Key. - Orders fulfillment (worker):
POST /internal/v1/fulfillment/...withX-Internal-KeymatchingOrders:InternalApiKey.
- Use Azure SQL (or managed SQL) per database; store secrets in Key Vault.
- Replace RabbitMQ with Azure Service Bus (
UsingAzureServiceBusin MassTransit). - Use Azure SignalR for scale-out of WebSocket connections.
- Front traffic with TLS, WAF, and API Management; do not expose internal inventory or fulfillment routes publicly.