Opening lines are easy to learn and easy to forget. Top Line lets you save the openings you play and drill them with the same spaced repetition flashcard apps use.
Each line (one sequence of moves) is one card. When you finish practicing it, the app grades itself from how it went and schedules the next review. Lines you know well come back less and less often; lines you keep slipping on come back tomorrow.
How it's built
- Frontend: React + Vite + Tailwind. The board is chessground, lichess's own board, and moves are validated with chess.js.
- Engine: Stockfish compiled to WebAssembly, in a Web Worker. Analysis costs the server nothing.
- Backend: a Go API on MongoDB. Every opening and line has an owner, and the store only ever reads or changes the signed-in user's.
- Sign-in goes through my shared Keycloak, so it's the same account as my other apps.
The opening library is generated with go generate from lichess's chess-openings list plus a hand-picked set of popular openings with notes.
