# CleanArchitecture
**Repository Path**: github_mirrors/CleanArchitecture
## Basic Information
- **Project Name**: CleanArchitecture
- **Description**: No description available
- **Primary Language**: Unknown
- **License**: MIT
- **Default Branch**: KyleMcMaster-patch-1
- **Homepage**: None
- **GVP Project**: No
## Statistics
- **Stars**: 0
- **Forks**: 0
- **Created**: 2025-06-30
- **Last Updated**: 2025-07-17
## Categories & Tags
**Categories**: Uncategorized
**Tags**: None
## README
[](https://github.com/ardalis/CleanArchitecture/actions)
[](https://github.com/ardalis/CleanArchitecture/actions/workflows/publish.yml)
[](https://www.nuget.org/packages/Ardalis.CleanArchitecture.Template/)
# Clean Architecture
A starting point for Clean Architecture with ASP.NET Core. [Clean Architecture](https://8thlight.com/blog/uncle-bob/2012/08/13/the-clean-architecture.html) is just the latest in a series of names for the same loosely-coupled, dependency-inverted architecture. You will also find it named [hexagonal](http://alistair.cockburn.us/Hexagonal+architecture), [ports-and-adapters](http://www.dossier-andreas.net/software_architecture/ports_and_adapters.html), or [onion architecture](http://jeffreypalermo.com/blog/the-onion-architecture-part-1/).
Learn more about Clean Architecture and this template in [NimblePros' Introducing Clean Architecture course](https://academy.nimblepros.com/p/learn-clean-architecture). Use code ARDALIS to save 20%.
This architecture is used in the [DDD Fundamentals course](https://www.pluralsight.com/courses/fundamentals-domain-driven-design) by [Steve Smith](https://ardalis.com) and [Julie Lerman](https://thedatafarm.com/).
:school: Contact Steve's company, [NimblePros](https://nimblepros.com/), for Clean Architecture or DDD training and/or implementation assistance for your team.
## Take the Course!
[Learn about how to implement Clean Architecture](https://academy.nimblepros.com/p/intro-to-clean-architecture) from [NimblePros](https://nimblepros.com) trainers [Sarah "sadukie" Dutkiewicz](https://blog.nimblepros.com/author/sadukie/) and [Steve "ardalis" Smith](https://blog.nimblepros.com/author/ardalis/).
## Table Of Contents
- [Clean Architecture](#clean-architecture)
- [Troubleshooting Chrome Errors](#troubleshooting-chrome-errors)
- [Table Of Contents](#table-of-contents)
- [Give a Star! :star:](#give-a-star-star)
- [Versions](#versions)
- [Learn More](#learn-more)
- [Getting Started](#getting-started)
- [Using the dotnet CLI template](#using-the-dotnet-cli-template)
- [What about Controllers and Razor Pages?](#what-about-controllers-and-razor-pages)
- [Add Ardalis.ApiEndpoints](#add-ardalisapiendpoints)
- [Add Controllers](#add-controllers)
- [Add Razor Pages](#add-razor-pages)
- [Using the GitHub Repository](#using-the-github-repository)
- [Running Migrations](#running-migrations)
- [Goals](#goals)
- [History and Shameless Plug Section](#history-and-shameless-plug-section)
- [Design Decisions and Dependencies](#design-decisions-and-dependencies)
- [Where To Validate](#where-to-validate)
- [The Core Project](#the-core-project)
- [The Use Cases Project](#the-use-cases-project)
- [The Infrastructure Project](#the-infrastructure-project)
- [The Web Project](#the-web-project)
- [The SharedKernel Project](#the-sharedkernel-project)
- [The Test Projects](#the-test-projects)
- [Patterns Used](#patterns-used)
- [Domain Events](#domain-events)
- [Related Projects](#related-projects)
## Give a Star! :star:
If you like or are using this project to learn or start your solution, please give it a star. Thanks!
Or if you're feeling really generous, we now support GitHub sponsorships - see the button above.
## Sponsors
I'm pleased to announce that [Amazon AWS's FOSS fund](https://github.com/aws/dotnet-foss) has chosen to award a 12-month sponsorship to this project. Thank you, and thanks to all of my other past and current sponsors!
## Troubleshooting Chrome Errors
By default the site uses HTTPS and expects you to have a self-signed developer certificate for localhost use. If you get an error with Chrome [see this answer](https://stackoverflow.com/a/31900210/13729) for mitigation instructions.
## Versions
The main branch is now using **.NET 9**. This corresponds with NuGet package version 10.x. Previous versions are available - see our [Releases](https://github.com/ardalis/CleanArchitecture/releases).
## Learn More
- [Live Stream Recordings Working on Clean Architecture](https://www.youtube.com/c/Ardalis/search?query=clean%20architecture)
- [DotNetRocks Podcast Discussion with Steve "ardalis" Smith](https://player.fm/series/net-rocks/clean-architecture-with-steve-smith)
- [Fritz and Friends Streaming Discussion with Steve "ardalis" Smith](https://www.youtube.com/watch?v=k8cZUW4MS3I)
# Getting Started
To use this template, there are a few options:
- Install using `dotnet new` (recommended)
- Download this Repository (and modify as needed)
## Using the dotnet CLI template
First, install the template from [NuGet (https://www.nuget.org/packages/Ardalis.CleanArchitecture.Template/)](https://www.nuget.org/packages/Ardalis.CleanArchitecture.Template/):
```powershell
dotnet new install Ardalis.CleanArchitecture.Template
```
You can see available options by running the command with the `-?` option:
```powershell
dotnet new clean-arch -?
ASP.NET Clean Architecture Solution (C#)
Author: Steve Smith @ardalis, Erik Dahl
Usage:
dotnet new clean-arch [options] [template options]
Options:
-n, --name The name for the output being created. If no name is specified, the name of the output
directory is used.
-o, --output