Back to Blog
Architecture

The Real SaaS Data Model: Tenants, Apps, Customers, and Subscriptions

December 5, 20257 min read
The Real SaaS Data Model: Tenants, Apps, Customers, and Subscriptions

Why Your Data Model Matters

Most billing systems are flat. One account, one subscription, done. But real SaaS products need hierarchy.

The StackBE Model

We've built a data model that reflects how real SaaS businesses operate:

Tenant → App → Products → Plans → Customers → Subscriptions

Let's break it down.

Tenants: Your Organization

A tenant is your organization—the entity that owns everything. One tenant can run multiple apps, each with its own:

  • Products and pricing
  • Customer base
  • API keys
  • Webhooks
  • This is perfect for agencies, platforms, and companies with multiple products.

    Apps: Your Products

    Each app is a self-contained SaaS product. Think of it as a workspace. You might have:

  • A production app
  • A staging app
  • An experimental app
  • Each completely isolated, but all under one tenant.

    Products & Plans: What You Sell

    Products describe value. Plans describe pricing.

    A product might be "Pro Access" with plans for:

  • Monthly at $29/mo
  • Yearly at $290/yr
  • With a 14-day trial
  • Customers: Who Pays

    Customers are scoped to apps. The same email can exist in multiple apps without collision. Each customer has:

  • Email-based identity
  • Optional external user ID
  • Full subscription history
  • Subscriptions: The Revenue Engine

    Subscriptions tie customers to plans. They track:

  • Lifecycle state (trialing, active, past-due, canceled)
  • Billing periods
  • Renewal dates
  • Payment history
  • Why This Matters

    This model lets you:

  • Run multiple SaaS products under one account
  • Keep data boundaries clean
  • Scale without restructuring
  • Support real-world complexity
  • It's not the simplest model. It's the right model.