How seokpan/seokpan-app works
Seokpan is a browser-based, real-time, vote-driven Gomoku service. A player enters through the React session flow, reaches the lobby and a room, then uses HTTP commands to change state while WebSockets deliver snapshots and events; game turns resolve from votes to moves or passes and results. The backend exposes these boundaries and separates durable MariaDB data from Redis runtime state. The README documents major capabilities and storage responsibilities; where source wiring was not excerpted, links are limited to those documented relationships.
Main entry points: client.ts API client · App.tsx App routing · app.py FastAPI assembly · stream.ts Realtime stream
Components 21
Browser application
- App routing
frontend/src/App.tsx - Session recovery
frontend/src/session/context.tsx - API client
frontend/src/api/client.ts - Lobby
frontend/src/lobby/LobbyPage.tsx - Room state
frontend/src/room/context.tsx - Realtime stream
frontend/src/realtime/stream.ts - Game board
frontend/src/game/GamePanel.tsx - Chat
frontend/src/chat/ChatPanel.tsx - Online presence
frontend/src/presence/stream.ts - Rankings
frontend/src/statistics/useRankings.ts
HTTP and realtime API
- FastAPI assembly
backend/src/seokpan/app.py - Identity API
backend/src/seokpan/api/identity.py - Room API
backend/src/seokpan/api/room.py - Game API
backend/src/seokpan/api/game.py - WebSocket API
backend/src/seokpan/api/realtime.py
Game services
- Room lifecycle
backend/src/seokpan/room/application/lobby.py - Game and turns
backend/src/seokpan/game/application/service.py - Session contract
backend/src/seokpan/identity/application/session.py
Persistence
- MariaDB
backend/src/seokpan/persistence/mariadb - Redis runtime
backend/src/seokpan/persistence/redis
Other components
- Player
Connections 24
- Player → App routing: opens
README.md - App routing → Session recovery: routes through
frontend/src/App.tsx - Session recovery → API client: sends commands
frontend/src/session/context.tsx - Lobby → API client: loads and changes
frontend/src/lobby/LobbyPage.tsx - Room state → API client: reads snapshot
frontend/src/room/context.tsx - Room state → Realtime stream: starts stream
frontend/src/room/context.tsx - Realtime stream → API client: refreshes state
frontend/src/realtime/stream.ts - Game board → API client: submits votes
frontend/src/game/GamePanel.tsx - Lobby → Chat: renders
frontend/src/lobby/LobbyPage.tsx - App routing → Online presence: renders
frontend/src/App.tsx - App routing → Rankings: routes to
frontend/src/App.tsx - API client → FastAPI assembly: HTTP requests
README.md - Realtime stream → WebSocket API: WebSocket events
README.md - FastAPI assembly → Identity API: registers
backend/src/seokpan/app.py - FastAPI assembly → Room API: registers
backend/src/seokpan/app.py - FastAPI assembly → Game API: registers
backend/src/seokpan/app.py - Identity API → Session contract: uses session rules
backend/src/seokpan/api/identity.py - Room API → Room lifecycle: delegates
backend/src/seokpan/api/room.py - Game API → Game and turns: delegates
backend/src/seokpan/api/game.py - WebSocket API → Room lifecycle: serves room streams
backend/src/seokpan/api/realtime.py - Game and turns → MariaDB: persists game
README.md - Game and turns → Redis runtime: uses vote runtime
backend/src/seokpan/game/application/service.py - Session contract → Redis runtime: stores sessions
README.md - Room lifecycle → Redis runtime: stores room runtime
README.md