A documentation tool for software architecture that catalogs domains, services, events, messages and schemas for teams and AI agents.
ardalis/CleanArchitecture
A Clean Architecture solution template for ASP.NET Core with separate Core, Use Cases, Infrastructure and Web projects.
- Stars
- 18,527
- Forks
- 3,142
- Open issues
- 45
- Last commit
- last month
What is it?
This project is a starting-point solution template for building ASP.NET Core applications with Clean Architecture, the dependency-inverted style also known as hexagonal or onion architecture. It is distributed as a dotnet CLI template, with a full variant (clean-arch) and a minimal variant (min-clean), so developers can generate a new solution without wiring the layers by hand.
The solution is split into Core (domain entities, domain events and interfaces), a Use Cases layer for application logic, an Infrastructure project for data access and external services, and a Web project for the HTTP surface. Test projects are included, and the template targets .NET 9 on the main branch, with Ardalis.ApiEndpoints, controllers or Razor Pages available as options for the web layer.
The repository is maintained by Steve Smith and is used as the reference implementation for the author's Clean Architecture and DDD courses.
Key features
- 01Provides dotnet CLI templates in full (clean-arch) and minimal (min-clean) variants.
- 02Separates domain core, use cases, infrastructure and web into distinct projects.
- 03Includes domain events and test projects in the solution.
- 04Supports ApiEndpoints, controllers or Razor Pages for the web layer.
Use cases
- Starting a new ASP.NET Core backend that needs long-term maintainability.
- Learning how to structure a .NET application using Clean Architecture and DDD.
- Using a reference layout as the basis for a team's internal project template.
Quick start
- 1
Read the Getting Started steps in the official documentation
Things to know
- The main branch targets .NET 9.
- The site uses HTTPS and expects a self-signed developer certificate for localhost.
Topics
FAQ
- What is CleanArchitecture?
- A Clean Architecture solution template for ASP.NET Core with separate Core, Use Cases, Infrastructure and Web projects. This project is a starting-point solution template for building ASP.NET Core applications with Clean Architecture, the dependency-inverted style also known as hexagonal or onion architecture. It is distributed as a dotnet CLI template, with a full variant (clean-arch) and a minimal variant (min-clean), so developers can generate a new solution without wiring the layers by hand.
- Is CleanArchitecture free to use? What license does it have?
- CleanArchitecture is open source under the MIT license. Check the license terms before using it in commercial products.
- Is CleanArchitecture still maintained?
- Updated within 6 months. The last commit to CleanArchitecture was on Sep 21, 2026.
- What can I use CleanArchitecture for?
- Starting a new ASP.NET Core backend that needs long-term maintainability. Learning how to structure a .NET application using Clean Architecture and DDD. Using a reference layout as the basis for a team's internal project template.
- How do I install CleanArchitecture?
- Read the Getting Started steps in the official documentation
- Where can I get CleanArchitecture?
- The source code and installation instructions are on GitHub: https://github.com/ardalis/CleanArchitecture
Summary generated by AI from the project's README. GitHub stats refresh daily.
Related projects
A .NET solution template that scaffolds an ASP.NET Core app following Clean Architecture, with Angular, React, or API-only options.
A .NET toolkit for building high-performance HTTP reverse proxy servers that can be customized for specific deployment needs.
A self-hosted digital photo frame app that displays photos from an Immich server as a slideshow.
A self-hosted media server for movies, TV series and music, built for a small circle of family and friends.
A production-ready .NET 10 modular monolith and React 19 starter kit for building multi-tenant SaaS apps with identity, billing and more pre-wired.