- Requirements: Node 18+ and npm.
- Install:
npm install - Run dev server:
npm run dev(Vite; shows a local URL and a network URL). - Production build:
npm run build(outputs todist/). - Preview a build:
npm run preview.
npm run dev— Start the Vite dev server.npm run build— Build for production.npm run preview— Serve the production build locally.npm run deploy— Build and publishdist/to thegh-pagesbranch viagh-pages(used for GitHub Pages hosting).
The nav label always reads “Try the Toolkit,” but the destination is controlled by toolkitEnabled in src/components/SiteHeader.jsx.
- Set
toolkitEnabled = falseto route the link to the “Coming Soon” screen (/coming-soon) with the logo and message (current state). - Set
toolkitEnabled = trueto route to the live experience at/home(existing game flow).
- About page introduces the toolkit and research context.
- Home lets facilitators pick a deck (CSV-backed set of cards).
- Consent collects optional demographic info and seeds a Firestore session.
- Game walks through sorting, compromise, and ranking phases via drag-and-drop.
- Download shares printable decks and slide links.
- Deck CSVs live in
public/data/. Example:public/data/genAITutor.csv. - Required CSV columns:
round(integer grouping cards into rounds),text(card content). Optional:name(stable ID; otherwise derived from text) andicon(filename inpublic/images/icons/). - Round numbers control the sequence shown in the Game; cards with the same
roundvalue appear together. - To add a new deck:
- Add a CSV to
public/data/with the columns above. - Drop any referenced icon files into
public/images/icons/. - Add an entry to the
decksarray insrc/pages/Home.jsxwith anameandurl(e.g.,/data/myDeck.csv). The deck ID used for Firestore is derived from the CSV filename.
- Add a CSV to
- Firestore is initialized in
src/firebase.js/src/firebase.ts(projectprg-tpdt). Data is written underdecks/{deckId}/sessions/{sessionId}. - Ensure your Firestore rules allow the writes expected by workshop facilitators (see
src/services/dataCapture.jsfor the fields saved per phase). - If you fork this project with a different Firebase project, update the config in the Firebase files and verify rules before deploying.
vite.config.jssetsbaseto/tpdt/for production so GitHub Pages serves assets correctly. If you deploy under a different repo or path, updatebaseaccordingly.npm run deployassumes GitHub Pages is enabled for thegh-pagesbranch. Make sure you have push access and the branch is configured in repository settings.
src/pages— Top-level routes (About, Home, Consent, Game, Download).src/components— Shared UI pieces (header, logo, game UI).src/services— Data capture helpers for Firestore.public/data— CSV decks.public/images— Static images and card icons.vite.config.js— Build and GitHub Pages base path settings.