Multi-tenant SaaS | Dashforge-UI
Dashforge-UI
DocsStarter Kits

Multi-tenant SaaS

v1.0.0

Build Software-as-a-Service applications with complete tenant isolation, subscription management, billing integration, and team collaboration features. Perfect for B2B SaaS products.

Preview Demo

Welcome to Multi-tenant SaaS

Build enterprise-grade SaaS applications with this comprehensive multi-tenant starter kit. Includes tenant isolation, subscription management, billing, and team collaboration out of the box.

What's Included

  • Tenant Management - Complete workspace/organization management with isolation
  • Subscription Plans - Flexible plan tiers with feature gating
  • Billing Integration - Stripe Billing integration with invoicing
  • Team Collaboration - Invite team members with role-based permissions
  • User Management - Manage users across multiple tenants
  • Settings & Preferences - Tenant-level and user-level settings
  • Audit Logs - Track all actions for compliance and security
  • API Integration - RESTful API with tenant-scoped endpoints
  • White Labeling - Customize branding per tenant

Tech Stack

  • React 18
  • TypeScript
  • DashForm for complex forms
  • Material-UI components
  • Stripe Billing for subscriptions
  • React Router with tenant routing
  • TanStack Query for data management
  • Vite for development

Getting Started

  1. Download and extract the starter kit
  2. Install dependencies: npm install
  3. Configure environment variables in .env
  4. Set up Stripe Billing products
  5. Start development server: npm run dev
  6. Create your first tenant organization

Prerequisites

  • Node.js 18 or higher
  • npm or yarn
  • Stripe account with Billing enabled
  • PostgreSQL or MySQL database (for tenant data)
  • Understanding of multi-tenancy concepts

Project Structure

multitenant-saas/
├── src/
│   ├── components/
│   │   ├── Tenant/
│   │   ├── Subscription/
│   │   ├── Team/
│   │   └── Settings/
│   ├── pages/
│   │   ├── Dashboard.tsx
│   │   ├── Organization.tsx
│   │   ├── Team.tsx
│   │   └── Billing.tsx
│   ├── services/
│   │   ├── tenant/
│   │   └── subscription/
│   ├── hooks/
│   └── main.tsx
├── package.json
└── README.md

Key Features

Tenant Isolation

Complete data isolation between tenants. Each organization has its own workspace with separate data and settings.

Subscription Management

Flexible subscription plans with:

  • Free, Starter, Pro, and Enterprise tiers
  • Feature gating based on plan
  • Automatic billing and renewals
  • Upgrade/downgrade flows
  • Usage-based billing support

Team Collaboration

Invite team members with granular permissions:

  • Owner, Admin, Member, and Guest roles
  • Custom role creation
  • Permission-based UI rendering
  • Team activity tracking

Billing & Invoicing

Integrated Stripe Billing:

  • Automatic invoice generation
  • Payment method management
  • Billing history and receipts
  • Failed payment handling
  • Proration for plan changes

Settings Management

Multi-level settings:

  • Tenant-level (organization settings)
  • User-level (personal preferences)
  • Plan-based feature flags
  • Custom domain configuration

Audit Logging

Track all important actions:

  • User authentication
  • Data modifications
  • Permission changes
  • Billing events
  • Export for compliance

Tenant Architecture

This kit uses a shared database with tenant identifier approach:

  • Single application instance serves all tenants
  • Database rows tagged with tenant_id
  • Middleware ensures tenant isolation
  • Optimized for performance and cost

Subscription Plans

Configure plans in src/config/plans.ts:

const plans = {
  free: {
    price: 0,
    features: ['5 users', 'Basic support'],
  },
  pro: {
    price: 49,
    features: ['Unlimited users', 'Priority support', 'Advanced analytics'],
  },
  // ...
};

Stripe Configuration

Set up Stripe in .env:

VITE_STRIPE_PUBLIC_KEY=pk_live_...
VITE_STRIPE_PRICE_FREE=price_...
VITE_STRIPE_PRICE_PRO=price_...
VITE_STRIPE_PRICE_ENTERPRISE=price_...

Backend Requirements

For production, you'll need:

  1. API server with tenant-scoped endpoints
  2. Database with tenant isolation
  3. Stripe webhook handlers for billing events
  4. Email service for notifications
  5. Background jobs for subscription management

Mock API included for frontend development.

White Labeling

Customize appearance per tenant:

  • Custom logos and colors
  • Custom domain support
  • Branded email templates
  • Tenant-specific settings

Support

Enterprise support available:

License

Commercial license with extended terms for SaaS applications. Contact us for enterprise licensing options.

Details

Version

1.0.0

Last Updated

March 22, 2024

Pricing

$299 USD

One-time purchase

Buy NowPreview Demo

Details

Version

1.0.0

Last Updated

March 22, 2024

Pricing

$299 USD

One-time purchase