Skip to content

Application routes and navigation

The React entry mounts SupabaseApp, whose data router owns URL state and supports editor navigation blockers. Auth, impersonation, query, theme and UI providers surround the route tree. Public routes and authenticated portal surfaces have different entry conditions.

The current route declarations are authoritative for supported paths. Navigation is a selected set of links for a role; it is not an exhaustive route list or an authorization matrix. The API and SQL policies independently enforce access.

Entry family Declared paths or examples Frontend condition
Public quote and UE registration /quote/public/:shareToken, /register/ue Public route; the flow validates its own token/input and domain state
Link confirmation and reset /magic-link/confirm, /portal/confirm, project-specific confirmation, /reset-password Dedicated authentication/recovery flow
Internal office /dashboard, /customers, /quotes, /projects, /planning, /costs, reports and settings Session and verified selected company, principal staff shell, then route capabilities
Principal worker /worker, assigned-project detail and personnel-register route Worker guard excluding UE companies
Field /falt Principal staff or worker surface; UE excluded
Customer /customer, paired customer/company detail and project detail Authenticated portal, with resource admission enforced by API
UE /ue, /ue/work/:pkCommitment Authenticated UE workflow and backend commitment scope
Consent and feedback /oauth/consent, /feedback Dedicated composition within authenticated routing
Platform integration administration /admin/integrations/... Platform guard; ordinary /admin has a different company-capability condition

InnerApp waits for session verification. No session opens Login. An unavailable verified identity produces an explicit failure state instead of guessed memberships. A token-hook error is shown separately. Without a verified selected tenant the login/company-selection state remains visible.

The role-aware root sends subcontractor context to /ue, customer-only context to /customer, worker-only context to /worker, and principal staff to /dashboard. Shell guards also prevent a direct office link from giving a portal actor the backoffice. Catch-all and retired routes redirect through the current routing rules; reaching an old URL does not establish that its former page remains supported.

Some comments and navigation arrays are historical hints. In particular, worker/UE navigation declarations can contain links whose current office guard redirects the actor. Inspect the actual route tree and entry guard before promising a role can open one. This article does not treat unused link configuration as delivered functionality.

Customer detail links pair fk_customer_party with fk_tenant using customerPortalCustomerPath; related project-list requests keep those parameters paired. The project detail route establishes the exact admitted company/person context from the resource rather than the internal selected workspace.

Ordinary office detail URLs carry record IDs but do not establish ownership. The query or API must recheck current context. A successful SPA fallback from the web server proves only that React can receive the route. Runtime entry points describes that boundary.

The data router enables useBlocker for page departures. useLeaveGuard coordinates links, browser history, programmatic navigation and a registry for company switch/sign-out. An editor determines whether to flush or ask. Search-parameter tabs within the same pathname are treated separately from leaving the page.

Lazy route imports reduce initial loading. Suspense loading is not a successful business read; route or query failures need their owning error presentation. See editing states.

A synthetic UE staff member follows an old /projects/... link. The principal-staff shell redirects to UE rather than granting office access. A direct request to the underlying API still needs its own denial; redirect tests alone do not establish that security boundary.

The named guard and navigation tests specify presentation and redirect behaviour with supplied identities. Token/RLS and resource tests are separate evidence. The route map describes inspected families rather than claiming every supported URL has been exercised in the shared environment.