• Stars
    star
    324
  • Rank 129,708 (Top 3 %)
  • Language
    C#
  • License
    MIT License
  • Created about 4 years ago
  • Updated 2 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Experimental full-stack application using Domain-Driven Design, Microservices, Event Sourcing, CQRS and Angular.

Build License

Welcome to Ecommerce DDD

This project is an experimental full-stack application I use to combine several cutting-edge technologies and architectural patterns. Thanks for getting here! please give a ⭐ if you liked the project. It motivates me to keep improving it.



Architecture

The overall architecture is organized with Core, Crosscutting and Services.

Core

It defines all the building blocks and abstractions to be used on every underlying project.

Core.Infrastructure

It implements infrastructure matters to be used by microservices. Also, it centralizes third-party packages.

Crosscutting

It contains projects with logic needed to cross over the microservices, such as IdentityServer4 and API gateway.


Services

The microservices composing the back-end, are built to be as simple as possible, structured with Domain, Application, API, Infrastructure.

- Domain

This is where the business logic resides, with a structured implementation of the domain through aggregates, commands, value objects, domain services, repository definitions, and domain events.

- Application

It orchestrates the interactions between the external world and the domain to perform application tasks through use cases by handling commands and queries.

- Infrastructure

It acts as a supporting library for higher layers. It handles infrastructural matters and data persistence.


Presentation

A lightweight Angular-based SPA providing a functional and user-friendly UI.


Technologies used

  • ASP.NET and C# 10 for cross-platform back-end with:
    • .NET 7
    • ASP.NET Core Minimal API
    • Ocelot 19.0.2
    • Marten 6.0.1
    • Entity Framework Core 7.0.5
    • Postgres for Entity Framework Core 7.0.4
    • ASP.NET Core Identity 7.0.5
    • ASP.NET Core Authentication JwtBearer 7.0.5
    • Duende IdentityServer 6.3.1
    • MediatR 12.0.1
    • Fluent Assertions 6.11.0
    • XUnit 2.4.2
    • Moq 4.18.4
    • Swagger 6.5.0
    • Confluent Kafka 2.1.1
    • Docker Compose
  • Angular 15 and TypeScript for the front-end with:
    • NgBootstrap / Bootstrap 5.2.3
    • Font Awesome
    • Toastr



What do you need to run it

Running the microservices using Docker

The project was designed to be easily run within docker containers, hence all you need is 1 command line to up everything. Make sure you have Docker installed and have fun!


Using a terminal, run:

 $ docker-compose up

You can also set the docker-compose.dcproj as a Startup project on Visual Studio if you want to run it while debugging.


Running the Angular SPA

Using a terminal, navigate to EcommerceDDD.Spa and run for the following commands the node packages and serving the SPA on http://localhost:4200 respectively:

 $ npm install #first time only
 $ ng serve