Routing model
DualMind Lab uses file-based routing — each page is a separate HTML file. There is no client-side router.Route map
Auth protection
Pages that require authentication check for a valid Supabase session on load:Cloudflare Worker URL handling
In production, the Cloudflare Worker (worker.js) provides clean URL support:
- API proxy:
/api/*routes are forwarded to the backend - Exact match: Tries to serve the exact path from static assets
- HTML fallback: For extensionless paths, appends
.html(e.g.,/users→/users.html) - SPA fallback: Unmatched non-API routes serve
index.html
worker.js
Navigation
Navigation between pages uses standard<a> tags. The sidebar and topbar are included as HTML partials in the admin panel but are inline in the main frontend.