A free, open-source dotnet new template for a SaaS app. One command gives you a working app
with organisations and invitations, plans and Stripe billing, accounts with passkeys and two-factor
authentication, and a back office, on WolverineFx, PostgreSQL and
React, deployed as a single ASP.NET Core app.
dotnet new install LibreSharp.Templates.SaasStarter
dotnet new saas-starter -n MyAppDocumentation · Get started · Features · Upgrading an app · Roadmap
A generated app with --Auth saas (the default), in light and dark mode:
![]() |
![]() |
![]() |
![]() |
- What paid starter kits sell, for free. Organisations, billing, a back office, and accounts done properly, on MIT, Apache-2.0 and PostgreSQL-licensed packages only. No licence keys, no "community edition" limits.
- Messaging you can rely on, without a broker. Wolverine handles HTTP endpoints, background messages, retries and scheduling, with a transactional outbox in PostgreSQL: the jobs usually given to MediatR and MassTransit, in one free library.
- Cheap to run. One container and PostgreSQL. A production
docker-composewith Caddy for HTTPS runs on a small VPS, with a step-by-step guide. - Yours to change. The code is generated into your repository, with docs that explain each pattern and a guide for upgrading when the template moves on.
Why this template goes through what paid starter kits sell, and where each is in this one.
- Tested in every shape. CI builds, tests and runs all 12 option combinations against a real PostgreSQL on every change, with end-to-end tests in a real browser.
flowchart LR
browser["Browser<br/>React, Vite, shadcn/ui"]
subgraph host["One ASP.NET Core app"]
endpoints["Wolverine HTTP endpoints"]
handlers["Background message handlers"]
hub["SignalR"]
end
db[("PostgreSQL<br/>data and messages")]
browser -- "/api" --> endpoints
endpoints -- "changes and messages,<br/>one transaction" --> db
db -- "durable queues" --> handlers
handlers --> hub
hub -- "live updates" --> browser
Every app has the architecture
explained in its docs/ folder, with a worked example of each pattern, and a
tutorial that builds a feature
from start to finish. AI coding assistants can read the documentation as
llms.txt.
You need the .NET 11 SDK, Node.js 22.22 or later, and Docker with Compose (details).
dotnet new install LibreSharp.Templates.SaasStarter
dotnet new saas-starter -n MyApp
cd MyApp
docker compose up -d # PostgreSQL and Mailpit
dotnet run --project src/MyApp # the API; leave it runningIn a second terminal:
cd MyApp/src/Client
npm install
npm run dev # open http://localhost:5173Sign in as demo@example.com with Demo123! (Development only), and read the app's emails in
Mailpit at http://localhost:8025.
| Option | Values | Default | |
|---|---|---|---|
--Auth |
saas, identity, none |
saas |
saas: organisations, billing and accounts. identity: accounts without organisations. none: no accounts |
--Persistence |
marten, efcore |
marten |
Marten (documents and event sourcing) or EF Core, both on PostgreSQL |
--IncludeTests |
true, false |
true |
API, client and end-to-end tests |
--Aspire |
true, false |
false |
An Aspire AppHost that starts everything for development |
--DisplayName |
text | the -n name |
The name people see (page titles, the sidebar, emails, authenticator apps), such as "Hairy Notes" |
For example: dotnet new saas-starter -n MyApp --Auth identity --Persistence efcore.
Organisations (saas) |
Every account gets one; members, Owner/Admin/Member roles, email invitations, a switcher, and data kept apart by Wolverine's multi-tenancy |
Billing (saas) |
A plan catalogue with versions, a reverse trial, features and limits checked in one place, Stripe Checkout, the customer portal and webhooks |
Back office (identity, saas) |
Users, an audit log and failed messages to replay; with saas, also organisations, revenue and feature flags |
Accounts (identity, saas) |
ASP.NET Core Identity with JWT and rotating refresh tokens, email confirmation, Google and GitHub, passkeys, two-factor authentication, sessions, security emails and lockout |
Integrations (saas) |
API keys, an MCP endpoint for AI assistants, signed outgoing webhooks with retries, incoming webhooks, and encrypted secrets |
| Messaging | A transactional outbox, durable queues, scheduled messages, and live updates over SignalR |
| Data | Marten with event sourcing, or EF Core; file storage on disk, S3-compatible stores or Azure Blob Storage |
| Frontend | React, React Router, TanStack Query, Tailwind CSS and shadcn/ui, dark mode, pre-rendered public pages, and a typed API client |
| Privacy | Cookie consent for analytics; with accounts, download your data, account deletion and versioned terms |
| Production | A container image, Docker Compose with Caddy, health checks, OpenTelemetry, strict security headers and rate limits |
| Security | Reviewed against OWASP ASVS level 2, requirement by requirement; security events in the logs |
| Accessibility | WCAG 2.2 AA on every page, light and dark, checked by axe in the end-to-end tests |
| Tests | xUnit v3, Alba and Testcontainers against a real PostgreSQL; Vitest; Playwright end to end |
Every item, in detail, is on the Features page.
- ROADMAP.md: what each version added, what's next, and the backlog.
- Release notes (also in docs/releases): what changed in each version and what to know when upgrading, with upgrade guides.
Issues and pull requests are welcome.
- docs/CONTRIBUTING.md: how the template is laid out, conditional code, testing a change, regenerating the client's API types, EF Core migrations, and the docs site.
- docs/releasing.md: publishing a version to nuget.org.
- docs/decisions.md: why things are the way they are.
- SECURITY.md: how to report a vulnerability, privately.
To try unreleased changes, install the template from a clone: dotnet new install ./ (and
dotnet new uninstall ./ to remove it). The nuget.org page shows nuget/README.md.
Part of LibreSharp, which collects free alternatives to .NET
packages that went commercial. A community template, not an official WolverineFx or JasperFx
package. Up to 0.4.0 it was LibreSharp.Templates.WolverineFxReact (dotnet new wolverine-react). MIT licence.



