CleanWebApi.Template 2026.11.1.122

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

Clean Web API

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

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/webapi.

Requirements

Install

dotnet new install CleanWebApi.Template

Create a solution

dotnet new cleanwebapi --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: ASP.NET Core controllers, 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 CleanWebApi.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.122 121 11/1/2026
2026.10.29.102 110 10/29/2026
2026.10.29.93 108 10/29/2026
2026.10.28.86 107 10/28/2026
2026.10.28.84 104 10/28/2026
2026.10.28.79 98 10/28/2026
2026.10.28.77 97 10/28/2026
2026.10.28.75 107 10/28/2026
2026.10.28.71 102 10/28/2026
2026.10.28.66 103 10/28/2026
2026.10.27.64 108 10/27/2026
2026.10.27.62 97 10/27/2026
2026.10.27.59 101 10/27/2026
2026.10.27.56 97 10/27/2026
2026.10.27.49 103 10/27/2026
2022.9.25.19 1,235 9/25/2022
2022.9.18.18 1,081 9/18/2022
2022.9.11.17 1,047 9/11/2022
2022.9.4.16 1,054 9/4/2022
2022.8.28.15 1,031 8/28/2022
Loading failed