How bariskisir/chessbot works
ChessBot is a Chrome extension for observing local Stockfish analysis on Chess.com games. The main workflow detects the board and player turn, requests analysis, presents evaluation and candidate moves, and optionally plays a move; automation can also start a new match or rematch after game over. Settings persist across sessions, and mistake mode performs extra searches to choose a weaker move within the configured evaluation floor. The graph follows wiring shown in sampled source; README capabilities without sampled implementation are included only where the tree supports a path.
Main entry points: controller.ts Session controller · engine-client.ts Engine client · engine.ts Search queue and worker · app.tsx Control panel
Components 16
Panel and Settings
- Control panel
src/app.tsx - Settings storage
src/storage.ts
Board and Automation
- Session controller
src/controller.ts - Board detection and moves
src/board.ts - Match actions
src/automation.ts - Extension overlay mount
src/mount.tsx
Analysis and Selection
- Move selection
src/move-selection.ts - Evaluation and mistakes
src/mistake-mode.ts - Settings and analysis protocol
src/shared.ts
Local Engine
- Engine client
src/engine-client.ts - Analysis dispatcher
src/background.ts - Search queue and worker
src/engine.ts
Other components
- Chess.com player
- Chess.com game page
- Extension local storage
- Local Stockfish WASM
Connections 21
- Chess.com player → Chess.com game page: uses
- Chess.com game page → Extension overlay mount: loads content
- Extension overlay mount → Control panel: mounts
- Control panel → Session controller: starts and configures
- Session controller → Settings storage: loads and saves
- Settings storage → Extension local storage: reads and writes
- Session controller → Board detection and moves: reads and plays
- Session controller → Match actions: finds match actions
- Session controller → Engine client: requests searches
- Session controller → Evaluation and mistakes: evaluates and finds mistakes
- Session controller → Move selection: chooses move
- Session controller → Control panel: updates state
- Board detection and moves → Chess.com game page: reads and dispatches moves
- Match actions → Chess.com game page: finds and clicks controls
- Engine client → Analysis dispatcher: sends requests
- Analysis dispatcher → Search queue and worker: routes requests
- Search queue and worker → Local Stockfish WASM: runs UCI searches
- Search queue and worker → Engine client: returns results
- Evaluation and mistakes → Engine client: requests searches
- Engine client → Settings and analysis protocol: uses message types
- Search queue and worker → Settings and analysis protocol: parses and validates