An interactive web application for exploring chess positions from Daniel Naroditsky's YouTube speedrun games.
- Overview
- Features
- Demo
- Quick Start
- Project Structure
- Data Pipeline
- Contributing
- Development
- Deployment
- Acknowledgments
- License
This project lets you explore every chess position from Daniel Naroditsky's (Danya's) famous YouTube speedrun series. Search any position to see:
- ๐ข What moves Danya played from that position
- ๐ด What moves opponents tried against him
- ๐ฅ YouTube video links with timestamps to watch Danya handle that position
- โ๏ธ Interactive board with drag-and-drop move exploration
Perfect for chess students who want to learn from Danya's incredible teaching content in a searchable, interactive format.
- Interactive Chess Board - Drag-and-drop pieces to explore positions
- Move Database - See all moves Danya and opponents played from each position
- YouTube Integration - Direct links to videos with exact timestamps
- Move History - Navigate forward/backward through your exploration
- Responsive Design - Works on desktop, tablet, and mobile
- Sound Effects - Optional move/capture sounds
- Board Flipping - View from either perspective
- Automated Data Processing - Extracts positions from PGN game files
- YouTube Title Fetching - Real video titles via oEmbed API
- Position Normalization - Smart FEN matching for transpositions
- Timestamp Calculation - Precise video timestamps using game clocks
- SQLite Database - Efficient storage and querying
-
Clone the repository
git clone https://github.com/yourusername/chess-memory.git cd chess-memory -
Serve the frontend locally
cd frontend python -m http.server 8000 -
Open in browser
http://localhost:8000
See CONTRIBUTING.md for detailed setup instructions.
chess-memory/
โโโ frontend/ # Static web application
โ โโโ index.html # Main HTML file
โ โโโ css/
โ โ โโโ styles.css # All styling
โ โโโ js/
โ โ โโโ app.js # Application logic
โ โโโ img/ # Images (tribute photos)
โ โโโ chess_positions.json # Position database (50-100MB)
โ
โโโ backend/ # Data processing pipeline
โ โโโ scripts/ # Python scripts for building database
โ โโโ 1_match_games_csv_to_api.py
โ โโโ 2_build_database_from_games.py
โ โโโ 3_fetch_youtube_titles.py
โ โโโ 4_clean_database.py
โ โโโ 5_export_to_frontend_json.py
โ โโโ rebuild_all.py # Master rebuild script
โ โโโ README.md # Pipeline documentation
โ
โโโ data/ # Data files
โโโ csv/ # Original game lists
โโโ json/ # Game data and exports
โโโ sqlite/ # SQLite database
The backend processes raw game data through a 5-step pipeline:
1. Match CSV โ Chess.com API
โ
2. Build SQLite Database (extract positions)
โ
3. Fetch YouTube Titles
โ
4. Clean Invalid Links
โ
5. Export to Frontend JSON
See backend/scripts/README.md for detailed pipeline documentation.
cd backend/scripts
# Install dependencies
pip install -r requirements.txt
# Full rebuild (recommended)
python rebuild_all.py
# Or run steps individually
python 1_match_games_csv_to_api.py
python 2_build_database_from_games.py
python 3_fetch_youtube_titles.py
python 4_clean_database.py
python 5_export_to_frontend_json.py
# Copy output to frontend
cp ../../data/json/chess_positions_frontend.json ../../frontend/chess_positions.jsonWe welcome contributions! Whether it's:
- ๐ Bug reports
- ๐ก Feature suggestions
- ๐ Documentation improvements
- ๐จ UI/UX enhancements
- ๐ง Code contributions
See CONTRIBUTING.md for guidelines.
Frontend:
- Modern web browser
- Local web server (Python, Node.js, or VS Code Live Server)
Backend:
- Python 3.8+
- pip (Python package manager)
-
Fork and clone the repository
git clone https://github.com/yourusername/chess-memory.git cd chess-memory -
Set up Python environment (optional but recommended)
python -m venv chess_env source chess_env/bin/activate # On Windows: chess_env\Scripts\activate
-
Install backend dependencies
cd backend/scripts pip install -r requirements.txt -
Run the frontend
cd ../../frontend python -m http.server 8000
- Frontend: Open browser console and check for JavaScript errors
- Backend: Each script includes error handling and progress logging
- API Testing: Use
dev_test_chess_api.pyto verify Chess.com API access
- Enable GitHub Pages in repository settings
- Set source to
mainbranch,/frontendfolder - Custom domain (optional): Add
CNAMEfile to frontend
See frontend/DEPLOYMENT.md for detailed deployment instructions.
The frontend is a static site and can be deployed to:
- Netlify: Drag & drop
frontend/folder - Vercel: Import GitHub repository
- Any static host: Upload
frontend/contents
Every position in Danya's games is extracted and stored with:
- FEN notation (position identifier)
- Move history (what Danya played, what opponents tried)
- Video timestamps (calculated from game clocks)
- Single-page application - No backend server required
- Client-side search - Entire database loaded once
- Instant lookups - In-memory position matching
- Browser caching - Fast subsequent loads
- Frontend: Vanilla JavaScript, chessboard.js, chess.js
- Backend: Python, python-chess, SQLite
- APIs: Chess.com public API, YouTube oEmbed API
- Chess games from Daniel Naroditsky's Chess.com accounts:
senseidanyahebeccararisohmylandsfrankfurtairport
- Back to 3000
- Beginner to Master
- Develop Your Instincts
- Master Class
- Sensei Speedrun
- Top Theory
- Daniel Naroditsky - For creating incredible educational content and inspiring the chess community
- Chess.com - For providing public API access to game data
- chessboard.js & chess.js - For excellent open-source chess libraries
- The Chess Community - For supporting chess education
This project was created as a tribute to Danya's teaching legacy and to help chess students learn from his games.
This project is for educational and personal use.
- Game data is from public Chess.com games
- YouTube content belongs to Daniel Naroditsky
- Code is open-source for educational purposes
Please respect intellectual property rights when using or modifying this project.
Have questions or suggestions? Feel free to:
- Open an issue on GitHub
- Submit a pull request
- Share your feedback
Made with โ๏ธ by chess enthusiasts, for chess students everywhere.
In loving memory of Daniel Naroditsky - the world's favorite chess teacher.