๐ EcommerceDDD
May 13, 2026 ยท View on GitHub
An experimental full-stack application showcasing cutting-edge technologies and architectural patterns for building scalable e-commerce systems.
โญ If you find this project useful, please consider giving it a star! It helps others discover the project.
๐๏ธ Architecture
High-Level Overview
Detailed Architecture
๐ Project Structure
โโโ Core # Building blocks and abstractions
โโโ Core.Infrastructure # Shared infrastructure implementations
โ
โโโ Crosscutting
โ โโโ ServiceClients # Kiota-generated HTTP clients
โ โโโ ApiGateway # Ocelot API Gateway
โ โโโ SignalR # Real-time communication
โ โโโ IdentityServer # Authentication & authorization
โ
โโโ Services
โ โโโ CustomerManagement
โ โโโ InventoryManagement
โ โโโ OrderProcessing
โ โโโ PaymentProcessing
โ โโโ ProductCatalog
โ โโโ QuoteManagement
โ โโโ ShipmentProcessing
โ
โโโ SPA # Angular frontend
โโโ docker-compose # Container orchestration
| Layer | |
|---|---|
| Core | Defines building blocks and abstractions used across all projects. Highly abstract with no implementations. |
| Core.Infrastructure | Shared infrastructure abstractions and implementations for all microservices. |
| Crosscutting | Projects that cross-cut all microservices: IdentityServer, API Gateway, and ServiceClients with Kiota-generated HTTP clients. |
| Services | Backend microservices built with a vertically sliced structure. |
| SPA | Lightweight Angular-based Single Page Application. |
Microservice Structure
Each microservice follows a clean vertical slice architecture.
โโโ EcommerceDDD.ProductCatalog
โ โโโ API # RESTful endpoints
โ โโโ Application # Use cases, commands & queries
โ โโโ Domain # Aggregates, entities, domain events
โ โโโ Infrastructure # Data persistence & external integrations
๐ Service Communication
External Communication (SPA โ Backend)
- Koalesce.OpenAPI aggregates all OpenAPI definitions exposed in the API Gateway.
- Kiota generates typed TypeScript clients from this unified spec.
- The Angular SPA communicates through the API Gateway using the clients.
Internal Communication (Service-to-Service)
Microservices communicate directly using Kiota-generated typed HTTP clients.
๐ ๏ธ Tech Stack
Backend
| Technology | Version |
|---|---|
| .NET | 10 |
| C# | 12 |
| Koalesce | 1.0.0-beta.10 |
| Ocelot | 24.1.0 |
| Marten | 8.22.1 |
| Confluent Kafka | 2.13.1 |
| Entity Framework Core | 10.0.3 |
| Npgsql (PostgreSQL) | 10.0.0 |
| Duende IdentityServer | 7.4.6 |
| Polly | 8.6.5 |
| Microsoft Kiota | 1.21.2 |
| OpenTelemetry | 1.15.0 |
| xUnit | 2.9.3 |
| NSubstitute | 5.3.0 |
| Swashbuckle.AspNetCore.SwaggerUI | 10.1.4 |
| FluentResults | 4.0.0 |
Frontend
| Technology | Version |
|---|---|
| angular | 21.1.3 |
| typescript | 5.9.3 |
| jest | 30.2.0 |
| @ng-bootstrap/ng-bootstrap | 20.0.0 |
| bootstrap | 5.3.5 |
| @fortawesome/angular-fontawesome | 4.0.0 |
| ngx-toastr | 19.0.0 |
๐ Getting Started
Running with Docker
Backend only โ starts all microservices, databases, Kafka, and infrastructure:
docker compose up
Backend + Frontend โ also builds and serves the Angular SPA at http://localhost:4200:
docker compose --profile frontend up
๐ก Tip: You can also set
docker-compose.dcprojas the startup project in Visual Studio for debugging.
Running the SPA locally (with hot-reload)
If you prefer running the frontend outside Docker for development, start the backend with docker compose up, then:
cd src/EcommerceDDD.Spa
npm install
ng serve
The app will be available at http://localhost:4200.
Advanced: Regenerating Kiota Clients
Tool services are defined in docker-compose.override.yml, which Docker Compose loads automatically alongside docker-compose.yml. After the main stack is running, use one of the commands below:
| Command | What it generates |
|---|---|
docker compose --profile tools run regenerate-clients | Both backend and frontend clients |
docker compose --profile tools run regenerate-backend-clients | Backend C# clients only (ServiceClients/Kiota/) |
docker compose --profile tools run regenerate-frontend-clients | Frontend TypeScript client only (EcommerceDDD.Spa/src/app/clients/) |
๐ง Support & Contributing
- Issues: Report bugs or request features via GitHub Issues.
- Contributing: Contributions are welcome! Please read CONTRIBUTING.md before submitting PRs.
๐ License
This project is licensed under the terms of the LICENSE file.
Made with โค๏ธ by Felipe Henrique