A tiny monorepo for learning and teaching chess openings.
The flagship app is an Opening Trainer that plays a line on the board (smoothly 🧈)—you guess the name, get instant feedback, and level up your pattern recognition.
- 🌐 Try it: https://chessopenings.messierexplore.com
chess-openings-app/– React + Vite web app with an animated board, multiple-choice quiz, scoring, and three curated opening sets.assets/– screenshots & visuals.
Built as a hands-on way to practice openings recognition (and to have something more fun than a PDF of lines 😄).
- Plays the opening: one move every 2 seconds, smooth piece animation.
- Guess the name: 4 choices; wrong picks turn red (disabled); keep trying until you’re right.
- No spoilers: the full move list reveals only after the animation completes.
- Correct ⇒ flavor text (quick description) + Next button to load a new puzzle.
- Scoreboard, “felt” table theme, responsive layout.
- Starter (10) – Ruy Lopez, Sicilian, French, Caro-Kann, Italian, Queen’s Gambit, King’s Indian, English, Nimzo-Indian, Scotch.
- Level 2 (16) – adds QGD, Slav, Petroff, Berlin, London, Sicilian Najdorf, plus Grünfeld, Benoni, Pirc, Dutch, Alekhine, Catalan, King’s Gambit, Evans, Two Knights, Scandinavian.
- Wacky (12) – Bongcloud, Halloween, Stafford, Wayward Queen, Grob, Orangutan (Sokolsky), Danish, Englund, Latvian, Fried Liver, Elephant, Scotch Gambit.
# build & run from repo root
docker compose up --build
# app will be available at
# http://localhost:8000Configure API base (optional): If you have a backend at a different URL/port, pass it at build time:
VITE_API_BASE=http://localhost:8000 docker compose up --buildThe app expects endpoints like /api/openings/<set> where <set> is starter, level2, or wacky.
Compose expects the frontend in
chess-openings-app/with a Vite build output indist/(Dockerfile handles the build).
- React 18.2 + Vite
- react-chessboard 4.x (board), chess.js (rules / SAN→FEN)
- Plain CSS for the “dark green felt” look
chess-openings-app/
Dockerfile # multi-stage (Node build -> Nginx)
nginx.conf # SPA routing for Nginx
src/
api/openingsClient.js # tiny fetch wrapper (supports VITE_API_BASE)
components/
ChessBoard.jsx # computes FEN from SAN; smooth piece animation
OpeningQuiz.jsx # quiz state machine: animation, choices, scoring
hooks/useOpenings.js # simple fetch + cache
styles.css # felt theme + UI polish
App.jsx, main.jsx
assets/
sample_openingstrainer.png
docker-compose.yml # builds and serves frontend on :8080
- Animation model: render the first
kSAN moves and letreact-chessboardanimate between positions (don’t remount the board). - Timing: self-scheduling
setTimeoutat 2s per move to keep dev behavior predictable. - UX guardrails: hide the move list until the animation finishes; wrong answers turn red (and disable) to give feedback without spoiling future guesses.
- Routing: Nginx SPA fallback routes unknown paths to
index.html. - Containerization: Vite env (
VITE_API_BASE) wired as a build arg so the compiled app points at your API.
- Sound FX + per-move progress ring
- Fun ELO popularity stats per opening, mention famous players related to that opening/historical notes
- One or two continuation lines to inform best routes when encountering this opening
MIT — see LICENSE.

