Skip to content

Demo Source File Reference (`apps/demo`)

This is the canonical per-file reference for the demo app.

  • Total files documented: 28
  • Scope: app config, source code, static assets, and wrangler deploy metadata under apps/demo
  • Purpose: keeps local/build artifacts out of version control.
  • Key entries: node_modules, dist, log files, local editor settings.
  • Purpose: lint configuration for the demo app.
  • Behavior: applies JS/TS React lint rules and ignores generated output.
  • Purpose: browser shell for Vite app.
  • Behavior: defines root mount node and loads src/main.tsx module.
  • Purpose: app metadata, scripts, dependency declarations.
  • Scripts: dev, build, lint, preview, deploy.
  • Purpose: TS solution file with references and path aliases.
  • Behavior: delegates app/node settings to referenced tsconfig files.
  • Purpose: strict TypeScript settings for browser app source.
  • Behavior: no-emit compile checks, bundler-mode module resolution.
  • Purpose: node-side TypeScript config for Vite config typing.
  • Purpose: Vite configuration.
  • Behavior: wires React plugin and Cloudflare Vite plugin.
  • Purpose: Cloudflare Worker deployment config.
  • Behavior: sets worker name, compatibility date, and entry file (src/index.ts).
  • Purpose: generated Wrangler deploy metadata.
  • Note: not app logic; references generated deploy config paths.
  • Purpose: static favicon asset.
  • Purpose: React runtime bootstrap.
  • Behavior: mounts <App /> into DOM root.
  • Purpose: main orchestration component.
  • Behavior:
    • composes demo UI sections
    • wires ExtensiveEditor ref actions
    • handles markdown/JSONB load-save-copy workflows
    • computes grouped feature coverage from extension list
    • manages theme and status states
  • Purpose: Cloudflare Worker entry module.
  • Behavior: exports fetch handler response for worker runtime.
  • Purpose: demo content and feature taxonomy constants.
  • Exports:
    • seeded markdown content
    • JSONB scenario object
    • extension categorization maps and ordering
  • Purpose: top control bar.
  • Behavior: theme toggle and demo-content loading trigger.
  • Purpose: summary hero panel.
  • Behavior: displays capability metrics and category highlights.

apps/demo/src/components/FeatureCoveragePanel.tsx

Section titled “apps/demo/src/components/FeatureCoveragePanel.tsx”
  • Purpose: extension capability visualization.
  • Behavior: renders grouped feature chips and copy-markdown action.

apps/demo/src/components/PersistencePanel.tsx

Section titled “apps/demo/src/components/PersistencePanel.tsx”
  • Purpose: persistence testing UI.
  • Behavior: payload textarea + save/load/restore/copy action controls.

apps/demo/src/components/EditorPlayground.tsx

Section titled “apps/demo/src/components/EditorPlayground.tsx”
  • Purpose: visual container for editor surface.
  • Behavior: provides layout wrapper around editor content.
  • Purpose: baseline global styles.
  • Behavior: body/root defaults and theme-aware globals.
  • Purpose: CSS entrypoint for app-level stylesheet imports.
  • Behavior: imports style modules in controlled order.
  • Purpose: app shell variables and generic surface/button styles.
  • Purpose: top bar layout and controls styling.
  • Purpose: showcase hero panel styling.
  • Purpose: feature/persistence panel and chip grid styling.

apps/demo/src/styles/editor-playground.css

Section titled “apps/demo/src/styles/editor-playground.css”
  • Purpose: editor stage and container styling.

When touching apps/demo files:

  1. Keep this per-file reference updated.
  2. Update demo user docs for changed run or usage flows.
  3. Verify README and documentation index links still resolve.
  4. Run demo lint/build checks.