How ntxinh/aspnetcore-ddd works
Project type and purpose
• This is a back-end, Domain-Driven Design (DDD) project built with ASP.NET Core Web API.
• It implements layered architecture (Presentation/API, Application, Domain, Infrastructure), CQRS, Event Sourcing, Repository/Unit-of-Work, MediatR, FluentValidation, Identity, External Providers, and migration tooling (DbUp via CLI).
File structure
• Top-level “Src/DDD.Services.Api” is the API layer (controllers, StartupExtensions, Program).
• “Src/DDD.Application” contains application services, DTO/ViewModels, MediatR handlers.
• “Src/DDD.Domain” holds core entities, commands/events, specifications, validations, and domain event handlers.
• “Src/DDD.Infra.Data” implements EF Core DbContexts (ApplicationDbContext, EventStoreSQLContext), mappings, repositories, UoW, and event store persistence.
• “Src/DDD.Infra.CrossCutting.Identity” is the identity subsystem with its own DbContext, JWT, email/SMS services.
• “Src/DDD.Infra.CrossCutting.Bus” provides the in-memory MediatR bus.
• “Src/DDD.CLI.Migration” is a console tool that runs SQL scripts (DbUp).
• “Tests” contains unit tests for application services and integration tests for the API.
• Docker, Kubernetes manifests, and CI/CD workflows sit at the repo root.
README and embedded docs
• The technical stack and patterns section confirms DDD, CQRS, Event Sourcing, UoW, Repository, Mediator, Specification, Options Pattern, AutoMapper, FluentValidation, MediatR, EF Core, Identity, Quartz, SignalR, Refit, NPOI, Polly, Swagger.
Diagramming conventions
• Blue: Presentation/API
• Green: Application
• Yellow: Domain
• Orange: Infrastructure/Cross-cutting
• Gray: External Systems/Databases
• Rectangles for services/components
• Clouds for external providers (SMTP, HTTP APIs)