A minimal .NET clean architecture template for microservices, applying DDD-lite, CQRS-lite, and cloud-native patterns to a sample eCommerce project.
clean-architecture-dotnet is a .NET-based project template and set of libraries that implement a minimalistic version of Clean Architecture, combined with lightweight Domain-Driven Design (DDD) and Command Query Responsibility Segregation (CQRS) patterns. It is designed specifically for building microservices, providing a structured yet flexible foundation with built-in cloud-native capabilities using Dapr and Tye. The project includes a sample eCommerce application to demonstrate real-world usage.
.NET developers and architects who are building or modernizing microservices-based applications and want a pragmatic, production-ready starting point with established architectural patterns.
It reduces the initial complexity and boilerplate associated with implementing Clean Architecture, DDD, and CQRS in microservices, offering a 'just enough' approach that accelerates development while maintaining scalability and maintainability. The integration with Dapr and Tye provides ready-to-use cloud-native features out of the box.
🕸 Yet Another .NET Clean Architecture, but for Microservices project. It uses Minimal Clean Architecture with DDD-lite, CQRS-lite, and just enough Cloud-native patterns apply on the simple eCommerce sample and run on Tye with Dapr extension 🍻
Reduces repetitive code with predefined project structures and standardized CRUD interfaces, as shown in the public interfaces for Create, Read, Update, and Delete operations in the README.
Built-in support for Dapr and Tye provides ready-to-use features like service invocation, event bus, and local development orchestration, streamlining microservices setup as detailed in the technical stacks.
Implements 'just enough' Clean Architecture, DDD-lite, and CQRS-lite, making complex patterns accessible without over-engineering, as emphasized in the philosophy of reducing initial complexity.
Offers reusable building blocks for logging, validation, API versioning, and OpenTelemetry tracing, which are organized into separate libraries like N8T.Core and N8T.Infrastructure for easy integration.
Relies on .NET 6 preview, which the README warns can change frequently, potentially causing breaking changes and requiring stress testing for production use, as noted in the disclaimer.
Requires installation of multiple tools like Dapr, Tye, and specific .NET SDK versions, increasing the learning curve and setup time for new developers, as outlined in the prerequisites section.
The 'lite' implementations of DDD and CQRS may not cover advanced scenarios like complex domain modeling or event sourcing, which could necessitate custom extensions for larger projects.
Sample ASP.NET Core 8.0 reference application, now community supported: https://github.com/NimblePros/eShopOnWeb
A reference .NET application implementing an eCommerce site
Web Application ASP.NET 9 using Clean Architecture, DDD, CQRS, Event Sourcing and a lot of good practices
Northwind Traders is a sample application built using ASP.NET Core and Entity Framework Core.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.