State architecture
DualMind Lab frontend uses no state management library. State is managed through:window.DUALMIND_CONFIG— global runtime configuration- Supabase session — authentication state in localStorage
- DOM state — UI state lives in the DOM
- In-memory caches — API responses cached with TTL
Global configuration state
All configuration is set once inconfig.js and accessed via window.DUALMIND_CONFIG:
Configuration categories
Authentication state
Managed entirely by the Supabase JS client. The session is stored inlocalStorage and includes:
access_token— JWT for API callsrefresh_token— for token renewaluser— user profile (id, email, name)