Case-study repo for a school astronomy presentation that deliberately replaces a conventional slide deck with a web app. This repo is being organized as a self-describing case study first, with future portfolio value second.
Start here:
README.md: repo purpose, runtime, and test entry pointsCASE_STUDY.md: problem, constraints, approach, outcome, and lessonsPROVENANCE.md: historical origin, course context, collaborators, and later framing
Implementation shape:
Port of the single-file Preact/htm presentation site (ASTRO Presentation Site.html)
to Next.js (App Router). Abstractions are preserved for easy copy edits:
lib/data.js—DATAandCOPYobjects (same shape and keys as the original). Edit text and numbers here exactly as you would in the original HTML file.components/SiteApp.jsx— all section components (FullViewportHero,TheProblemSection,ThreePathwaysSection,AstronomyImpactSection,ButWhatAboutSection,RecommendationsSection,ReferencesSection,LiveHero,LiveAstronomySection, etc.) ported one-to-one from the original.app/page.jsx— picks atlas vs live mode from?mode=exactly like the original.app/globals.css— the original<style>block, unchanged.
npm install
npm run devThen open http://localhost:3000 (live mode) or http://localhost:3000/?mode=atlas.
Copy .env.example to .env.local and fill in your Pusher app key, cluster,
id, secret, and PRESENTATION_TOKEN_SECRET. Then:
- Open
/presenton your laptop — it opens on the pair screen with both speaker QRs visible and the session PIN displayed. The stage session is reused from this browser until you clickReset session & PIN. - On the stage, click
Reveal pair tokenfor a speaker. That unlocks a short-lived speaker QR whose URL now carries the signed pair token. - Each speaker scans their freshly unlocked QR → lands on
/remote?…&as=<speaker>&pt=…. - On the phone, enter only the session PIN. The remote redeems the QR-carried
token and unlocks its
Begin presentationbutton. - Tap
Begin presentationon either remote when ready. The stage flips to slide 1 and audience follow-along goes live. - Corner QR on the stage is the audience follow-along — anyone can scan to follow along on their own phone.
Pure logic tests:
npm testBrowser regression:
npm run test:regressionIf you already have a dev server running on a non-default port, point Playwright
at it instead of hardcoding 3000:
E2E_BASE_URL=http://127.0.0.1:3002 PW_NO_WEB_SERVER=1 npm run test:regressionWF artifacts for the low-context presentation pass live under tests/wf:
presentation.wf-spec.yamlpresentation.wf-agent-prompt.mdpresentation.wf-report.template.md
- CI runs
npm test,npm run build, and Playwright regression when the required presentation secrets are configured in GitHub Actions. - Vercel preview and production environments both need:
NEXT_PUBLIC_PUSHER_KEY,NEXT_PUBLIC_PUSHER_CLUSTER,PUSHER_APP_ID,PUSHER_KEY,PUSHER_SECRET, andPRESENTATION_TOKEN_SECRET. - The presentation channel namespace is derived from the deployment host, so preview and production do not cross-talk even when they share one Pusher app.