A production-ready Vertical Slice Architecture template for .NET. One project, one file per feature, and every cross-cutting concern already wired: lightweight CQRS, JWT with refresh tokens, caching, telemetry, and tests.
45,000+ developers use my templates
Web.Api
Application
Infrastructure
Domain
Features/Todos/CreateTodo.cs
// ~120 lines. One review, one delete.
Same behavior, same tests. One version is spread across four projects, the other is a file you can open, review, and delete in one go.
1
Project to run
1
File per feature
.NET 10
Framework
Free
Forever
Every use case is a single static class with four nested parts. Nothing is hidden in a folder three projects away.
Deleting the feature means deleting the file. No orphaned interfaces, no dead DTOs stranded in a shared project, no grep across four folders to find what a change touches.
1
File to open
0
Projects to cross
~120
Lines, end to end
The whole template is free. Drop your email and it is in your inbox in a minute.
Get the templateFive stops between the socket and the database, and every one of them is a file you can open and change.
A Minimal API endpoint, discovered at startup. Rate limited and authenticated first.
The validation decorator runs FluentValidation rules and short-circuits on failure.
Your use case. DbContext injected directly, no repository sitting in between.
EF Core against PostgreSQL, with domain events dispatched after the save.
The Result maps to 200 or to a ProblemDetails payload. Never an exception.
Rate limiting, authentication, validation, logging, caching, and ProblemDetails responses. Configured, not just referenced.
The boring parts of a new .NET API, decided and implemented, so day one is spent on your domain.
Lightweight ICommand and IQuery abstractions, registered by Scrutor assembly scanning. A few dozen lines you can read, with no third-party dispatcher in the middle.
JWT authentication with refresh tokens and rotation, plus permission-based authorization policies you can extend per endpoint.
Snake_case naming, migrations, entity configurations, and a domain events dispatcher. DbContext goes straight into handlers, with no repository ceremony.
Fast, unified caching with the cache keys and invalidation already modeled, sitting right next to the use cases that own them.
Tracing and metrics for ASP.NET Core, HTTP, Npgsql, and the runtime. Serilog structured logs land in Seq on localhost:8081.
Unit tests plus integration tests on Testcontainers, hitting a real PostgreSQL container over real HTTP. One dotnet test away.
No Domain, Application, Infrastructure, and Web projects passing types back and forth. One Web.Api project, features on the left, shared plumbing on the right.
Outgrown a slice? Promote it. Nothing in the template stops you from extracting a module or a service later, and the file boundary shows you exactly what moves.
One project, .NET 10, free forever. Have it running before your coffee gets cold.
Get the templateThe template lands in your inbox as a ready-to-run solution. No sign-up wall, no upsell required.
PostgreSQL and Seq start together. Then dotnet run --project src/Web.Api and the API is live.
Open Features/Todos/CreateTodo.cs, copy it, rename it. That is what adding a feature looks like.
Neither is better. Vertical slices trade layer enforcement for speed and locality, which is a great fit for small teams and services with a clear scope. Clean Architecture pays off when you have many developers and long-lived domain rules to protect. This template gives you the vertical slice option, fully built out.
It targets .NET 10 by default. Directory.Build.props has notes for retargeting to .NET 8 or .NET 9 if you are not on the latest runtime yet.
The template ships its own ICommand, IQuery, ICommandHandler, and IQueryHandler abstractions, registered by Scrutor assembly scanning. Handlers are injected directly, and cross-cutting concerns like logging and validation are plain decorators you can read in a minute.
Yes. The template is free forever, and so are the updates. You get an email when a new version ships.
The full Vertical Slice Architecture template, free, in your inbox. Clone it, run it, and start shipping.
No credit card. Targets .NET 10, works on .NET 8 and 9.