Web App
The web app lives in sable-agents-demo/web.
It uses:
- Static HTML pages.
- Shared styles in
styles.cssandtokens/. - Shared navigation, scope selector, and auth-aware helpers in
sable-shell.js. - Vercel serverless functions under
api/.
Pages
| File | Purpose |
|---|---|
index.html | Home, board, approval inbox, transcript/demo controls |
cockpit.html | Portfolio status and hours telemetry |
hub.html | Per-project working surface |
documents.html | Document list/retrieval surface |
accounts.html | Account/client view |
outcome.html | Outcome-pricing estimate surface |
portal.html | Curated client portal |
login.html | Supabase-auth login shell |
Shared Shell
sable-shell.js injects:
- Top navigation.
- "Viewing as" selector.
- Auth-aware fetch behavior through
window.SABLE.authedFetch.
API Pattern
Browser calls should use window.SABLE.authedFetch when Supabase auth is required. Plain fetch is only acceptable for public/static assets or open demo fallbacks.
Fallback Behavior
Several routes support a no-Supabase demo mode by reading bundled JSON from web/data. That path is
useful for the fictional demo only.
Client-facing instances must set SABLE_MODE=production. In production mode, bundled JSON, legacy
APP_TOKEN, and CMA memory-store routes fail closed instead of serving demo data. Browser Supabase
config is loaded from /api/config, sourced from NEXT_PUBLIC_SUPABASE_URL and
NEXT_PUBLIC_SUPABASE_ANON_KEY.