Built for .NET8. It incorporates the most essential Packages your projects will ever need. Follows Clean Architecture Principles.
The template can be used with the dotnet new
command or with the Visual Studio 2022
or Visual Studio Code
IDEs.
This is an Application Template built to help you create LOB applications. It follows the Clean Architecture Principles and built on Domain-Driven-Design. This tool is useful to increases productivity on developing your next microservices. The template allows you to use different databases and enterprise service bus.
- InMemoryDB (for development purpose)
- SqlServer
- MongoDB
- Particular NServiceBus
- MassTransit
- Rebus
-
Visual Studio 2022(optional)
-
Visual Studio Code(optional)
-
Rider(optional)
Open up your Command Prompt or PowerShell or "bash" and run the following command.
# To clone the repository
git clone https://github.com/Genocs/clean-architecture-template
# To build the nuget package
nuget pack ./src/Package.Template.nuspec -NoDefaultExcludes -OutputDirectory ./out -Version 3.1.0
# To install the template
dotnet new install Genocs.CleanArchitecture.Template
or,
if you want to use a specific version of the template,
use
dotnet new install Genocs.CleanArchitecture.Template::3.1.0
This would install the Genocs CleanArchitecture Template
globally on your machine.
For more details on getting started, read the documentation
Please check the documentation for more details.
Create, build, test and run:
dotnet new -i Genocs.CleanArchitecture.Template
dotnet new cleanarchitecture -n {CompanyName.ProjectName.ServiceName}
cd {CompanyName.ProjectName.ServiceName}
dotnet build ./src/{CompanyName.ProjectName.ServiceName}.WebApi
dotnet build ./src/{CompanyName.ProjectName.ServiceName}.Worker
dotnet test
dotnet run ./src/{CompanyName.ProjectName.ServiceName}.WebApi
To build the package run the following commands:
cd ./src
nuget pack
dotnet new u Genocs.CleanArchitecture.Template
dotnet new i ./out/Genocs.CleanArchitecture.Template.3.1.0.nupkg
dotnet new cleanarchitecture --help
dotnet new cleanarchitecture --name {MyCompany.MyProject} -d mongodb -sb particular
Run dotnet new -i Genocs.CleanArchitecture.Template
then try the following commands.
# Complete suite of use cases.
dotnet new cleanarchitecture --use-cases full
# Register account and get customer details.
dotnet new cleanarchitecture --use-cases basic
# Read only use cases
dotnet new cleanarchitecture --use-cases readonly
Useful commands:
# How to get the list of installed templates
dotnet new -u
dotnet --list
View Complete Changelogs.
This project is licensed with the MIT license.
Has this Project helped you learn something New? or Helped you at work? Here are a few ways by which you can support.
- ⭐ Leave a star!
- 🥇 Recommend this project to your colleagues.
- 🦸 Do consider endorsing me on LinkedIn for ASP.NET Core - Connect via LinkedIn
- ☕ If you want to support this project in the long run, consider buying me a coffee!
This project exists thanks to all the people who contribute. Submit your PR and join the team!
Become a financial contributor and help me sustain the project.
Support the Project on Opencollective