Clean Minimal API
ASP.NET Core Minimal APIs
- Endpoints grouped by feature
- OpenAPI docs browsed in Scalar
- Problem Details, optional JWT auth
dotnet new install CleanMinimalApi.Template dotnet new cleanminimalapi --name WorksOnMyMachine.Movies dotnet new templates for .NET 10
Five templates, one sensible core. Each one builds the same small movie review app on the same Application and Infrastructure layers. Only the front door changes, so once you've learned one, you've learned the lot.
dotnet new install CleanMinimalApi.Template dotnet new cleanminimalapi --name WorksOnMyMachine.Movies cd WorksOnMyMachine.Movies && docker compose up -dThe templates
Pick how your app talks to the world. Everything behind that is identical, right down to the tests, and every template has its own colour so you can tell them apart at a glance.
ASP.NET Core Minimal APIs
dotnet new install CleanMinimalApi.Template dotnet new cleanminimalapi --name WorksOnMyMachine.Movies Model Context Protocol servers
dotnet new install CleanModelContextProtocol.Template dotnet new cleanmodelcontextprotocol --name WorksOnMyMachine.Movies GraphQL on Hot Chocolate
dotnet new install CleanGraphQLApi.Template dotnet new cleangraphqlapi --name WorksOnMyMachine.Movies ASP.NET Core Web APIs
dotnet new install CleanWebApi.Template dotnet new cleanwebapi --name WorksOnMyMachine.Movies AWS Lambda
dotnet new install CleanLambdaFunction.Template dotnet new cleanlambdafunction --name WorksOnMyMachine.Movies The Application and Infrastructure layers are shared, so all five come with the same kit.
How they work
The templates are loosely based on Clean Architecture, inspired by Jason Taylor's Clean Architecture template, with some ideas taken further and others scaled back. It's by no means perfect, which is why we call it Lean Mean Clean Architecture.
Minimal APIs, MCP tools, GraphQL, controllers or Lambda handlers. It sends commands and queries through Mediator and turns errors into whatever its protocol expects.
Owns the domain and the business rules. Commands and queries are validated and handled here, against repository interfaces it doesn't care how you fulfil.
Owns the data, with EF Core and SQLite behind those interfaces. Every class is internal, so Presentation can wire it up but can't reach in by accident.
The team
A small team, built and looked after in spare time. Small as in one person, for now. Help is always welcome, and so is company.
Maintainer
Builds and looks after every template, keeps them current with each .NET release, and drinks the coffee.
Found a bug, got an idea, or want a template for something we haven't built yet? Open an issue on the template it's about. Pull requests are welcome too.
If the templates save you some time, sponsoring helps keep every one of them current with each .NET release.