Skip to main content
.NET 10 · Free · Zero Commercial Dependencies

Ship features on day one
with Clean Architecture

Production-ready .NET 10 template. CQRS, JWT auth, HybridCache, Scalar, Aspire, OpenTelemetry, architecture tests. Unzip and build.

Download Free Template

Join 6,500+ developers on the newsletter

~/CleanArchitectureTemplate
$ dotnet run --project src/AppHost
Starting .NET Aspire...
+ PostgreSQL running on :5432
+ Redis running on :6379
+ API running on :7200
Migrated database · seeded admin + 5 todos
Ready. Scalar docs at /scalar/v1
8 projects
17 tests
0 warnings
Free forever

Get the free template

Enter your email to get instant access. You'll also receive weekly .NET architecture insights, benchmarks, and production tips every Tuesday.

100% free No spam ever Unsubscribe anytime

Join 6,500+ developers already on the newsletter

Four layers. One dependency rule.

Each layer only depends on the layer below it. Architecture tests enforce this at build time — break the rule and the build fails.

Api

Minimal API endpoints, Scalar, middleware, ProblemDetails

Infrastructure

EF Core, Identity, JWT, HybridCache, Serilog

Application

CQRS handlers, validators, DTOs, feature folders

Domain zero dependencies

Entities, Result pattern, Error types — zero dependencies

Dependencies flow downward only — enforced by 9 architecture tests

Everything you need to start building

Not a skeleton. Not a framework. A complete, opinionated starter with every production concern already wired up.

Clean Architecture Done Right

Four layers with strict dependency rules enforced by architecture tests at build time. Domain has zero external dependencies.

Manual CQRS - Zero Licensing Risk

ICommand, IQuery, and handler interfaces — no MediatR, no Mediator, no commercial dependencies. You own every line of code.

Full Identity Out of the Box

ASP.NET Identity with JWT authentication, refresh tokens, role-based authorization, and a seeded admin user. Login and go.

Microsoft HybridCache

L1 in-memory + L2 Redis cache with stampede protection and automatic serialization. The newest caching primitive in .NET — nobody else includes this.

Scalar API Documentation

Modern OpenAPI UI that replaces Swagger. JWT auth pre-configured so you can test authenticated endpoints directly from the docs.

Aspire + OpenTelemetry

One 'dotnet run' starts PostgreSQL, Redis, and the API with full observability — traces, metrics, and logs in the Aspire Dashboard.

FluentValidation + Result Pattern

Endpoint filters run validators before handlers. Typed errors (NotFound, Validation, Conflict) map to correct HTTP status codes automatically.

Tests From Day One

9 architecture tests enforce dependency rules. 8 unit tests cover handler logic. xUnit v3 with FluentAssertions and EF Core InMemory.

Modern .NET Conventions

.slnx solution format, Central Package Management, primary constructors, collection expressions — bleeding edge, production ready.

Clean project structure

Open it, understand it immediately. No magic folders, no hidden conventions.

project structure
src/
├── Domain/
├── Application/
├── Infrastructure/
├── Api/
├── AppHost/
└── ServiceDefaults/
tests/
├── Architecture.Tests/
└── Application.UnitTests/

Opinionated by design

Every decision has a reason. No "it depends" — I picked what I'd use in production and explained why.

Manual CQRS

MediatR is commercial since v13. Zero licensing risk. You learn the pattern, not a library.

Scalar

Modern, faster, better UX than Swagger UI. Pre-configured with JWT auth for testing.

HybridCache

Built-in stampede protection, L1+L2, automatic serialization. Replaces IMemoryCache + IDistributedCache.

Result Pattern

Explicit error handling with typed errors. No hidden exceptions, no magic. Correct HTTP status codes.

No Repository Pattern

EF Core DbContext IS the repository. No unnecessary abstraction layer. Handlers query directly.

.slnx Format

XML-based, merge-friendly, smaller. The future of .NET solution files.

Frequently asked questions

Your next project deserves a clean start

.NET 10. Clean Architecture. Zero commercial dependencies. Production-ready from day one.

Join 6,500+ developers on the newsletter

Free weekly newsletter

Stay ahead in .NET

Tutorials Architecture DevOps AI

Once-weekly email. Best insights. No fluff.

Join 6,500+ developers · Delivered every Tuesday