HaloRT isolates each community as a tenant. Business data is scoped by tenant_id in MariaDB via Prisma on the platform API.

Tenant resolution (API)

Rough order in the tenant plugin:

  1. X-Halort-Tenant-Slug header
  2. Subdomain slug from Host ({slug}.halort.com or .halort.test)
  3. Custom domain lookup
  4. Dev fallback TENANT_SLUG

Platform web mirrors this with Host + X-Halort-Tenant-Slug and NEXT_PUBLIC_TENANT_SLUG for local fallback. Mobile apps send the same header / env (HALORT_TENANT_SLUG).

Central vs tenant hosts

Central (no community context): app.halort.com, api.halort.com, www.halort.com, halort.com, plus design/docs/notifications.

Tenant: {slug}.halort.complatform-web public site for that community. Wildcard DNS *.halort.com already points at the ingress LB; exact reserved hosts (docs, design, …) win via their own Ingress objects.

Env knobs: HALORT_DOMAIN, HALORT_CENTRAL_DOMAINS.

Onboarding

  1. Visitor registers a community on marketing /daftar (Surfaces/Marketing Web)
  2. Super-admin reviews at app.halort.com/platform
  3. Approval provisions the tenant and patches {slug}.halort.com onto the platform-web Ingress