FchatFchat Docs
Fchat
Fchat Documentation
Everything you need to install, run and operate your platform.
v1.0.0
Step 6

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:

  1. If the hostname is in APP_CENTRAL_DOMAINS, the request hits the central app (super admin, landing, signup).
  2. Otherwise the framework looks up the host in the domains table 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.comTenantsCreate 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.

i
Why impersonate?
Support cases. The token expires in 5 minutes and is invalidated after the first redemption.

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 domains rows.
  • Keeps the tenants row in central DB (for billing history) - mark it manually as deleted.
!
Drop is permanent
There is no soft-delete for tenant databases. Back up first.

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).