Business Suite

This domain is not mapped to a tenant

Host business.modavi.me is not an active row in tenants.domain. The suite is white-label: each request is resolved from Host to one tenant, then that tenant's theme, logo, and Clerk org are loaded.

How host resolution works
DNS (or localhost) must point at this app. The proxy then looks up the bare hostname — no scheme, no path.

Stored domains look like clienta.modavi.me or localhost:3004. The value is unique. status must be active; disabled tenants do not load.

After a matching row exists, reload this host. The tenant theme (JSON on the row) is applied as CSS variables, then sign-in and the dashboard use that tenant.

Add or update a tenant row
Set domain to this host and put theme tokens in theme.
insert into tenants (slug, name, domain, theme, status)
values (
  'acme',
  'Acme',
  'business.modavi.me',
  '{
    "primary": "oklch(0.205 0 0)",
    "primary_foreground": "oklch(0.985 0 0)",
    "background": "oklch(1 0 0)",
    "foreground": "oklch(0.145 0 0)"
  }'::jsonb,
  'active'
);

To attach an existing tenant instead, update that row's domain, keep status = 'active', and set theme to the token map you want (keys such as primary, background, sidebar colors). Point clerk_org_id at the Clerk organization whose members should access this host.