React quiz app for a lightweight two-player Harry Potter trivia game. The current implementation uses browser-side storage utilities to share game state by game ID rather than a real backend service.
This project started as a Create React App scaffold and was adapted into a simple multiplayer quiz experiment with:
- game creation and join flow
- per-game IDs
- synchronized game state via a storage abstraction
- timer-based quiz flow
- score tracking for two players
The app is not a production-grade real-time multiplayer system. It is a local/browser-storage-based prototype.
- The active app lives under
src/ - Important files are:
src/App.jssrc/components/Quiz.jssrc/components/Question.jssrc/components/Result.jssrc/contexts/QuizContext.jssrc/reducers/quizReducer.jssrc/utils/serverUtils.jssrc/utils/gameStorage/*
- The current branch work simplifies parts of the quiz flow and sync logic
- This repo is now documented enough that an agent can orient without reading every CRA boilerplate file
If you are picking this repo up, read these in order:
README.mdsrc/App.jssrc/components/Quiz.jssrc/components/Question.jssrc/reducers/quizReducer.jssrc/contexts/QuizContext.jssrc/utils/serverUtils.jssrc/utils/gameStorage/GameStorageFactory.js
- Node.js 18+ recommended
- npm
npm installnpm startnpm run buildnpm test- This is still a prototype-style app built on CRA.
- The multiplayer behavior is implemented through the local game storage abstraction, not a real server.
- Browser storage behavior and polling logic are core to how the app works.
- Nested
.DS_Storefiles are ignored.
- Replace or harden the local-storage-based multiplayer approach
- Add actual automated coverage around reducer and sync behavior
- Reduce debug logging once the interaction model is stable
- Decide whether this repo should remain a prototype or evolve into a more serious implementation
npm run clean