Opinionated production-grade .NET 10 backend template for modern teams.
Built with:
- Minimal API
- Vertical Slice Architecture
- Custom Endpoint Base Classes
- Direct DbContext Access
- UnitOfWork
- No Repository Pattern
- JWT / Keycloak dual authentication
- Redis cache
- RabbitMQ messaging
- Firebase push notifications
- Swagger / API Versioning
- Global exception middleware
- Correlation + request logging
- OpenTelemetry ready
- Health checks
- Docker / docker-compose
- CI/CD pipeline
- Unit / Integration / Architecture tests
- API → HTTP, middleware, endpoints, OpenAPI/versioning
- Application → use-cases, validators, handlers, contracts
- Domain → entities, business primitives, audit contracts
- Persistence → EF Core, DbContext, UnitOfWork, query filters
- Infrastructure → auth, Redis, RabbitMQ, Firebase push
dotnet restore CleanArchitecture2026.sln
dotnet build CleanArchitecture2026.sln
dotnet run --project src/CleanArchitecture2026.APIdocker compose up --build
docker compose --profile optional upAuth:Mode=Jwt|KeycloakAuth:Jwt:*Auth:Keycloak:*Redis:*RabbitMq:*Firebase:*Serilog:*OpenTelemetry:*
POST /api/v1/productsGET /api/v1/products/{id}GET /healthGET /health-db
Most templates are bloated, outdated, or over-engineered.
CleanArchitecture2026 focuses on:
- Simplicity
- Maintainability
- Real production needs
- Fast feature delivery
- Long-term scalability
-
First install template dotnet new install .
-
Then create new project with template dotnet new cleanarchitecture2026 -n MyNewProject
- M1: Solution skeleton and layered structure
- M1.5: Package foundations
- M2: Shared kernel, domain base, app abstractions, middleware
- M3: Persistence + endpoint infrastructure + startup baseline
- M4: First vertical slice (
Productscreate/get) - M5: Auth + Redis + RabbitMQ + Firebase foundations
- M6: Tests, Docker, observability, CI pipeline
Lean, modern, production-ready .NET backend architecture.
- Install template package:
dotnet new install CleanArchitecture2026.Template - Create project:
dotnet new cleanarchitecture2026 -n MyProject