Skip to content

Get started ​

The template is on nuget.org as LibreSharp.Templates.SaasStarter. It creates a complete app that you then own: there's no runtime package to update, and the code is yours to change. Why this template says what it includes, compared with paid starter kits.

What you need ​

  • The .NET 11 SDK. Check with dotnet --list-sdks. If you installed it with the dotnet-install script, it's in ~/.dotnet, which isn't on your PATH by default: add export DOTNET_ROOT=$HOME/.dotnet and export PATH=$DOTNET_ROOT:$PATH to your shell profile.
  • Node.js 22.22 or later, with npm.
  • Docker with the Compose plugin. PostgreSQL and Mailpit run in Docker for development, and the tests start their own PostgreSQL. Check with docker compose version. On Ubuntu, Debian and Mint, the docker.io package doesn't include Compose: also install docker-compose-v2, and add yourself to the docker group (sudo usermod -aG docker $USER, then sign out and in).

Create an app ​

bash
dotnet new install LibreSharp.Templates.SaasStarter
dotnet new saas-starter -n MyApp
cd MyApp
git init && git add -A && git commit -m "Generated from LibreSharp.Templates.SaasStarter"
ToRun
Update the template to the latest versiondotnet new update
Install a specific versiondotnet new install LibreSharp.Templates.SaasStarter@0.10.0
See the template's optionsdotnet new saas-starter --help
Uninstall itdotnet new uninstall LibreSharp.Templates.SaasStarter

Commit the app as generated, before changing it. Upgrading to a later version of the template works best when that first commit is in your history.

Run it ​

bash
docker compose up -d                 # PostgreSQL (and, with accounts, Mailpit)
dotnet run --project src/MyApp       # the API; leave it running

In a second terminal:

bash
cd src/Client
npm install
npm run dev                          # open http://localhost:5173

With accounts, sign in as demo@example.com with the password Demo123!: it's created in Development only, already confirmed and an admin, and the login form is filled in with it. Change it under DevelopmentUser in appsettings.Development.json and in src/Client/.env.development. The emails the app sends in Development land in Mailpit at http://localhost:8025.

With --Aspire true, dotnet run --project src/MyApp.AppHost starts all of it instead, once npm install has run in src/Client (how).

If something doesn't start, Troubleshooting has the usual causes, by the message you see.

Choose the options ​

The options decide what the app has: accounts, organisations and billing (--Auth), Marten or EF Core (--Persistence), the tests, and an Aspire AppHost. Generate an app lists them all, with what each one gives you. For example, an app with accounts but no organisations, on EF Core:

bash
dotnet new saas-starter -n MyApp --Persistence efcore --Auth identity

Next ​

The same guides are in your app's docs/ folder, with only the parts for the options you chose.

For AI coding assistants

The whole site is available as plain Markdown: llms.txt lists the pages, and llms-full.txt has them all in one file. Every page also has a .md copy at its address. In your app, AGENTS.md points assistants at the app's own docs/.

Documentation for v0.10.0. Released under the MIT licence.