Skip to content
UT Studio
Starter kitsFlagship

SaaS Starter Kit

A complete multi-tenant SaaS foundation with organisations, roles and billing seams already wired.

Latest version
2.1.0
Updated
Difficulty
Intermediate
Licence
Pro

Overview

Every SaaS rebuilds the same four things before it can sell anything: an ownership model, roles, billing seams and a settings surface. This kit ships all four, built the way the UT Studio platform itself is built — an Organization owns everything, entitlements are separate from payment state, and nothing is coupled to a specific payment provider.

Live demo

Atlas is the interactive demo built on this kit: the overview, projects, team and billing screens, running here with sample data. No account needed.

Open the Atlas demo

Screenshots

Organisation settings with role management

Organisation settings with role management

Five-minute architecture walkthrough

Video is not yet available for this product.

Features

  • Organisations and roles

    Personal accounts convert to teams without a migration. Owner, admin, billing and member roles, with invitations.

  • Entitlements, not payment checks

    Feature access is derived from entitlements. A failed payment does not lock a customer out mid-deployment.

  • Webhook inbox

    Provider callbacks are persisted before processing, uniqued on the provider event id. Duplicate webhooks cannot double-charge.

  • Transactional outbox

    Domain events commit with the change that caused them, so a side effect is never silently lost.

  • Audit log

    Every consequential action recorded with actor, diff and reason. Retrofitting this is close to impossible.

  • Typed end to end

    Strict TypeScript with no escape hatches, and business rules as pure functions with exhaustive tests.

Architecture

Organisation-owned, provider-agnostic

Every purchasable thing belongs to an Organization rather than a User, so converting a personal account into a team is a flag change and an invitation rather than a data migration. Payment providers sit behind one interface, and authorization is derived from entitlements rather than read from payment state — which is what lets you change provider without touching the code that guards features.

Architecture
User ──< Membership >── Organization ──1:1── BillingProfile
                              │
                              ├──< Subscription ──▶ Entitlement
                              └──< Invoice

Tech stack

Built with

What the product is implemented in.

Requires

What you must already have. These block installation.

Works alongside

Verified to work with, but not required.

Folder structure

Folder structure
apps/
  web/                Next.js application
packages/
  core/               errors · result · logger · money · ids
  db/                 Prisma schema · repositories
  services/           domain services (billing, org, entitlement)
  ui/                 design tokens and primitives
  config/             every tunable value

Requirements

Node.js
≥ 22.12LTS or current
Package manager
pnpm ≥ 10npm and yarn also work
Operating system
macOS, Linux, Windows (WSL2)
PostgreSQL
≥ 14Neon, Supabase and RDS all tested

Installation

  1. Unpack the download

    The archive contains the full source. There is no installer and no post-install script.

    bash
    unzip saas-starter-kit.zip
    cd saas-starter-kit
  2. Install dependencies

    bash
    pnpm install
  3. Configure the environment

    Copy the example file and fill in the variables listed under Environment variables.

    bash
    cp .env.example .env

Quick start

  1. Start the development server

    bash
    pnpm dev
  2. Verify the install

    Runs formatting, lint, type-check, tests and a production build.

    bash
    pnpm check

Environment variables

Environment variables
VariableRequiredDescription
DATABASE_URLRequiredPostgreSQL connection string. Use a pooled endpoint in serverless environments.postgresql://user:pass@localhost:5432/app
NEXT_PUBLIC_APP_URLRequiredAbsolute origin of the deployment. Used for canonical URLs and metadata.https://app.example.com
LOG_LEVELOptionaldebug | info | warn | error. Defaults to info in production.
STRIPE_SECRET_KEYOptionalOnly needed once billing is enabled. The kit runs fully without it.

Configuration

  • Licence tiers

    Tiers are rows, not code. Add one by inserting a policy with the dimensions it confers.

    packages/db/prisma/seed.ts
  • Design tokens

    Colour, spacing, radius and motion are CSS custom properties. Rebranding is a one-file change.

    packages/ui/src/styles/theme.css
  • Feature flags

    Every optional surface is behind a flag from the day it is built, so turning one off is a row rather than a search.

    packages/ui/src/lib/features.ts

Deployment

  • Vercel

    Zero-config. Set the environment variables listed above and connect the repository.

  • Docker

    A multi-stage Dockerfile is included, producing a standalone image with no build toolchain.

  • Any Node host

    Builds to a standard Node server. Nothing depends on a platform-specific runtime.

Compatibility

Framework and runtime versions this product supports
TechnologyVersionsStatus
Next.js≥ 15 < 17Supported
React≥ 19Supported
PostgreSQL≥ 14Supported
Node.js≥ 22.12Supported
Next.js14.xDeprecated

Works, but the App Router caching model differs. Support ends with 3.0.

Pages RouteranyNot supported

The kit is App Router only.

What changed in 2.1.0

Seat reassignment cooldown and a rebuilt invitation flow.

  • addedSeat reassignment cooldown, configurable per policy.
  • changedInvitations now create the user and the membership in one transaction.
  • fixedDuplicate webhook delivery could issue a second entitlement.

Version history

  1. 2.1.0

    Seat reassignment cooldown and a rebuilt invitation flow.

    • addedSeat reassignment cooldown, configurable per policy.
    • changedInvitations now create the user and the membership in one transaction.
    • fixedDuplicate webhook delivery could issue a second entitlement.
  2. 2.0.0

    Organisation-owned model. A breaking change with a migration guide.

    • changedPurchases belong to an Organization rather than a User.Breaking
    • removedThe legacy per-user licence table.Breaking
    • addedTransactional outbox for domain events.
  3. 1.4.2

    Security fix in session rotation.

    • securitySession tokens were not rotated on privilege change.

Dependencies

  • recommendsUT UI Library

    The kit ships its own tokens; this replaces them with the full component set.

  • requiresPostgreSQL≥ 14

Roadmap

  1. In progressQ4 2026

    Usage-based billing

    Metered entitlements with an aggregation window.

    • Billing
  2. PlannedQ1 2027

    SAML single sign-on

    Enterprise identity via the existing AuthIdentity seam.

    • Auth
  3. ExploringUnscheduled

    Audit log export

    Signed CSV and JSON export for compliance review.

Documentation

Recommended reading

Support

Frequently asked questions