Standalone single-page accessibility demo app.
npm install
npm run devOpen http://localhost:3000.
The app is set up so Vercel serves the static frontend and a separate Node host runs the backend API.
Deploy this repo to Render, Railway, Fly.io, or another Node host with:
npm run render-build
npm startSet these environment variables on the backend:
PORT: provided by most hosts automatically.ALLOWED_ORIGINS: comma-separated frontend origins allowed to call the API, for examplehttps://your-vercel-app.vercel.app,https://your-domain.com.PUBLIC_BACKEND_ORIGIN: public backend URL used when generating report links, for examplehttps://api.your-domain.com.DATA_ROOT: optional writable storage path for generated reports and uploads. Defaults to the repo directory outside Vercel.SCAN_TIMEOUT_MS: optional page navigation timeout in milliseconds (default120000).SCAN_SETTLE_MS: optional post-load settle delay before snapshot (default2000).SCAN_KEYBOARD_STEPS: optional keyboard tab steps during scan (default10).SUPABASE_URL: Supabase project URL for storing PDF download leads.SUPABASE_SERVICE_ROLE_KEY: Supabase service role key (backend only; never expose to the browser).
After deploy, verify https://api.your-domain.com/health returns { "ok": true }.
Run supabase/pdf_leads.sql in the Supabase SQL editor to create the pdf_leads table.
Set SUPABASE_URL and SUPABASE_SERVICE_ROLE_KEY on Render. Leads from /api/pdf-lead are inserted into Supabase. Without those env vars, leads are logged to the server console only (local dev fallback).
View leads in Supabase: Table Editor → pdf_leads.
For Render, use:
- Build command:
npm run render-build - Start command:
npm start
Vercel builds the static frontend from public/.
Set this environment variable on Vercel:
PUBLIC_API_BASE_URL: the backend origin, for examplehttps://api.your-domain.com.
Vercel runs npm run build, which writes public/config.js so browser requests go to the backend API.
PORTPUBLIC_API_BASE_URLALLOWED_ORIGINSPUBLIC_BACKEND_ORIGINDATA_ROOTSCAN_TIMEOUT_MSSCAN_SETTLE_MSSCAN_KEYBOARD_STEPSSUPABASE_URL: Supabase project URL for storing PDF download leads.SUPABASE_SERVICE_ROLE_KEYOPENAI_API_KEYOPENAI_MODEL
The app stores reports, previews, and artifacts under runs/<runId>/ and serves them directly.