CleanArchitecture (ardalis/CleanArchitecture)

Searching Database…

What is this?A solution template for ASP.NET Core that gives you a proven Clean Architecture starting point — a loosely-coupled, dependency-inverted project layout also known as hexagonal, ports-and-adapters, or onion architecture.
Is it a framework or a library I add to my project?Neither — it's a dotnet CLI project template. Installing it scaffolds a complete ASP.NET Core solution (Core, Use Cases, Infrastructure and Web projects plus test projects) that you then build your own application inside.
How do I get a project started with it?Install the template with the dotnet CLI (dotnet new install Ardalis.CleanArchitecture.Template), then scaffold a solution with dotnet new clean-arch for the full version or dotnet new min-clean for the minimal one. The official docs have Getting Started steps for the rest.
Do I need a specific .NET version installed first?Yes — the .NET SDK. The README notes the main branch now uses .NET 9, matching NuGet package version 10.x, and older template releases are available for earlier setups.
Any setup gotchas to watch out for?The generated site runs over HTTPS and expects a self-signed developer certificate for localhost, which can produce errors in Chrome — the README links mitigation instructions.
Does this lock me into Windows and Visual Studio?No — everything goes through the cross-platform dotnet CLI, and the repo's CI runs cross-platform build-and-test workflows, so Linux and macOS are fine too.
What's the difference between the full and the minimal template?clean-arch is the complete solution with every project and pattern in place, while min-clean is a stripped-down variant with less boilerplate to delete. The README's Template Comparison section (Which Template Should I Use?) helps you choose.
Am I forced into minimal APIs, or can I use Controllers and Razor Pages?The template favors API endpoints via the Ardalis.ApiEndpoints package, but the README documents how to add Controllers or Razor Pages if you prefer either of those.
Is this opinionated toward domain-driven design?It leans that way: Domain Events are among the documented patterns, and the same architecture underpins NimblePros' DDD Fundamentals course by Steve Smith and Julie Lerman. Clean Architecture itself, though, is the broader loosely-coupled idea, not DDD specifically.
I'm on an older template version — is upgrading painful?Not especially: the official documentation site ships Migration Guides for moving between versions, and the README asks upgraders to review them before starting.
Creator
ardalis
Size
3.9 MB
Stars
18.6K
Age
10y
Commits · 90 Days