ChessDrills is a browser based chess training app focused on opening recall, mistake driven review, and account synced progress.
Primary live site:
Repository:
- opening-notation-drills
The app includes:
- structured opening training with Learn, Practice, Drill, and Puzzles modes
- immediate move validation and feedback on the board
- opening specific puzzle packs generated from external puzzle data
- game review that imports recent games or pasted PGN and turns mistakes into training positions
- synced accounts, streaks, activity history, profiles, and leaderboard data
- installable web app support
The core idea is still active recall. You make moves from memory, get corrected immediately, and repeat until the position sticks.
The React app mounts these main routes:
//openings/practice/about/leaderboards/install/login/signup/profile/profile/u/:username/u/:username/review/my-games/discord
The app uses BrowserRouter with SPA fallback files in public/index.html and public/404.html so clean URLs work on the custom domain and on GitHub Pages style hosting.
The main trainer lives in:
src/components/OpeningTrainer.js
Trainer behavior includes:
- SAN move validation with
chess.js - automatic opponent replies when a line continues
- illegal move prevention
- coach text and inline square or piece highlights
- board theme, piece theme, coach theme, sound, and confetti settings
- optional transposition handling with a visible transposition notice
- copy and export helpers for SAN, PGN, and FEN
- shareable reps
- custom reps stored alongside the built in catalog
- prestige reset flow for fully completed opening courses
Learn
- guided line study with explanations
- saved completion state
- free users can use Learn, but non members are capped before the trial or membership gate appears
Practice
- faster repetition
- premium gated
Drill
- scored repetition
- premium gated
- feeds leaderboard data
Puzzles
- opening specific tactical or recall puzzles
- uses generated puzzle packs in
src/data/generatedOpeningPuzzles.js
Opening data lives in:
src/openings/
The catalog contains 25 openings.
Free openings:
- London
- Sicilian Defense
- Ruy Lopez
- Fried Liver Attack
- Stafford Gambit
- Caro-Kann Defense
- Queen’s Gambit Accepted
- Queen’s Gambit Declined
- Italian Game
- King's Indian Defense
- French Defense
- Englund Gambit
Signup required openings:
- English Opening
- Scotch Game
- Vienna Gambit
- Vienna Gambit Counter
- Rousseau Gambit
- Bishop's Opening
- Vienna Game
- King's Gambit
- Danish Gambit
- Scandinavian Defense
- Van't Kruijs
- Punishing Bad Openings
- Petrov Defense
Catalog metadata also controls:
- descriptions shown on the homepage
- board orientation and player color
- access rules
- badges such as
New - SEO text for selected openings
Game review lives in:
src/components/GameReview.js
public/engines/
Review flow supports:
- importing recent games from Chess.com
- importing recent games from Lichess
- pasting raw PGN directly
- local engine analysis through a Stockfish worker
- move by move review with best move comparisons
- single game mistake training
- personal mistake packs built across multiple recent games
- pack filters for side, speed, and batch size
- puzzle style replay with hints, solution reveal, and auto advance
The public engine assets currently include a Stockfish worker plus Stockfish 17 lite wasm files.
Auth and account state are centered around Firebase.
Account behavior includes:
- email and password signup
- email and password login
- persistent sessions
- sync from local progress into cloud state after sign in
- public username claiming
- public profile documents
- private profile settings
- synced activity history and streak tracking
Important files:
src/auth/AuthProvider.js
src/utils/accountSync.js
src/utils/cloudSync.js
src/firebase.js
firestore.rules
The profile system supports:
- avatar upload with client side resize into a stored data URL
- public profile pages at
/profile/u/:usernameand/u/:username - board, piece, and coach themes
- activity heatmap
- streak display
- membership status display
The frontend recognizes:
- free users
- a 3 day free trial
- paid member state
- lifetime member state
Gating behavior in the app:
- some openings require signup
- Practice and Drill are premium gated
- Learn stays available for non members but is capped
- billing portal access is wired through a callable Firebase Function from the profile page
Relevant membership state is read from the user document in Firestore.
Leaderboard UI currently lives in:
src/components/Leaderboards.js
Behavior is drill focused and centered on identity and rank display.
The live screen currently exposes:
- all time drill ranking
- rival window around the current user
- tier labels based on score
- links to public profiles
Install flow lives in:
src/components/InstallAppPage.js
src/utils/pwaInstall.js
public/manifest.json
Current install support includes:
- install page at
/install - browser prompt handling where supported
- separate iPhone and Android instructions
- standalone manifest configuration
Frontend:
- React 16 with Create React App
react-router-domv5chess.jschessboardjsx- Firebase client SDK v9
Build and deploy:
gh-pages- custom domain at
https://chessdrills.net - Firebase config for Firestore rules and Functions
Config files worth knowing about:
package.json
firebase.json
firestore.rules
public/index.html
public/404.html
public/sitemap.xml
public/robots.txt
Firebase client config is read from:
REACT_APP_FIREBASE_API_KEYREACT_APP_FIREBASE_AUTH_DOMAINREACT_APP_FIREBASE_PROJECT_IDREACT_APP_FIREBASE_APP_ID
Typical frontend workflow:
nvm use 16
npm install
npm startProduction build:
npm run buildGitHub Pages deploy script:
npm run deployFirebase project deploy work, such as rules or functions, is configured through firebase.json and is separate from the static site deploy.
src/
auth/
components/
data/
openings/
scripts/
theme/
utils/
public/
coaches/
engines/
sounds/
High signal files and folders:
src/components/OpeningTrainer.jssrc/components/GameReview.jssrc/components/Profile.jssrc/components/PublicProfile.jssrc/components/Leaderboards.jssrc/openings/openingCatalog.jssrc/data/generatedOpeningPuzzles.jssrc/scripts/build_opening_puzzle_packs.py
MIT