Build a multi-tenant SaaS

Take an application from your Development environment to customers who subscribe to it as tenants of their own.

Level
Advanced
Estimated time
About 90 minutes
Uses
Tenants, Environments, Releases, Subscriptions

What you will build

An app owned by your tenant, released from Development to QA, and subscribed to by a customer tenant that receives its own copy of the app's configuration.

Architecture

  1. Tenant
  2. App
  3. Environment
  4. Subscription

Steps

  1. 1Understand the model

    Your tenant owns the app. The app has Development, QA and Production environments, each with its own database connection and a pinned release version. Customer tenants subscribe to the app and share its tables, separated by the platform's record-level tenant scope.

  2. 2Release to QA

    In TAF Studio create a release, select the definitions to include, compare Development with QA, and apply. QA now runs the release version, and your configuration data and migration scripts are applied in foreign-key order.

  3. 3Define plans

    Create a package version for the app with its capabilities and seat limits, and publish it. Plans can include a trial.

  4. 4Subscribe a customer

    When a tenant subscribes, the platform copies the app owner's access rules and template configuration data into the subscriber's scope and notifies them when the app is ready. Seat limits are enforced when users are added.

  5. 5Operate subscriptions

    Subscriptions move through trial, active, past due, grace, read-only and cancelled states. Scheduled jobs handle lapses and reconcile payments.

Result

One application, released through your environments, used by several customer tenants under their own subscriptions.

Screenshots

Step-by-step screenshots for this tutorial are coming soon.