Clean Architecture Solution Template for ASP.NET Core
Clean Architecture Solution Template for ASP.NET Core
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! ⭐
dotnet new install Clean.Architecture.Solution.TemplateCreate a new solution using the template. Specify the client framework using --client-framework (-cf) and the database provider using --database (-db):
dotnet new ca-sln --client-framework [angular|react|none] --database [postgresql|sqlite|sqlserver] --output YourProjectName| Option | Values | Default |
|---|---|---|
--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💡 Tip: Run
dotnet new ca-sln --helpto see all available template options.
dotnet run --project .\src\AppHostThe Aspire dashboard will open automatically, showing the application URLs and logs.
To learn more, see the Getting started guide and Architecture overview.
The main branch is on .NET 10.0. 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 |
Key design decisions are documented as Architecture Decision Records.
If you are having problems, please let me know by raising a new issue.
This project is licensed under the MIT License.
Dependency Dashboard
Add Support for MySQL
ASPNETCORE_ENVIRONMENT always Development when deploying to Azure
Support SvelteKit with Static Adapter for SPA Client-Only Applications
Wrong API Port is used by the Angular Frontend in default Template.
Make Todo & Identity Features Optional During Project Setup
Add Support for Vue
Add --minimal option to exclude sample code from template
Add Support for Blazor