Clean.Architecture.Solution.Template 10.0.0

dotnet new install Clean.Architecture.Solution.Template::10.0.0
                    
This package contains a .NET Template Package you can call from the shell/command line.

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 Single Page App (SPA) with ASP.NET Core and Angular or React, while adhering to the principles of Clean Architecture. Getting started is easy - simply install the .NET template (see below for full details).

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

Getting Started

The following prerequisites are required to build and run the solution:

  • .NET 10.0 SDK (latest version)
  • Node.js (latest LTS, only required if you are using Angular or React)

The easiest way to get started is to install the .NET template:

dotnet new install Clean.Architecture.Solution.Template

Once installed, create a new solution using the template. You can choose to use Angular, React, or create a Web API-only solution. Specify the client framework using the -cf or --client-framework option, and provide the output directory where your project will be created. Here are some examples:

To create a Single-Page Application (SPA) with Angular and ASP.NET Core:

dotnet new ca-sln --client-framework Angular --output YourProjectName

To create a SPA with React and ASP.NET Core:

dotnet new ca-sln -cf React -o YourProjectName

To create a ASP.NET Core Web API-only solution:

dotnet new ca-sln -cf None -o YourProjectName

Launch the app:

cd src/Web
dotnet run

To learn more, run the following command:

dotnet new ca-sln --help

You can create use cases (commands or queries) by navigating to ./src/Application and running dotnet new ca-usecase. Here are some examples:

To create a new command:

dotnet new ca-usecase --name CreateTodoList --feature-name TodoLists --usecase-type command --return-type int

To create a query:

dotnet new ca-usecase -n GetTodos -fn TodoLists -ut query -rt TodosVm

To learn more, run the following command:

dotnet new ca-usecase --help

Database

The template supports PostgreSQL, SQLite, and SQL Server (default option). Specify the database to use with the --database option:

dotnet new ca-sln --database [postgresql|sqlite|sqlserver]

On application startup, the database is automatically deleted, recreated, and seeded using ApplicationDbContextInitialiser. This is a practical strategy for early development, avoiding the overhead of maintaining migrations while keeping the schema and sample data in sync with the domain model.

This process includes:

  • Deleting the existing database
  • Recreating the schema from the current model
  • Seeding default roles, users, and data

For production environments, consider using EF Core migrations or migration bundles during deployment.
For more information, see Database Initialisation Strategies for EF Core.

Deploy

This template is structured to follow the Azure Developer CLI (azd). You can learn more about azd in the official documentation. To get started:

# Log in to Azure
azd auth login

# Provision and deploy to Azure
azd up

Technologies

Versions

The main branch is now on .NET 10.0. The following previous versions are available:

Learn More

Support

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

License

This project is licensed with the MIT license.

This package has no dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
10.0.0 498 11/11/2025
9.0.12 3,773 7/28/2025
9.0.11 897 7/22/2025
9.0.10 2,598 5/23/2025
9.0.9 387 5/21/2025
9.0.8 7,221 12/6/2024
9.0.7 235 12/6/2024
9.0.6 420 12/2/2024
9.0.5 353 11/30/2024
9.0.4 313 11/29/2024
9.0.3 257 11/29/2024
9.0.2 242 11/28/2024
9.0.1 898 11/18/2024
9.0.0 559 11/15/2024
9.0.0-preview.6.1 748 9/5/2024
9.0.0-preview.6 275 9/1/2024
8.0.6 5,537 8/31/2024
8.0.5 10,034 3/7/2024
8.0.4 1,446 3/3/2024
8.0.3 2,677 2/15/2024
8.0.2 7,599 11/23/2023
8.0.1 1,946 11/22/2023
8.0.0 7,024 11/15/2023
8.0.0-preview.7.2 3,898 8/29/2023
8.0.0-preview.7.1 238 8/29/2023
8.0.0-preview.6.18 1,245 8/6/2023
8.0.0-preview.6.17 317 8/3/2023
8.0.0-preview.6.16 282 8/2/2023
8.0.0-preview.6.15 274 8/1/2023
8.0.0-preview.6.14 374 7/30/2023
8.0.0-preview.6.13 226 7/30/2023
8.0.0-preview.6.12 303 7/29/2023
8.0.0-preview.6.11 358 7/26/2023
8.0.0-preview.6.10 382 7/23/2023
8.0.0-preview.6.9 390 7/19/2023
8.0.0-preview.6.8 246 7/19/2023
8.0.0-preview.6.7 254 7/19/2023
8.0.0-preview.6.6 268 7/18/2023
8.0.0-preview.6.5 356 7/16/2023
8.0.0-preview.6.4 271 7/16/2023
8.0.0-preview.6.3 279 7/14/2023
8.0.0-preview.6.2 238 7/14/2023
8.0.0-preview.6.1 287 7/13/2023
8.0.0-preview.6 273 7/12/2023
8.0.0-preview.5.15 257 7/12/2023
8.0.0-preview.5.14 379 7/9/2023
8.0.0-preview.5.13 269 7/9/2023
8.0.0-preview.5.12 273 7/8/2023
8.0.0-preview.5.11 220 7/8/2023
8.0.0-preview.5.10 246 7/8/2023
8.0.0-preview.5.9 240 7/8/2023
8.0.0-preview.5.8 243 7/8/2023
8.0.0-preview.5.7 264 7/8/2023
8.0.0-preview.5.6 260 7/7/2023
8.0.0-preview.5.5 374 7/5/2023
8.0.0-preview.5.4 294 7/5/2023
8.0.0-preview.5.3 323 7/4/2023
8.0.0-preview.5.2 418 6/29/2023
8.0.0-preview.5.1 289 6/26/2023
8.0.0-preview.5 361 6/18/2023
7.0.2 9,253 6/14/2023
7.0.1 7,531 2/21/2023
7.0.0 7,595 10/19/2022
6.1.0 9,281 6/6/2022
6.0.8 3,132 6/1/2022
6.0.7 3,295 5/25/2022
6.0.6 6,341 5/24/2022
6.0.5 2,765 5/21/2022
6.0.2 3,009 5/20/2022
6.0.1 9,717 11/13/2021
6.0.0 3,082 11/10/2021
1.1.5 8,034 7/10/2021
1.1.4 10,694 12/2/2020
1.1.2 3,081 11/24/2020
1.1.1 8,928 5/20/2020
1.1.0 4,999 4/11/2020
1.0.10 3,553 3/30/2020
1.0.9 3,210 3/26/2020
1.0.8 3,434 3/24/2020
1.0.7 3,466 3/23/2020
1.0.6 4,387 2/6/2020
1.0.5 4,630 12/9/2019
1.0.4 4,495 11/13/2019
1.0.3 3,408 10/17/2019
1.0.2 3,568 10/16/2019
1.0.1 3,344 10/10/2019

📦 Upgrade to .NET 10
     📦 Upgrade to Aspire 13