🧱 A robust, modular, and enterprise-ready Clean Architecture template for .NET 9.
CleanArch.StarterKit is a production-ready boilerplate that demonstrates a clean, layered approach to .NET application development using Clean Architecture and modular principles.
It features ready-to-use CQRS, MediatR, authentication (JWT), background jobs (Hangfire), HealthChecks, Audit Logging, ResultKit, RepositoryKit, and more.
Designed for scalable, maintainable, and testable enterprise solutions.
| Technology | Purpose |
|---|---|
| ASP.NET Core 9 | Web API layer |
| Entity Framework Core | Data persistence |
| CQRS & MediatR | Request/response separation |
| FluentValidation | Request validation |
| Serilog | Structured logging |
| Hangfire | Background jobs & scheduling |
| HealthChecks & UI | Health endpoints |
| ResultKit | Result/Error handling |
| RepositoryKit | Generic repository pattern |
You can install CleanArch.StarterKit as a dotnet template via NuGet:
dotnet new install CleanArch.StarterKit::9.0.1After installation, create a new solution with:
dotnet new cleanarch-starterkit -n YourProjectNameAlternatively, you can clone the repository directly:
git clone https://github.com/taberkkaya/CleanArch.StarterKit.git
cd CleanArch.StarterKit/src📁 CleanArch.StarterKit
|
├── 📁 CleanArch.StarterKit.WebApi → API layer (Controllers, middleware, DI)
├── 📁 CleanArch.StarterKit.Application → CQRS, business rules, services, validation
├── 📁 CleanArch.StarterKit.Domain → Domain models, entities, contracts
├── 📁 CleanArch.StarterKit.Infrastructure → Data access, Identity, integrations
You can clone this repository and use it directly, or install as a template (optionally):
- Clone the repository:
git clone https://github.com/taberkkaya/CleanArch.StarterKit.git
cd CleanArch.StarterKit/src- Update the connection string in appsettings.json
"ConnectionStrings": {
"DefaultConnection": "Your-Connection-String-Here"
}- Run the API:
dotnet run --project CleanArch.StarterKit.WebApi- Swagger: https://localhost:7294/swagger
- HealthChecks UI: https://localhost:7294/health-ui
- Hangfire Dashboard: https://localhost:7294/hangfire
- Separation of concerns with Clean Architecture
- Built-in CQRS with MediatR & validation
- Out-of-the-box JWT authentication and authorization
- Automatic health checks and monitoring UI
- Hangfire background jobs, with dashboard and DB authentication
- Full audit logging for all critical data changes and requests
- Generic repository and robust result patterns for maintainable code
- SOLID, modular, scalable, and easily testable structure
- JWT-based user authentication (/api/Auth/login)
- Admin-only endpoints and role-based access out of the box
- Hangfire Dashboard login credentials managed via the database
Fork this repository and open a PR to contribute new features, improvements, or bugfixes!
