How kuopacode/clean-architecture-template-with-dotnetcore works
Project type and purpose
• This is a backend microservice (Product Service) built with .NET Core 7, following “Clean Architecture” and Domain-Driven Design (DDD) principles.
• It exposes a REST API for managing product aggregates, implements CQRS (separate Commands/Queries via MediatR), and plans to publish domain events to Kafka.
File structure
• Top-level folders:
• sql – DDL scripts for MySQL schema/table creation
• src/Product.Api – Presentation & Application layers (Controllers, Commands, Queries, DTOs, Handlers, MediatR pipeline)
• src/Product.Domain – Domain layer (Aggregate roots, Entities, Value Objects, Repositories interfaces, Domain events)
• src/Product.Infrastructure – Infrastructure layer (EF Core/Dapper configs, Repository and UnitOfWork implementations, data context)
• src/Product.Test – Unit test project (currently minimal)
• Supporting files: Solution file, .gitignore, README.md, launchSettings, appsettings.json.
README for additional insights
• Emphasizes DDD, CQRS, and future event-driven capabilities with Kafka.
• MySQL is the primary datastore; connection string in appsettings.Development.json.
• Kafka integration, logging (NLog), and tests are on the TODO list.
Diagramming recommendations
• Blue: API/Controllers
• Green: Application/CQRS
• Orange: Domain
• Gray: Infrastructure
• Purple: External (MySQL, Kafka)