How someshk1703/zombiehunt works
Zombie Hunt is a real-time multiplayer card game: players establish an identity, create or join a room, wait for a match, play simultaneous card duels through successive game phases, and view the outcome. React routes and screens provide the player workflow; Supabase supplies authentication, persistence, realtime updates, and server-side game operations. The README documents the major gameplay rules and backend capabilities. Some page and edge-function internals were not sampled, so their detailed call relationships are not inferred.
Main entry points: App.tsx App Router · Game.tsx Game Route · WaitingRoom.tsx Waiting Room · GameContext.tsx Game Session Context
Components 26
Entry and Rooms
- App Router
src/App.tsx - Home
src/pages/Home.tsx - Create Room
src/pages/CreateRoom.tsx - Quick Play
src/pages/QuickPlay.tsx - Join Room
src/components/JoinRoomModal.tsx
Lobby and Matchmaking
- Waiting Room
src/pages/WaitingRoom.tsx - Lobby Chat
src/components/LobbyChat.tsx
Game Session
- Game Route
src/pages/Game.tsx - Duel Round
src/components/game/GameRoundScreen.tsx - Hand Review
src/components/game/HandReviewScreen.tsx - Discussion
src/components/game/DiscussionRoundScreen.tsx - Round Reveal
src/components/game/RevealScreen.tsx - Results
src/pages/Results.tsx
Backend Game Services
- Matchmaking
supabase/functions/matchmaking/index.ts - Start Game
supabase/functions/start-game/index.ts - Card Dealing
supabase/functions/_shared/dealCards.ts - Round Resolution
supabase/functions/resolve-round/index.ts - Win Check
supabase/functions/check-win/index.ts - Ghost Data
supabase/functions/ghost-data/index.ts
Client State and Services
- Game Session Context
src/context/GameContext.tsx - Game Store
src/store/gameStore.ts - Anonymous Auth
src/lib/auth.ts - Supabase Client
src/lib/supabase.ts
Other components
- Player
- Supabase Database
- Supabase Realtime
Connections 29
- Player → App Router: opens
src/App.tsx - App Router → Home: routes to
src/App.tsx - App Router → Create Room: routes to
src/App.tsx - App Router → Quick Play: routes to
src/App.tsx - App Router → Waiting Room: routes to
src/App.tsx - App Router → Game Route: routes to
src/App.tsx - App Router → Results: routes to
src/App.tsx - Home → Join Room: opens
src/pages/Home.tsx - Waiting Room → Join Room: renders
src/pages/WaitingRoom.tsx - Waiting Room → Lobby Chat: renders
src/pages/WaitingRoom.tsx - Quick Play → Matchmaking: finds match
- Waiting Room → Start Game: starts game
- Start Game → Card Dealing: deals cards
supabase/functions/start-game/index.ts - Game Route → Game Session Context: provides session
src/pages/Game.tsx - Game Route → Hand Review: renders phase
src/pages/Game.tsx - Game Route → Duel Round: renders phase
src/pages/Game.tsx - Game Route → Discussion: renders phase
src/pages/Game.tsx - Game Route → Round Reveal: renders phase
src/pages/Game.tsx - Duel Round → Round Resolution: submits duel
- Round Resolution → Win Check: checks outcome
- Game Session Context → Game Store: syncs session
src/context/GameContext.tsx - Game Session Context → Supabase Client: reads updates
src/context/GameContext.tsx - Anonymous Auth → Supabase Client: authenticates
src/lib/auth.ts - App Router → Anonymous Auth: loads identity
src/App.tsx - Supabase Client → Supabase Database: queries
- Supabase Client → Supabase Realtime: subscribes
- Supabase Realtime → Game Session Context: delivers changes
src/context/GameContext.tsx - Game Route → Ghost Data: requests ghost data
- Results → Supabase Database: loads results