Route Protection Overview

Overview of the routing flow and access control within the application.

TODO: update with latest repo state [doc outdated 20240904]

Routing flow:

  1. Unauthenticated(auth) or (main) pages
  2. Authenticated, no orgs/setup under (protected)
  3. Authenticated, has orgs → any /s/[subdomain]/* route (org shell)

This keeps your marketing site clean, centralizes the org‑creation step, and scopes all org‑specific UI under the subdomain structure.