How auriny/chess-capital works
ChessCapital turns camera frames into recognized board states, then uses chess rules to infer and validate moves against a persisted game. The CV service posts recognized state to the game backend; the frontend is a lightweight interface. The graph preserves the documented recognition, move-validation, illegal-move, and streaming capabilities. Some frontend and stream integrations are documented but their runtime wiring is not shown in the sampled source, so those links are marked unverified or omitted.
Main entry points: game_process.py Game API · frame.py Frame API · chess_facade.py Chess Rules Facade · main.py API Setup
Components 17
Client
- Web Interface
frontend/index.html - Admin Interface
frontend/admin.html
Vision Service
- Frame API
cv-service/routers/frame.py - Frame Decoder
cv-service/utils.py - Board Recognizer
cv-service/recognizer.py - CV Configuration
cv-service/config.py
Game Backend
- Game API
game-service/routers/v1/game_process.py - Move API
game-service/routers/v1/send_move.py - Game Models
game-service/models/requests.py - Chess Rules Facade
game-service/utils/chess_facade.py - PGN Game Files
game-service/config.py - Domain Errors
game-service/exceptions - Service Startup
game-service/utils/startup.py - API Setup
game-service/main.py
Game Integrations
- Lichess Stream
game-service/utils/lichess_stream.py - VK Video Stream
Other components
- Phone Camera
Connections 17
- Phone Camera → Web Interface: captures frames
- Web Interface → Frame API: submits frames
- Frame API → Frame Decoder: decodes frame
cv-service/routers/frame.py - Frame API → Board Recognizer: recognizes board
cv-service/routers/frame.py - Frame API → CV Configuration: uses host config
cv-service/routers/frame.py - Frame API → Move API: posts board state
cv-service/routers/frame.py - Web Interface → Game API: uses game API
- Game API → Chess Rules Facade: creates and loads games
game-service/routers/v1/game_process.py - Game API → Lichess Stream: starts stream
game-service/routers/v1/game_process.py - Game API → Game Models: validates start data
game-service/routers/v1/game_process.py - Chess Rules Facade → PGN Game Files: reads and writes PGN
- Chess Rules Facade → Lichess Stream: sends PGN
game-service/utils/chess_facade.py - Chess Rules Facade → Domain Errors: raises domain errors
game-service/utils/chess_facade.py - API Setup → Service Startup: configures lifespan
game-service/main.py - API Setup → Domain Errors: registers handlers
game-service/main.py - API Setup → Game API: mounts routes
- VK Video Stream → Game API: provides stream URL