Skip to Content
Engineering11 Documentation 🔥

Tenant Bootstrap API

Multi-tenant initialization and configuration management with branding and theming.

What It Does

The Tenant Bootstrap API manages tenant initialization and configuration for multi-tenant SaaS applications. It handles tenant branding, theming, authentication settings, and notification configuration with synchronized storage between Firestore and Cloud Storage for CDN delivery.

Key Capabilities

  • Tenant Configuration: Complete tenant setup and customization
  • Multi-Host Support: Primary and additional domain aliases
  • Synchronized Storage: Firestore (authoritative) + GCS (CDN delivery)
  • Branding Customization: Logos, company names, favicons
  • Theme System: 25+ CSS color variables for comprehensive theming
  • Auth Integration: Firebase Identity Platform tenant configuration
  • Notification Templates: Email branding and path configuration
  • Data Integrity: Immutable field protection during updates

Data Models

ITenantBootstrap

{ id: string customerKey?: string name: string url: string additionalHosts?: string[] auth: IBootstrapAuth theme: IBootstrapTheme brand: IBootstrapBrand notification: IBootstrapNotification basePlatformHost: string type: 'Business' | 'Consumer' }

IBootstrapAuth

Authentication configuration:

  • displayName, tenantName, tenantId
  • host, hostName, apexDomain
  • reCaptchaSiteKey, reCaptchaKeyName

IBootstrapTheme

25+ CSS variables including:

  • Primary, secondary, complementary colors
  • App background and borders
  • Status colors (info, success, alert, warning, danger, error)
  • Text colors (base, dark, light, extra-light + status variants)

IBootstrapBrand

Branding assets:

  • logoImageUrl, logoImageDarkUrl, logoImageLightUrl
  • companyName, appName
  • favIconUrl, favIconNotificationUrl

IBootstrapNotification

Email configuration:

  • emailLogoUrl, emailFrom
  • emailCompanyName, emailPlatformName
  • Email path templates (invite, verify, reset)

Main Service

TenantBootstrapService

create(bootstrap, bucket) update(editableBootstrap, hostSettings, bucket) get(id) / getOrError(id) getFromHostName(hostName) getFromAuthTenantId(authTenantId) getForCustomerTenant(customerKey) getAllForType(type) delete(bootstrapId, bucket) refreshBootstrapStorageObject(id, bucket)

Storage Structure

Bootstrap files stored at:

assets/bootstrap/{hostname}/bootstrap.json

Separate files for each host (primary + additional hosts).

Validation

  • Display Name: 4-20 chars, alphanumeric + hyphens, starts with letter
  • Host Name: Valid hostname format
  • Apex Domain: Valid domain format

Common Use Cases

  • Multi-tenant SaaS platform configuration
  • White-label application branding
  • Per-tenant theming and customization
  • Firebase Identity Platform tenant management
  • Email template personalization
  • CDN-delivered configuration

What Customers Don’t Have to Build

  • Multi-tenant configuration management
  • Firestore-Storage synchronization
  • Branding and theming infrastructure
  • Firebase tenant configuration
  • Multi-host domain support
  • Bootstrap file distribution
  • Immutable field protection
  • URL construction utilities
  • View model transformation
  • Configuration validation
Last updated on