Skip to content

Clean architecture .NET boilerplate with CQRS, Repository, Audit Logging, Health Checks, Hangfire, Email, and modular best practices. Production-ready template for modern enterprise projects.

License

Notifications You must be signed in to change notification settings

taberkkaya/CleanArch.StarterKit

Repository files navigation

ResultKit logo

CleanArch.StarterKit

🧱 A robust, modular, and enterprise-ready Clean Architecture template for .NET 9.


📦 What is CleanArch.StarterKit?

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.


🧰 Technologies Used

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

🚀 Installation

1️⃣ Install via NuGet as a Template (Recommended)

You can install CleanArch.StarterKit as a dotnet template via NuGet:

dotnet new install CleanArch.StarterKit::9.0.1

After installation, create a new solution with:

dotnet new cleanarch-starterkit -n YourProjectName

2️⃣ Manual Clone

Alternatively, you can clone the repository directly:

git clone https://github.com/taberkkaya/CleanArch.StarterKit.git
cd CleanArch.StarterKit/src

🚀 Project Structure

📁 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

⚙️ Getting Started

🚀 Installation

You can clone this repository and use it directly, or install as a template (optionally):

  1. Clone the repository:
git clone https://github.com/taberkkaya/CleanArch.StarterKit.git
cd CleanArch.StarterKit/src
  1. Update the connection string in appsettings.json
"ConnectionStrings": {
  "DefaultConnection": "Your-Connection-String-Here"
}
  1. Run the API:
dotnet run --project CleanArch.StarterKit.WebApi

✅ Benefits

  • 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

🔑 Authentication

  • 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

✨ Contribution

Fork this repository and open a PR to contribute new features, improvements, or bugfixes!

About

Clean architecture .NET boilerplate with CQRS, Repository, Audit Logging, Health Checks, Hangfire, Email, and modular best practices. Production-ready template for modern enterprise projects.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •  

Languages