How k-mysa6505/minna-de-quiz works
みんクイ is a real-time multiplayer quiz game: players create questions, answer one another’s questions, predict outcomes, and see results, while a separate screen mode displays game progress and rankings. The player route coordinates room state and game phases; service modules persist and subscribe to game data, and Firebase Functions handle server-side game flow, presence, replay, and room operations. Connections reflect the README and shown excerpts or SOURCE INDEX references; unsampled implementations and their internal links are not inferred.
Main entry points: page.tsx Player Room · firebase.ts Firebase Setup · useScreenData.ts Screen Data · useGamePlay.ts Play State
Components 28
Entry and Rooms
- Home and Guide
app/page.tsx - Create Room
app/create-room/page.tsx - Room Options
app/create-room/RoomOptionsForm.tsx - Join Room
app/join-room/JoinRoomForm.tsx
Player Game
- Player Room
app/room/[roomId]/page.tsx - Room Data
app/room/[roomId]/hooks/useRoomData.ts - Waiting Phase
app/room/[roomId]/phases/WaitingPhase.tsx - Question Creation
app/room/[roomId]/phases/QuestionCreationPhase.tsx - Gameplay
app/room/[roomId]/phases/GamePlayPhase.tsx - Play State
app/room/[roomId]/hooks/useGamePlay.ts - Final Results
app/room/[roomId]/phases/FinalResultPhase.tsx
Screen Mode
- Screen Mode
app/room/[roomId]/screen/page.tsx - Screen Data
app/room/[roomId]/screen/hooks/useScreenData.ts - Screen Displays
app/room/[roomId]/screen/components/WaitingScreen.tsx
Services and Backend
- Firebase Setup
lib/firebase.ts - Authentication
lib/services/auth/authService.ts - Player Service
lib/services/auth/playerService.ts - Room Service
lib/services/room/roomService.ts - Question Service
lib/services/game/questionService.ts - Game Service
lib/services/game/gameService.ts - Reaction Service
lib/services/game/reactionService.ts - Service Utilities
lib/services/core - Game Functions
functions/src/game/gameFlow.ts - Presence Functions
functions/src/presence/presence.ts - Room Functions
functions/src/room/roomCommands.ts - Replay Functions
functions/src/game/replayFlow.ts
Other components
- Players
- Firebase Data
Connections 35
- Players → Home and Guide: open game
README.md - Home and Guide → Create Room: start room
app/page.tsx - Home and Guide → Join Room: join room
app/page.tsx - Create Room → Room Options: configures
app/create-room/page.tsx - Create Room → Room Service: creates room
app/create-room/page.tsx - Join Room → Player Room: enters room
- Players → Player Room: play
README.md - Player Room → Room Data: loads state
app/room/[roomId]/page.tsx - Player Room → Waiting Phase: renders phase
app/room/[roomId]/page.tsx - Player Room → Question Creation: renders phase
app/room/[roomId]/page.tsx - Player Room → Gameplay: renders phase
app/room/[roomId]/page.tsx - Player Room → Final Results: renders phase
app/room/[roomId]/page.tsx - Gameplay → Play State: uses game state
- Play State → Game Service: submits answers
app/room/[roomId]/hooks/useGamePlay.ts - Play State → Question Service: loads questions
app/room/[roomId]/hooks/useGamePlay.ts - Play State → Player Service: updates scores
app/room/[roomId]/hooks/useGamePlay.ts - Players → Screen Mode: view screen mode
README.md - Screen Mode → Screen Data: loads screen data
app/room/[roomId]/screen/page.tsx - Screen Mode → Screen Displays: renders displays
app/room/[roomId]/screen/page.tsx - Screen Data → Room Service: subscribes room
app/room/[roomId]/screen/hooks/useScreenData.ts - Screen Data → Player Service: subscribes players
app/room/[roomId]/screen/hooks/useScreenData.ts - Screen Data → Game Service: subscribes answers
app/room/[roomId]/screen/hooks/useScreenData.ts - Screen Data → Question Service: subscribes questions
app/room/[roomId]/screen/hooks/useScreenData.ts - Screen Data → Reaction Service: subscribes reactions
app/room/[roomId]/screen/hooks/useScreenData.ts - Authentication → Firebase Setup: uses auth client
lib/services/auth/authService.ts - Player Service → Firebase Setup: uses database client
lib/services/auth/playerService.ts - Room Service → Firebase Setup: uses database client
lib/services/room/roomService.ts - Question Service → Firebase Setup: uses database client
lib/services/game/questionService.ts - Game Service → Firebase Setup: uses database client
lib/services/game/gameService.ts - Reaction Service → Firebase Setup: uses database client
lib/services/game/reactionService.ts - Firebase Setup → Firebase Data: connects
lib/firebase.ts - Game Functions → Firebase Data: handles game events
- Presence Functions → Firebase Data: syncs presence
- Room Functions → Firebase Data: handles room commands
- Replay Functions → Firebase Data: handles replay