CleanMinimalApi.Template 2026.11.1.264

Prefix Reserved
dotnet new install CleanMinimalApi.Template@2026.11.1.264
                    
This package contains a .NET Template Package you can call from the shell/command line.

Clean Minimal API

A dotnet new template for an API built with a streamlined version of Clean Architecture and ASP.NET Core Minimal APIs.

It's one of five Lean Mean Clean Apps templates, for Minimal APIs, Model Context Protocol, GraphQL, Web API controllers and AWS Lambda, that share the same Application and Infrastructure layers, tests and CI pipeline. Full docs live at leanmeancleanapps.github.io/minimalapi.

Requirements

Install

dotnet new install CleanMinimalApi.Template

Create a solution

dotnet new cleanminimalapi --name {YOUR_SOLUTION_NAMESPACE} --authorName "{YOUR_NAME}"
Option Description
--name The name of the solution, also used as the root namespace.
--authorName The name of the author of the solution.
--authority The OAuth authorization server that issues access tokens. Leave it empty to run the API without authentication.
--audience The audience access tokens must be issued for, usually the API's own URL.

With an authority set, the movie, author and review endpoints need a JWT bearer token, and the version endpoint, the OpenAPI document and Scalar stay open.

Run it

From the new solution's folder, start the app and a Seq container for logs.

docker compose up -d

Then open the Scalar API reference at http://localhost:8080/scalar. The OpenAPI document is at http://localhost:8080/openapi/v1.json, and Seq shows the logs at http://localhost:5341.

Or run it without Docker.

dotnet run --project ./src/Presentation

Run the tests with dotnet test. Every way to run the solution is in docs/RUN.md inside it.

What's inside

  • Presentation: Minimal API endpoints grouped by feature, documented with XML comments and browsable in Scalar
  • Application: commands and queries through Mediator, validation with FluentValidation and mapping with Mapperly
  • Infrastructure: Entity Framework Core on SQLite with migrations and optional sample data
  • Tests: xUnit, Shouldly and NSubstitute, each test on its own in-memory database
  • A Dockerfile that runs as a non-root user, a docker-compose.yml, and a GitHub Actions pipeline with tests, a coverage gate, a container scan and CodeQL

Updates

A new version is released on the 1st of each month with every change merged since the previous release, as long as something has changed. No change, no new version number. We're not here to pad the download stats. To update an installed template:

dotnet new update

What changed in each version is in the release notes. To remove the template, run dotnet new uninstall CleanMinimalApi.Template.

More help

Support

If this template saves you time, please consider sponsoring the work on GitHub. It keeps all five templates current, and the coffee flowing.

  • net10.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
2026.11.1.264 148 11/1/2026
2026.10.29.245 134 10/29/2026
2026.10.29.236 116 10/29/2026
2026.10.28.227 128 10/28/2026
2026.10.28.225 120 10/28/2026
2026.10.28.220 117 10/28/2026
2026.10.28.218 116 10/28/2026
2026.10.28.216 118 10/28/2026
2026.10.28.210 124 10/28/2026
2026.10.28.208 116 10/28/2026
2026.10.27.206 123 10/27/2026
2026.10.27.204 114 10/27/2026
2026.10.27.202 119 10/27/2026
2026.10.27.197 116 10/27/2026
2026.10.27.192 112 10/27/2026
2026.10.27.188 114 10/27/2026
2026.10.27.186 124 10/27/2026
2026.10.26.181 127 10/26/2026
2026.10.26.177 120 10/26/2026
2026.10.1.173 192 10/1/2026
Loading failed