๐Ÿ›’ 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.

.NET Angular Docker License: MIT

Build GitHub Issues

โญ If you find this project useful, please consider giving it a star! It helps others discover the project.

GitHub stars


Demo 1

Demo 2

Demo 3


๐Ÿ—๏ธ Architecture

High-Level Overview

High-Level Architecture

Detailed Architecture

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
CoreDefines building blocks and abstractions used across all projects. Highly abstract with no implementations.
Core.InfrastructureShared infrastructure abstractions and implementations for all microservices.
CrosscuttingProjects that cross-cut all microservices: IdentityServer, API Gateway, and ServiceClients with Kiota-generated HTTP clients.
ServicesBackend microservices built with a vertically sliced structure.
SPALightweight 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

TechnologyVersion
.NET10
C#12
Koalesce1.0.0-beta.10
Ocelot24.1.0
Marten8.22.1
Confluent Kafka2.13.1
Entity Framework Core10.0.3
Npgsql (PostgreSQL)10.0.0
Duende IdentityServer7.4.6
Polly8.6.5
Microsoft Kiota1.21.2
OpenTelemetry1.15.0
xUnit2.9.3
NSubstitute5.3.0
Swashbuckle.AspNetCore.SwaggerUI10.1.4
FluentResults4.0.0

Frontend

TechnologyVersion
angular21.1.3
typescript5.9.3
jest30.2.0
@ng-bootstrap/ng-bootstrap20.0.0
bootstrap5.3.5
@fortawesome/angular-fontawesome4.0.0
ngx-toastr19.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.dcproj as 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:

CommandWhat it generates
docker compose --profile tools run regenerate-clientsBoth backend and frontend clients
docker compose --profile tools run regenerate-backend-clientsBackend C# clients only (ServiceClients/Kiota/)
docker compose --profile tools run regenerate-frontend-clientsFrontend 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