About this project
Clean Architecture is a solution template for building ASP.NET Core applications using the loosely-coupled, dependency-inverted style also known as hexagonal, ports-and-adapters, or onion architecture. It is distributed as a dotnet CLI template (Ardalis.CleanArchitecture.Template on NuGet) and can also be used by cloning the GitHub repository.
The template ships in two variants: a full Clean Architecture template (clean-arch) and a minimal Clean Architecture template (min-clean), so teams can choose the amount of structure they want at the start. The README includes a template comparison and guidance on which one to use.
The solution is organized into separate projects: a Core project, a Use Cases project, an Infrastructure project, and a Web project, along with test projects. The README documents design decisions and dependencies for each, including where validation belongs and how the SharedKernel package fits in. It also covers patterns used, such as domain events.
By default the template uses API endpoints rather than MVC controllers or Razor Pages. The README explains how to add Ardalis.ApiEndpoints, how to add controllers, and how to add Razor Pages if a different presentation style is preferred. It also covers running database migrations and notes that the site uses HTTPS with a self-signed developer certificate for localhost, with a pointer to mitigation instructions if Chrome reports certificate errors.
The main branch targets .NET 9, corresponding to NuGet package version 10.x; previous versions are available through the project's releases. Official documentation, including getting started steps, migration guides, and architectural decisions, is published on a separate documentation site, and the README recommends reviewing migration guides when upgrading from older versions.
The README also links to related learning material, including a Clean Architecture course, a DDD fundamentals course that uses this architecture, live stream recordings, and podcast discussions. It notes that the project has received sponsorship from Amazon AWS's FOSS fund and invites users to star the repository or sponsor it.
Comments
0 Rating appears after 10 ratings
Sign in to join the discussion.