Tenants
Each tenant is an isolated workspace with its own database, storage, users and branding.
How tenancy works
Fchat uses domain-based tenancy. When a request comes in:
- If the hostname is in
APP_CENTRAL_DOMAINS, the request hits the central app (super admin, landing, signup). - Otherwise the framework looks up the host in the
domainstable and switches the database connection to that tenant's database, scopes Redis and storage to the tenant id, and runs the request inside that context.
You never see another tenant's data, even by accident.
Creating a tenant
Self-service signup
Anyone can land on https://fchat.example.com/signup, pick a slug, fill in their admin info and the platform creates their workspace automatically. They are redirected straight into their new admin.
From super admin
Sign in at https://admin.fchat.example.com → Tenants → Create tenant. Useful for hand-onboarding paying customers.
Impersonate a tenant
From the super admin tenant detail page, click Login as. You land directly in the tenant admin as the operator user, with a banner that says you are impersonating.
Suspending a tenant
Tenants who fail to pay their platform subscription enter a grace period (default 3 days), then suspension. Suspended tenants see a "site paused" page; their data remains intact. Reactivate them at any time by re-collecting payment.
Deleting a tenant
From the super admin tenant page, choose Drop database. Confirm by typing the tenant slug. This:
- Deletes the tenant's database.
- Deletes their storage bucket.
- Removes all
domainsrows. - Keeps the
tenantsrow in central DB (for billing history) - mark it manually as deleted.
Subscription plans
Plans you sell to tenants live in the central DB. Edit them at Super Admin → Plans:
- Name, price (monthly + yearly), Stripe price ID.
- Limits: max users, storage GB, channels, messages.
- Feature flags: livestream, cam2cam, KYC, custom domain.
Branding per tenant
Each tenant operator sets their own logo, colours, login page imagery, sales URL and legal pages. The defaults inherit from your platform branding (set in super admin).