Skip to content

Tenants

  • Frontend: src/routes/private/tenants/ · Backend: Features/Tenants/

Overview

Tenants are the customer installations of HVC (each with its own Keycloak realm, SQL database, and subdomain). The Admin Console creates, configures, and manages the tenant lifecycle. Onboarding provisions a Keycloak realm/client and runs the tenant DB migration via the tenant API.

Tenant creation wizard

Route /private/tenants → multi-step create (_cmp/ components):

  1. Basic Info — name, domain, environment, region, plan.
  2. Role — initial admin role.
  3. Tenant Settings — tenant configuration values.
  4. File Storage — storage provider + connection string (Azure/MinIO/S3/local).
  5. Initial User — first admin user.
  6. Summary — review and create.

Lifecycle actions

ActionGraphQL mutationWhat it does
CreatecreateTenantCreates tenant row; ClientCreationService provisions Keycloak realm/client + SMTP and triggers POST /api/admin/migrate/{domainPrefix} on the tenant API
ActivateactivateTenantEnables the tenant
DeactivatedeactivateTenantDisables it
DeletedeleteTenantSoft-delete (full cleanup scheduled by TenantDeletionService when deleteOn passes)
UndeleteundeleteTenantRestore a soft-deleted tenant
RecreaterecreateTenantRebuild a tenant
SyncsyncTenantsRe-sync tenant data (e.g. after config drift)

Backend notes

  • ClientCreator (Services/ClientCreator.cs) — the Keycloak realm/client/email configuration logic.
  • TenantDeletionService — removes all tenant rows across tables (incl. chat tables) once the deletion date is reached.
  • Tenants are resolved to the admin DB via externalTenantId ↔ tenant mapping (see Sink and MeetingFinalizerService).

Released under the MIT License.