A FastAPI-powered application that imports games from Chess.com, stores PGNs locally, provides analytics, and allows users to replay games move-by-move in an interactive chess viewer.
- Import games directly from Chess.com
- Store PGNs in a local SQLite database
- View all imported games
- Find long games (40+ moves)
- Detect rating upsets
- Generate player analytics
- Replay PGNs on an interactive chess board
- Swagger API documentation included
- Python
- FastAPI
- SQLAlchemy
- SQLite
- Jinja2
- Chess.js
- Chessboard.js
Clone the repository:
git clone https://github.com/ShantanuPatil11/Chess-Automation.git
cd Chess-AutomationCreate a virtual environment:
python -m venv venvActivate it:
venv\Scripts\activateInstall dependencies:
pip install -r requirements.txtRun the application:
uvicorn app.main:app --reloadhttp://127.0.0.1:8000/docs
http://127.0.0.1:8000/viewer
| Method | Endpoint |
|---|---|
| POST | /import/{username} |
| GET | /games |
| GET | /games/long |
| GET | /games/upsets |
| GET | /game/{game_id}/pgn |
| GET | /analytics/{username} |
- Import games from a Chess.com username
- Store PGNs locally
- Analyze player statistics
- Detect notable upsets
- Replay games move-by-move in the viewer
- Automated daily game imports with APScheduler
- Email notifications for upset wins
- Opening statistics dashboard
- Player comparison analytics
- Cloud deployment
Built with FastAPI ♟️






