Skip to main content

D12 — Architecture: central = Livewire backoffice, tenant = headless REST API

Architecture decision record, relocated verbatim from the retired single-file docs/tenancy/ decision log. Status, thematic clusters, and how to record a new ADR: the decision log index.

  • Central app (backoffice): Livewire 4 + Flux, Fortify session auth, runs in CENTRAL context (BYPASSRLS). Routes in routes/web.php + routes/settings.php. Never initializes tenancy. Operators see across tenants (subject to backoffice authorization).
  • Tenant app (client-facing): a separate TanStack Start SPA consuming this app as a headless REST API under /api/* in routes/tenant.php, identified by the X-Tenant header (request-data). Stateless; auth (Sanctum/token) + the tenant.member guard layer on top. Runs in TENANT context (RLS role).

← Decision log index