Skip to content

Repository files navigation

CleanArchitecture2026

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

Features

  • 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

Architecture Summary

  • 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

Quick Start

dotnet restore CleanArchitecture2026.sln
dotnet build CleanArchitecture2026.sln
dotnet run --project src/CleanArchitecture2026.API

With Docker

docker compose up --build
docker compose --profile optional up

Configuration

  • Auth:Mode = Jwt | Keycloak
  • Auth:Jwt:*
  • Auth:Keycloak:*
  • Redis:*
  • RabbitMq:*
  • Firebase:*
  • Serilog:*
  • OpenTelemetry:*

Included Sample Endpoints

  • POST /api/v1/products
  • GET /api/v1/products/{id}
  • GET /health
  • GET /health-db

Why This Template?

Most templates are bloated, outdated, or over-engineered.

CleanArchitecture2026 focuses on:

  • Simplicity
  • Maintainability
  • Real production needs
  • Fast feature delivery
  • Long-term scalability

Template Usage

  • First install template dotnet new install .

  • Then create new project with template dotnet new cleanarchitecture2026 -n MyNewProject


Milestones Completed

  • 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 (Products create/get)
  • M5: Auth + Redis + RabbitMQ + Firebase foundations
  • M6: Tests, Docker, observability, CI pipeline

Philosophy

Lean, modern, production-ready .NET backend architecture.

Template Usage

  • Install template package: dotnet new install CleanArchitecture2026.Template
  • Create project: dotnet new cleanarchitecture2026 -n MyProject

About

Production-ready .NET 10 backend template with one-command Docker bootstrap (PostgreSQL, Redis, RabbitMQ).

Topics

Resources

Contributing

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages