Full-stack · Machine Learning
Opening TrainerIntelligent Chess Analytics & Adaptive Learning Platform
Find the opening mistakes you keep repeating, then drill them until they're gone.
Runs Stockfish entirely in your browser across all your recent games, groups identical mistakes, explains them, and schedules spaced-repetition drills. Then it checks your later games to see if training worked.
- Timeline
- Jan — Feb 2026
- Status
- Live
- Stack
- ReactTypeScriptWebAssemblyWeb WorkersStockfish 19IndexedDBTailwind CSSVitestGitHub Actions
- 0
- servers: runs in-browser
- Multi-core
- Web Worker engine pool
- SM-2
- spaced repetition
- 2
- chess platforms
The problem
Why I built it
I kept losing games before they really got going, and when I looked back it was often the same position going wrong the same way. Game review on chess sites shows one game at a time, so I never noticed. Opening courses taught lines I rarely reached.
So I built a tool that looks at all my recent games at once and answers one question: what am I getting wrong over and over?
How it works
From input to result
- 01
Fetch
Recent games from the Lichess or Chess.com public APIs, straight into the browser.
- 02
Analyse
Stockfish 19 (WebAssembly) in a pool of Web Workers, one per spare CPU core. Each game is checked until 6 moves past known theory.
- 03
Group
Identical mistakes are merged across games: “you played 5…gxf6 in 3 games; 5…exf6 is better.”
- 04
Explain
The engine's refutation is replayed with chess.js to detect lost material, forks and missed wins, in plain English.
- 05
Drill
Every mistake becomes an SM-2 spaced-repetition drill, and later games are checked to mark each one fixed or still repeating.
Engineering
Decisions worth talking about
From Flask server to no backend at all
The Flask version (still in the repo) ran Stockfish server-side. Moving the engine to WebAssembly in the browser removed server cost and kept user data local. It also made parallelism the client's problem, so I built a Web Worker pool sized to available cores.
Evaluate each position once
The evaluation after one move is reused as the evaluation before the next, and results are cached in IndexedDB, so re-analysis mostly only touches new games.
Grade by winning chances, not pawns
Mistakes are graded by drop in win probability (the curve Lichess uses), so a move that keeps a won position won isn't flagged as an error.
Explanations from the engine, not a chatbot
Claims are only made when replaying the engine line confirms them, so the explanations can't hallucinate.
Closing the loop
Most trainers stop at drills. This one matches drilled positions against later real games to measure whether training actually carried over.
Limits & next
What it can't do yet
- Drills are saved per browser, so a different device starts fresh. Everything runs client-side by design.