Build a new ASP.NET Core web application with a proven, layered architecture from day one.
Swap out your database or external service without rewriting business logic.
Write unit tests that focus on domain rules without mocking the entire infrastructure.
Organize a team project so different developers can work on layers independently.
.NET 9 SDK must be installed; template scaffolding and initial build takes time.
CleanArchitecture is a starter template for building web applications with ASP.NET Core (Microsoft's open-source web framework for .NET) following the Clean Architecture pattern. Clean Architecture is a way of organizing software so that the core business logic sits at the center, independent of databases, user interfaces, or external services, this makes it easier to test, maintain, and change individual parts without breaking others. The same approach goes by other names like hexagonal architecture, ports-and-adapters, and onion architecture. The template structures a project into distinct layers: a Core project holding domain entities and business rules, a Use Cases project for application-specific logic, an Infrastructure project for database access and external integrations, and a Web project for the user-facing API or web interface. It incorporates patterns such as domain events (notifications when something important happens inside the domain), and follows Domain-Driven Design (DDD) principles for organizing complex business logic. The template is installable as a .NET CLI tool via NuGet, the package manager for .NET, and comes in two variants: a full version and a minimal version. It targets .NET 9. The main branch corresponds to NuGet package version 10.x. It is created by Steve Smith (known online as "ardalis") and is open source.
Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.