Getting Started — Blazor Blueprint
Login Register

💡 The full stack — MongoDB or PostgreSQL / SQL Server, Redis, the API microservice, and the background worker — ships in one product. Run the pieces you need; MongoDB single-process is the simplest default.

Prerequisites

  • .NET 10.0 SDK - Download from Microsoft
  • Docker Desktop - For the database (MongoDB / PostgreSQL / SQL Server), Redis, and containerized deployment. Redis is optional — it backs the shared cache, the SignalR backplane, the Data Protection key ring and the job streams, none of which Lite mode uses
  • IDE: Visual Studio 2022, VS Code, or JetBrains Rider
  • Git - For version control

💡 Tip: .NET Aspire starts the database and Redis for you in development — dotnet run on the AppHost needs no pre-installed MongoDB.

🗄️ Pluggable data layer: The backend is selected by Database:DatabaseTypemongodb (default), postgresql, or sqlserver. The Aspire AppHost auto-provisions the matching database container for whichever you pick, MongoDB included, each with a data volume so your data survives a restart.

Installation

  1. Get the source: the repository link is on the Download page — grab it there, then clone into a directory of your own:
    git clone <repository-url> your-saas-app
    cd your-saas-app
  2. Restore dependencies:
    dotnet restore BlazorBlueprint.sln
  3. Build the solution:
    dotnet build BlazorBlueprint.sln
  4. Create your local secrets:
    cp init-user-secrets.template.ps1 init-user-secrets.ps1

    Edit the copy and run it. Three values are mandatory — the hosts refuse to start without them and name the missing key: Security:WebApp:ClientSecret, Services:InternalApi:ClientSecret and Security:Jwt:SecretKey (32+ characters). Everything else in the file is optional: email, AI and the external login providers stay switched off until you fill them in. Your copy is git-ignored, so real values never reach a commit.

Development Setup

Option 1: .NET Aspire (Recommended)

  1. Set Dev/BlazorBlueprint.AppHost as startup project in Visual Studio
  2. Press F5 or click Run
  3. Aspire dashboard opens automatically showing all services
  4. Click the Web endpoint to access your application

There is no separate "install a database" step — the AppHost provisions one.

✨ What Aspire Does: Starts the database container for your selected backend, Redis, the Web app, the API service, and the background worker, with networking and random ports wired up, and injects the database connection string into the apps. Each database runs with a data volume, so what you create survives a restart.

⚠️ Development vs Production: In development the database runs as a container the AppHost manages. In production it does not — point Database:ConnectionString at your own managed instance, or run the database service in the compose stack. That is a deployment choice, not a backend difference.

Option 2: Manual Setup

If you prefer not to use Aspire:

  1. Start the database and Redis: (default MongoDB backend shown)
    docker run -d --name mongodb -p 27017:27017 mongo:latest
    docker run -d --name redis -p 6379:6379 redis:latest

    Skip the Redis line if you are running the single-process shape: set Caching:UseRedisDistributedCache and Caching:UseRedisSignalRBackplane to false, Messaging:Transport to InProcess and BackgroundServices:RunInProcess to true — the same four keys the AppHost (Lite) launch profile sets for you.

  2. Update connection strings in appsettings.json:
    "Database": { "DatabaseType": "mongodb", "ConnectionString": "mongodb://localhost:27017" }
    "ConnectionStrings": { "redisCache": "localhost:6379" }

    Set DatabaseType to postgresql or sqlserver (with a matching ConnectionString) to run on a relational backend instead.

  3. Run the web application:
    dotnet run --project Web/BlazorBlueprint.Web

First Run

  1. Access the application: Navigate to the Web endpoint shown in the Aspire dashboard (port changes each run)
  2. Complete initial setup: A fresh install auto-redirects to /initial-setup, where you create the first Owner account and the platform organisation. (The Register page is for later members — it creates a regular member, not an admin.) Running locally this needs nothing further, because the request is loopback. In a container it is not — the port is published, so the app sees the request arriving from the Docker bridge gateway — and the deploy compose files name that network (Security__Setup__TrustedNetworks__0=172.16.0.0/12) to keep first run a single click. Remove that line and setup falls back to a setup token the app writes to its log; see Security → Initial setup.
  3. Land on the app launcher: After signing in (and any org selection / creation), you'll land on /apps — an Odoo-style tile grid of installed plugins plus an Admin tile for organisation settings and a Platform Admin tile for platform-level management. The launcher is the canonical home for signed-in members and is controlled by Features:AppLauncher (default on).
  4. Build and explore plugins: One plugin ships — the Weather example in Plugins/Weather/, which exists to demonstrate the IPlugin contract end to end rather than to be a feature. It auto-installs into every organisation, so you will see its tile on the launcher immediately; delete it once you have read it. Your own plugins go beside it. Each installed plugin opens from the launcher into its own dashboard under a plugin-specific sidebar (/plugin/{your-plugin}/...), with settings under /admin/plugin/{your-plugin}/....
  5. View infrastructure: Visit Infrastructure Monitor to see system status (requires a platform admin account)

🎯 Next Steps: If you want to run the org as a private workspace (members-only, no public site), turn off the Public workspace switch in /Admin/Pages. Anonymous visitors then bounce to sign-in and the org is excluded from robots.txt + sitemap.xml.

Running the Tests

dotnet test BlazorBlueprint.sln --configuration Release

Most tests are backend-agnostic and run against in-memory fakes, so they need nothing installed. Two groups are different, and it is worth knowing which:

  • Relational backend suites need a real PostgreSQL or SQL Server to talk to.
  • MongoDB serialization suites spin up a container, so they need Docker running.

⚠️ Those suites self-skip when their database isn't reachable — and a run full of skips still reports success. A green local run therefore does not mean the relational backends were exercised. Two practical consequences: check the skip count, not just the exit code; and if you change anything in the data layer, run those suites against a real database before believing them. A missing EF migration is the classic case — it passes locally, then fails in CI.

Ready to Build?

Get it running locally in an afternoon. The complete source is free to use — including commercially — while your business earns under £100k/year. Past that, a one-time commercial licence (from £499, excl. VAT) applies. Every tier ships the same product; nothing is feature-gated.

🔓 Source-available • Free under £100k/yr revenue • Commercial licence (from £499) above that • Full source code included

An unhandled error has occurred. Reload

Connection lost

Trying to reconnect to the server…

Attempt 1 of 30, retrying in 0s

Could not reconnect

Check your internet connection, then try again.

Session expired

The server could not resume your session. Reload the page to carry on.