Skip to main content

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:
  1. API proxy: /api/* routes are forwarded to the backend
  2. Exact match: Tries to serve the exact path from static assets
  3. HTML fallback: For extensionless paths, appends .html (e.g., /users/users.html)
  4. SPA fallback: Unmatched non-API routes serve index.html
worker.js
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.

Query parameters