Skip to content

falberthen/EcommerceDDD

Repository files navigation

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

High-Level System Architecture

Detailed Architecture

├── Core ├── Core.Infrastructure │ ├── Crosscutting │ ├── ServiceClients │   ├── ApiGateway │   ├── SignalR │   └── IdentityServer │ ├── Services │   ├── CustomerManagement │   ├── InventoryManagement │   ├── OrderProcessing │   ├── PaymentProcessing │   ├── ProductCatalog | | └─ EcommerceDDD.ProductCatalog │   │ ├── API │   │ ├── Application │   │ ├── Domain │   │ └── Infrastructure │   ├── QuoteManagement │   └── ShipmentProcessing │ ├── SPA └── docker-compose 
  • Core
    It defines the building blocks and abstractions used on all underlying projects. Its nature is very abstract, with no implementations.

  • Core.Infrastructure
    It holds some abstractions and implementation for infrastructure to be used by all microservices and underlying dependencies.

  • Crosscutting
    It contains project implementations that cross-cut all microservices, such as IdentityServer and API gateway.

  • Services
    The microservices composing the backend are built to be as simple as possible, structured as a vertically sliced structure with API, Application, Domain, and Infrastructure.

     ├── EcommerceDDD.ProductCatalog │   ├── API │   ├── Application │   ├── Domain │   └── Infrastructure 
    • API
      RESTful API for enabling communication between client and server.

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

    • Domain
      A structured implementation of the domain through aggregates, commands, value objects, domain services, repository definitions, and domain events.

    • Infrastructure
      It is a supporting library for upper layers, handling infrastructural matters such as data persistence with implementing repositories, database mapping, and external integrations.

    • SPA (Single Page Application)
      A lightweight Angular-based SPA providing a functional and user-friendly UI.


Technologies used

  • ASP.NET Core API and C# 12 for cross-platform backend with:
    • .NET 8
    • Koalesce.OpenAPI 0.1.1-alpha.2
    • Ocelot 23.4.3
    • Marten 7.40.0
    • Confluent Kafka 2.10.0
    • Entity Framework Core 8.0.15
    • Npgsql.EntityFrameworkCore.PostgreSQL 8.0.11
    • ASP.NET Core Identity 8.0.15
    • ASP.NET Core Authentication JwtBearer 8.0.15
    • Duende IdentityServer 7.2.1
    • Polly 8.5.2
    • XUnit 2.9.3
    • NSubstitute 5.3.0
    • SwaggerGen/SwaggerUI 8.1.1
    • Microsoft.Kiota.* 1.17.2
  • Angular v19.2.7 and TypeScript 5.5.4 for the frontend with:
    • Kiota 1.0.2
    • Jest 29.7.0
    • NgBootstrap 18.0.0/ Bootstrap 5.3.5
    • Font Awesome 6.7.2
    • Toastr 19.0.0

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  $ ng serve

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 4

  •  
  •  
  •  
  •