6.1.1 Developer Guide — Architecture — Multi-Tenant Model — Central and Tenant Databases
The platform uses a multi-tenant architecture that separates shared system data from tenant-specific data. This model enables strong isolation, horizontal scalability, and independent lifecycle management while maintaining a unified application layer.
Architectural Overview
The architecture is composed of a central context and multiple tenant contexts. The central context manages global concerns, while each tenant context encapsulates its own operational data.
Core separation:
Central database for shared configuration and identity
Tenant databases for isolated business data
This separation ensures that tenant operations do not interfere with one another.
Central Database Responsibilities
The central database stores data that is global by nature and shared across all tenants.
Typical central data:
Tenant registry and domains
Global users and identity mappings
Subscription and billing references
Platform-wide configuration
Central data is never mixed with tenant business records.
Tenant Database Responsibilities
Each tenant has its own database or schema that stores tenant-scoped data.
Tenant data includes:
Content and media metadata
Inbox and Team Chat records
Analytics and usage data
Tenant-specific configuration
Tenant databases can be scaled, backed up, and restored independently.
Request Routing and Context Resolution
Incoming requests are resolved into a tenant context before accessing data. Context resolution occurs early in the request lifecycle.
Resolution signals may include:
Domain or subdomain
Explicit tenant identifier
Authenticated session context
Example resolution:
TenantContext::resolveFromRequest($request);Data Isolation Guarantees
Isolation is enforced at multiple layers.
Isolation mechanisms:
Separate databases or schemas
Tenant-scoped models and queries
Explicit context guards
Cross-tenant access is not permitted by design.
Lifecycle Management
Tenants have independent lifecycles. Provisioning, suspension, backup, and deletion are handled without affecting other tenants.
Lifecycle operations:
Tenant creation
Suspension and reactivation
Data export and deletion
Operational Considerations
The architecture supports horizontal scaling and fault isolation.
Operational benefits:
Reduced blast radius
Independent maintenance windows
Predictable performance
Security and Compliance
Multi-tenant isolation supports compliance requirements by preventing data commingling. Access controls are enforced consistently across central and tenant contexts.