Appearance
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):
- Basic Info — name, domain, environment, region, plan.
- Role — initial admin role.
- Tenant Settings — tenant configuration values.
- File Storage — storage provider + connection string (Azure/MinIO/S3/local).
- Initial User — first admin user.
- Summary — review and create.
Lifecycle actions
| Action | GraphQL mutation | What it does |
|---|---|---|
| Create | createTenant | Creates tenant row; ClientCreationService provisions Keycloak realm/client + SMTP and triggers POST /api/admin/migrate/{domainPrefix} on the tenant API |
| Activate | activateTenant | Enables the tenant |
| Deactivate | deactivateTenant | Disables it |
| Delete | deleteTenant | Soft-delete (full cleanup scheduled by TenantDeletionService when deleteOn passes) |
| Undelete | undeleteTenant | Restore a soft-deleted tenant |
| Recreate | recreateTenant | Rebuild a tenant |
| Sync | syncTenants | Re-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 andMeetingFinalizerService).
Related
- Environments — tenants belong to an environment.
- Api — Tenants & Admin — the tenant-facing config/migrate endpoints this flow drives.