Skip to content

A Clean Architecture solution template for .NET projects. This template includes all key layers to help you start building scalable applications faster: API, Application, Domain, Infrastructure, and Persistence.

Notifications You must be signed in to change notification settings

mberrishdev/Net.Template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

35 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

MB.Template – Clean Architecture for .NET

A Clean Architecture solution template for .NET projects.
This template includes all key layers to help you start building scalable applications faster:
API, Application, Domain, Infrastructure, and Persistence.


🚀 Getting Started

1. Clone the Template Repository

git clone https://github.com/mberrishdev/Net.Template.git mb.template
cd mb.template

2. Install the Template Locally

Register the template with the .NET CLI:

dotnet new install .

After this, the template will appear in the list:

dotnet new list

You’ll see something like:

Template Name                                             Short Name      Language  Tags
------------------------------------------------------- --------------  --------  --------------------
MB.Template - Celan Architexture for .NET                 mbtemplate      [C#]      webAPI/Solution/CleanArchitecture

3. Create a New Project

Use the short name nettemplate to generate a new solution:

dotnet new mbtemplate -n YourProjectName -o YourProjectName
cd YourProjectName
rm -rf .git

This will create a clean architecture solution with your specified name.

4. Restore & Run

dotnet restore
dotnet build
dotnet run --project src/YourProjectName.Api

🧼 Uninstall the Template (Optional)

To remove the template from your system:

dotnet new uninstall /full/path/to/mb.template

To find installed template paths, run:

dotnet new --debug:reinit

📁 Project Structure

src/
├── YourProjectName.Api           --> Entry point (Web API)
├── YourProjectName.Application   --> Business logic (Use Cases, Interfaces)
├── YourProjectName.Domain        --> Core domain models and rules
├── YourProjectName.Infrastructure--> Cross-cutting concerns
└── YourProjectName.Persistence   --> EF Core and data access layer

💡 Customization

This template uses symbol replacement. You can customize the solution name by passing --SolutionName:

dotnet new nettemplate -n MyApp -o MyApp --SolutionName "MyApp"

👤 Author

Mikheil Berishvili

About

A Clean Architecture solution template for .NET projects. This template includes all key layers to help you start building scalable applications faster: API, Application, Domain, Infrastructure, and Persistence.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages