How leozh0u/blundernet works
BlunderNet is a chess-training web application centered on searchable, rated puzzle practice, with game play, classrooms, and post-game review as major companion workflows. The browser talks to a Go HTTP/WebSocket API; queued work moves engine replies and reviews off request paths. Redis holds live game state and cross-process messages, while PostgreSQL backs durable records and puzzle data. The README documents capabilities whose detailed handlers were not sampled, so those branches use tree-supported paths and omit uncertain internal wiring.
Main entry points: server.go HTTP and WebSocket API · worker.go Background worker · App.jsx Web application · puzzles.go Puzzle corpus
Components 24
Web experience
- Web application
web/src/App.jsx - Puzzle practice
web/src/features/puzzles/Puzzles.jsx - Ranked puzzles
web/src/features/puzzles/Ranked.jsx - Classroom UI
web/src/features/classrooms/Classrooms.jsx - Game analysis
web/src/features/analysis/Analyse.jsx - Account
web/src/features/account/Account.jsx
API workflows
- HTTP and WebSocket API
internal/httpapi/server.go - Puzzle endpoints
internal/httpapi/puzzles.go - Classroom endpoints
internal/httpapi/classrooms.go - Game import endpoints
internal/httpapi/imports.go
Chess domains
- Game rules and state
internal/game/game.go - Puzzle selection and explanation
internal/puzzle/derive.go - Move-by-move review
internal/review/review.go - Player and puzzle ratings
internal/rating/glicko2.go - Puzzle data loader
cmd/puzzleload/main.go
Queued processing
- Job queue
internal/queue/queue.go - Background worker
internal/worker/worker.go - Bot and analysis engines
internal/engine/engine.go
Persistence
- Redis live state
internal/store/redis.go - PostgreSQL archive
internal/store/postgres.go - Puzzle corpus
internal/store/puzzles.go - Classroom records
internal/store/classrooms.go
Other components
- Player or coach
- Lichess puzzle dump
Connections 32
- Player or coach → Web application: uses
- Web application → Puzzle practice: opens
- Web application → Ranked puzzles: opens
- Web application → Classroom UI: opens
- Web application → Game analysis: opens
- Web application → Account: opens
- Puzzle practice → HTTP and WebSocket API: requests puzzles
- Ranked puzzles → HTTP and WebSocket API: requests ranked play
- Classroom UI → HTTP and WebSocket API: sends room actions
- Game analysis → HTTP and WebSocket API: requests review
- Account → HTTP and WebSocket API: sends account actions
- HTTP and WebSocket API → Puzzle endpoints: dispatches
- HTTP and WebSocket API → Classroom endpoints: dispatches
- HTTP and WebSocket API → Game import endpoints: dispatches
- HTTP and WebSocket API → Game rules and state: updates games
- HTTP and WebSocket API → Puzzle selection and explanation: selects puzzles
- HTTP and WebSocket API → Job queue: enqueues work
- HTTP and WebSocket API → Redis live state: reads and writes
- HTTP and WebSocket API → PostgreSQL archive: reads and writes
- Puzzle endpoints → Puzzle corpus: queries corpus
- Classroom endpoints → Classroom records: stores classroom data
- Game import endpoints → Job queue: enqueues review
- Background worker → Job queue: receives jobs
- Background worker → Redis live state: loads and publishes games
- Background worker → Game rules and state: applies moves
- Background worker → Bot and analysis engines: requests moves
- Background worker → Move-by-move review: judges games
- Background worker → PostgreSQL archive: saves reviews
- Background worker → Player and puzzle ratings: updates ratings
- Lichess puzzle dump → Puzzle data loader: provides puzzles
- Puzzle data loader → Puzzle corpus: loads corpus
- Puzzle corpus → PostgreSQL archive: stored in