Repeated Mistakes Made in Chess Openings is a Flask web app that reviews a Lichess user's recent games, focuses on the opening phase, and highlights recurring mistakes with Stockfish recommendations. The interface shows a chessboard with the played move and the suggested move marked as arrows.
Live App : https://lichess-opening-trainer.onrender.com
- Fetch recent public games from a Lichess username.
- Analyze the first few plies with Stockfish.
- Detect opening mistakes, inaccuracies, blunders, and tactical mate threats.
- Group recurring mistakes by opening, position, and played move.
- Show the played move and recommended move on an interactive board.
- Run locally with Python or as a Docker container.
lichess-opening-coach/
app.py Flask app and analysis endpoint
Dockerfile Docker image setup with Stockfish
requirements.txt Python dependencies
README.md Project instructions
data/
openings.csv ECO opening names and move lines
engine/
stockfish.exe Optional local Windows Stockfish binary
src/
*.py Earlier helper modules for PGN and engine analysis
static/
app.js Browser-side interaction
style.css Page styling
templates/
index.html Main app page
The app needs a Stockfish executable. It looks in this order:
STOCKFISH_PATHenvironment variable.engine/stockfish.exe.engine/stockfish.stockfishon your system path.- common Linux install paths such as
/usr/games/stockfish.
The Docker image installs Stockfish automatically, so you do not need to commit a binary to GitHub.
From the project folder:
cd C:\Users\abhia\lichess-opening-coach
.\.venv\Scripts\Activate.ps1
pip install -r requirements.txt
python app.pyOpen:
http://127.0.0.1:5000
If Stockfish is somewhere else on your computer, set the path before starting the app:
$env:STOCKFISH_PATH = "C:\path\to\stockfish.exe"
python app.pyMake sure Docker Desktop is running first.
Build the image:
docker build -t lichess-opening-coach .Run the app:
docker run --rm -p 5000:5000 lichess-opening-coachOpen:
http://localhost:5000
A simple deployment path is Render using the Dockerfile in this repository.
- Commit and push this project to GitHub.
- Go to
https://render.com. - Create a new Web Service from this repository:
abi1010-git/Opening-Trainer
- Choose Docker as the runtime.
- Use the default Dockerfile.
- Set the health check path to:
/health
- Deploy the service.
Render will build the Docker image, install Python dependencies and Stockfish, then run the Flask app through Gunicorn.
git add .
git commit -m "Update Lichess opening coach deployment setup"
git push