How ysoseri1224/uoa-compsci-732-proj-archive works
Wild Hand: SkillFlop is a browser card game combining Texas Hold’em-style hands with skill-driven PvE battles and rogue progression. The main player workflow is to authenticate, enter a battle, select skills, play cards through socket-driven rounds, and progress through upgrades; profile, leaderboard, and match/replay support are additional product branches. The graph follows documented capabilities and the shown frontend/socket/backend call relationships. Several route, persistence, and UI implementations were not sampled, so uncertain links are omitted or shown as unverified.
Main entry points: useGameLogic.js Battle hook · actions.ts Battle actions · index.jsx App routing · GamePage.jsx Game page
Components 26
Browser application
- App routing
CardGame/frontend/src/router/index.jsx - Auth state
CardGame/frontend/src/store/authStore.js - Auth API client
CardGame/frontend/src/api/authApi.js - Game page
CardGame/frontend/src/pages/GamePage.jsx - Battle hook
CardGame/frontend/src/hooks/useGameLogic.js - Socket adapter
CardGame/frontend/src/socket/pveSocketAdapter.js - Battle state
CardGame/frontend/src/store/pveSocketStore.js - Battle display
CardGame/frontend/src/components/game/Battlefield.jsx - Rogue mode
CardGame/frontend/src/pages/RogueGamePage.jsx - Player pages
CardGame/frontend/src/pages/ProfilePage.jsx - Leaderboard
CardGame/frontend/src/pages/LeaderboardPage.jsx - Match replay
CardGame/frontend/src/pages/ReplayPage.jsx
Game services
- Socket entry
CardGame/backend/src/socket.ts - PvE event handlers
CardGame/backend/src/utils/pveHandlers.ts - HTTP routes
CardGame/backend/src/routes/index.js
Battle domain
- Room runtime
CardGame/backend/src/pve/runtime.ts - Round machine
CardGame/backend/src/pve/roundMachine.ts - Battle actions
CardGame/backend/src/pve/actions.ts - Cards and deck
CardGame/backend/src/lib/deck.ts - Hand scoring
CardGame/backend/src/lib/hand.ts - Skills and buffs
CardGame/backend/src/lib/skills.ts - Run savepoints
CardGame/backend/src/lib/savepoint.ts
Persistence
- Account and match models
CardGame/backend/src/models - MongoDB
- Redis
CardGame/backend/src/redis.js
Other components
- Player
Connections 24
- Player → App routing: uses
CardGame/frontend/src/router/index.jsx - App routing → Auth state: checks auth
CardGame/frontend/src/router/index.jsx - Auth state → Auth API client: refreshes token
CardGame/frontend/src/store/authStore.js - App routing → Game page: routes to
CardGame/frontend/src/router/index.jsx - Game page → Battle hook: uses
- Battle hook → Socket adapter: adapts state
CardGame/frontend/src/hooks/useGameLogic.js - Battle hook → Battle state: updates state
CardGame/frontend/src/hooks/useGameLogic.js - Game page → Battle display: renders
- Player → Rogue mode: chooses upgrades
- Player → Player pages: views profile
- Player → Leaderboard: views rankings
- Player → Match replay: views match
- Battle hook → Socket entry: emits events
- Socket entry → PvE event handlers: dispatches events
- PvE event handlers → Room runtime: sends room events
CardGame/backend/src/utils/pveHandlers.ts - Room runtime → Round machine: advances rounds
CardGame/backend/src/pve/runtime.ts - Room runtime → Battle actions: applies actions
CardGame/backend/src/pve/runtime.ts - Battle actions → Cards and deck: draws and shuffles
CardGame/backend/src/pve/actions.ts - Battle actions → Hand scoring: calculates damage
CardGame/backend/src/pve/actions.ts - Battle actions → Skills and buffs: applies skills
CardGame/backend/src/pve/actions.ts - PvE event handlers → Run savepoints: restores runs
CardGame/backend/src/utils/pveHandlers.ts - HTTP routes → Account and match models: serves account and match data
- Account and match models → MongoDB: persists records
- HTTP routes → Redis: uses cache