Skip to content

skumar6044/multiplayer-quiz

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

multiplayer-quiz

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.

What This Repo Is

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.

Current State

  • The active app lives under src/
  • Important files are:
    • src/App.js
    • src/components/Quiz.js
    • src/components/Question.js
    • src/components/Result.js
    • src/contexts/QuizContext.js
    • src/reducers/quizReducer.js
    • src/utils/serverUtils.js
    • src/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

First Files To Read

If you are picking this repo up, read these in order:

  1. README.md
  2. src/App.js
  3. src/components/Quiz.js
  4. src/components/Question.js
  5. src/reducers/quizReducer.js
  6. src/contexts/QuizContext.js
  7. src/utils/serverUtils.js
  8. src/utils/gameStorage/GameStorageFactory.js

Setup On A New Machine

Prerequisites

  • Node.js 18+ recommended
  • npm

Install dependencies

npm install

Run locally

npm start

Build

npm run build

Test

npm test

Important Notes

  • 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_Store files are ignored.

Likely Next Improvements

  • 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

Cleanup Build Artifacts

npm run clean

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors