Skip to main content

Web App

The web app lives in sable-agents-demo/web.

It uses:

  • Static HTML pages.
  • Shared styles in styles.css and tokens/.
  • Shared navigation, scope selector, and auth-aware helpers in sable-shell.js.
  • Vercel serverless functions under api/.

Pages

FilePurpose
index.htmlHome, board, approval inbox, transcript/demo controls
cockpit.htmlPortfolio status and hours telemetry
hub.htmlPer-project working surface
documents.htmlDocument list/retrieval surface
accounts.htmlAccount/client view
outcome.htmlOutcome-pricing estimate surface
portal.htmlCurated client portal
login.htmlSupabase-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.