This project is a showcase of a full-stack application I use to combine several cutting-edge technologies and architectural patterns. It is based on Domain-Driven Design at its core for implementing a clean-architectured API that powers up an Angular-based SPA application.
Thanks for getting here! please give a ⭐ if you liked the project. It motivates me to keep improving it.

This is where the business logic resides, with a structured implementation of the domain through aggregates, entities, value objects, domain services, repository definitions, and domain events.
It defines the domain building blocks, such as entities, value objects, aggregate root, repositories, services and so on.
It orchestrates the interactions between the external world (API/SPA) and the domain. It is concerned with defining the jobs needed to be done to accomplish a certain application task. Since the project is based on CQRS/EventSourcing architecture, it defines and handles commands, queries and events.
It takes care of the application's infrastructure and issues not related to the business itself. It is responsible for database mapping (ORM), domain repository implementation, identity authentication and user claims, JWT authentication, tooling for processing and publishing messages, Inversion of Control and everything needed to support the upper layers.
- Web API: A restful API providing endpoints with secured routes based on user claims. It also implements and host a Background Service for processing and publishing stored events.
- SPA: A lightweight Angular-based application providing a functional and user-friendly UI.
-
ASP.NET Core and C# 10
for cross-platform back-end with:
- .NET 6
- Entity Framework Core 6
- ASP.NET Core Web API
- ASP.NET Core Identity
- SignalR Core
- JWT Bearer Authentication
- MediatR
- Fluent Validation
- Automapper
- NSubstitute
- Swagger
- Docker Compose
-
Angular 12 and TypeScript for the front-end with:
- NgBootstrap
- Font Awesome
- Toastr
- Angular JWT
- The latest .NET Core SDK and SQL Server for the database.
- NodeJs for the front-end.
- Optional: Docker Desktop with support for WLS 2
Set EcommerceDDD.Api
as the Startup project
and run
$ docker-compose up --build
Using a terminal, navigate to EcommerceDDD.Spa
and run for the node packages and serving the SPA on http://localhost:4200
respectively:
$ npm install
$ ng serve
- The
docker-compose.yml
is targeting the OS toLinux
and setting up the withSQL Server 2019 for Ubuntu
- When registering your first customer, it will create the database structure automatically. DataSeeder will add some products for you if the Products table is empty.