Skip to content

feat: static in-browser demo on GitHub Pages - #31

Merged
nomadical merged 1 commit into
mainfrom
feat/static-demo
Sep 25, 2026
Merged

nomadical merged 1 commit into
mainfrom
feat/static-demo

Conversation

@nomadical

Copy link
Copy Markdown
Owner

Adds a no-backend demo build (VITE_DEMO=true): an in-memory Supabase stand-in plus local answers for the Express API, deployed to GitHub Pages by a new demo workflow.

  • Signed in as a demo admin, so the editor, review, history, templates, trash, audit and settings are all reachable.
  • State lives in sessionStorage: it survives the app's own reloads and resets when the tab closes.
  • AI, uploads and zip import/export say they are unavailable.
  • Production builds drop the demo code (checked: none of it is in a normal vite build).

Checked locally: typecheck, lint (no new warnings), 66/66 tests, and a browser pass over edit → publish → public page → history, typo-tolerant ⌘K search, and every admin screen.

VITE_DEMO=true swaps the Supabase client for an in-memory stand-in
(src/demo/client.ts) and answers the Express API from the same tables
(src/demo/api.ts), so the SPA runs with no backend. The visitor is signed
in as an admin; state lives in sessionStorage, which survives the app's own
reloads and resets when the tab closes. AI, uploads and zip import/export
report that they are unavailable. Production builds drop the demo branch.

A demo workflow builds it with base /md-kb/ and deploys to Pages.
@nomadical
nomadical merged commit 9dfb5e8 into main Sep 25, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant