CleanArchitecture README

The project's README from github.com/jasontaylordev/CleanArchitecture. As one markdown file: README.md.

Clean Architecture Solution Template

Build CodeQL Nuget Nuget Twitter Follow

The goal of this template is to provide a straightforward and efficient approach to enterprise application development, leveraging the power of Clean Architecture and ASP.NET Core. Using this template, you can effortlessly create a new app with Angular, React, or Web API only, powered by ASP.NET Core and Aspire. Getting started is easy - simply install the .NET template (see below for full details).

For full documentation, visit cleanarchitecture.jasontaylor.dev.

If you find this project useful, please give it a star. Thanks! ⭐

Getting started

Prerequisites

Install the template

dotnet new install Clean.Architecture.Solution.Template

Create a new solution

Create a new solution using the template. Specify the target framework using --framework (-f), the client framework using --client-framework (-cf) and the database provider using --database (-db):

dotnet new ca-sln --framework [net10.0|net11.0] --client-framework [angular|react|none] --database [postgresql|sqlite|sqlserver] --output YourProjectName
Option Values Default
--framework net10.0, net11.0 net10.0
--client-framework angular, react, none angular
--database postgresql, sqlite, sqlserver sqlite

Examples:

🅰️ Angular SPA with ASP.NET Core Web API and PostgreSQL:

dotnet new ca-sln -cf angular -db postgresql -o YourProjectName

⚛️ React SPA with ASP.NET Core Web API and SQL Server:

dotnet new ca-sln -cf react -db sqlserver -o YourProjectName

🔌 ASP.NET Core Web API only with SQLite:

dotnet new ca-sln -cf none -db sqlite -o YourProjectName

🆕 Angular SPA on .NET 11 with SQL Server:

dotnet new ca-sln -f net11.0 -cf angular -db sqlserver -o YourProjectName

💡 Tip: Run dotnet new ca-sln --help to see all available template options.

Run the app

Using the Aspire CLI (recommended):

aspire run

Or using the .NET CLI:

dotnet run --project ./src/AppHost

The Aspire dashboard will open automatically, showing the application URLs and logs.

Generated solutions also include a Dev Container with the .NET SDK, the Aspire CLI, Docker and (for Angular or React) Node.js, so you can open them in VS Code with Reopen in Container or in GitHub Codespaces.

To learn more, see the Getting started guide and Architecture overview.

Technologies

Versions

The main branch supports .NET 10.0 (LTS, the default) and .NET 11.0 (STS); choose with --framework. Both are supported until November 2028. .NET 11 with PostgreSQL uses a release candidate of the Npgsql EF Core provider until its 11.0 release. Previous versions are available:

Version Branch
.NET 9.0 net9.0
.NET 8.0 net8.0
.NET 7.0 net7.0
.NET 6.0 net6.0
.NET 5.0 net5.0
.NET Core 3.1 netcore3.1

Architectural decisions

Key design decisions are documented as Architecture Decision Records.

Learn more

Support

If you are having problems, please let me know by raising a new issue.

License

This project is licensed under the MIT License.

CleanArchitecture (jasontaylordev/CleanArchitecture)

Searching Database…

What is this?An open-source .NET solution template that scaffolds a complete ASP.NET Core application structured around Clean Architecture, so teams start from a working, well-layered codebase instead of an empty project.
Is this a library I add to my project, or a code generator?It is a .NET project template, not a library: you install it once, then 'dotnet new ca-sln' generates a full solution whose code you then own and extend.
How do I generate a project from it?Install the .NET template, then run 'dotnet new ca-sln' with --client-framework (angular, react, or none) and --database (postgresql, sqlite, or sqlserver); defaults are angular and sqlite. 'dotnet new ca-sln --help' lists all options.
What do I need installed on my machine first?The .NET 10.0 SDK or later. Node.js (LTS) is only needed for the Angular or React frontend, and Docker Desktop or Podman only for SQL Server or PostgreSQL — the default SQLite needs neither.
What if my team isn't on .NET 10 yet?The main branch targets .NET 10.0, but separate branches maintain older versions — from .NET 9 down to .NET Core 3.1 (net9.0 through netcore3.1).
What kind of app do I end up with?A web application: an Angular or React single-page app backed by an ASP.NET Core Web API, or just the Web API if you choose no frontend.
What is Aspire, and why does my app use it?Aspire is part of the .NET stack this template builds on ('powered by ASP.NET Core and Aspire'). In practice you will see its dashboard open when you run the app, showing the application URLs and logs; the linked template documentation covers it in more depth.
What comes baked into the generated solution?ASP.NET Core 10 with Aspire and Entity Framework Core 10, Angular 21 or React 19 on the frontend, plus MediatR, AutoMapper, FluentValidation, a test stack with NUnit, Shouldly, Moq and Respawn, and Scalar for API documentation.
Where does the template explain its design decisions?In Architecture Decision Records — the repo documents its key design choices as ADRs, so you can read the reasoning behind the structure before committing your project to it.
Size
10 MB
Stars
20.7K
Age
7y
Commits · 90 Days