This is a PowerShell script that helps you start a new .NET project quickly. It creates a folder structure based on Clean Architecture principles.
- Creates a Solution and 4 Projects (Api, Application, Domain, Infrastructure).
- Organizes internal folders (Entities, Interfaces, DTOs, etc.).
- Automatically installs essential NuGet Packages (EF Core, JWT, Swagger).
- Sets up all Project References (Dependencies) correctly.
- Open PowerShell as Administrator.
- Copy the script into your PowerShell Profile (type
notepad $PROFILEto open it). - Run the command:
New-CleanProject -ProjectName "YourProjectName"
- The script will build the entire structure for you in seconds.
- Domain: Enterprise logic and Entities.
- Application: Business logic, DTOs, and Interfaces.
- Infrastructure: Database context, Identity, and Repositories.
- Api: Controllers and Web configuration.
- .NET SDK (Version 8.0 or newer recommended).
- PowerShell 5.1 or 7+.
This project is open-source. Feel free to use and modify it!