Play against the Stockfish chess engine directly in your browser using a Flask-powered web app.
AI Stockfish Flask Chess is a powerful web-based chess application built using Flask and integrated with the Stockfish AI engine.
Play chess against one of the strongest engines in the world, directly inside your browser.
Key points:
- Modern UI
- Real-time move validation
- Stockfish AI opponent
- Clean backend structure
- Easy to install and run
- ♟️ Play chess online locally in your browser
- 🤖 AI opponent powered by Stockfish
- 🔍 Move analysis & validation
- 🎨 Responsive UI using HTML/CSS/JS
- ⚡ Fast Flask backend
- 🧪 Board logic testing script
- 📁 Organized project folder structure
AI-Stockfish-Flask-Chess/
├── static/ # CSS, JS, images
├── templates/ # HTML templates
├── stockfish/ # Stockfish engine binary
├── .gitattributes # Git configuration
├── flask_app.py # Main Flask web server
├── board_test.py # Board logic tester
├── requirements.txt # Project dependencies
└── README.md # Project documentation
git clone https://github.com/yourusername/AI-Stockfish-Flask-Chess.git
cd AI-Stockfish-Flask-Chesspython -m venv venv
venv\Scripts\activatepython3 -m venv venv
source venv/bin/activatepip install -r requirements.txtpython flask_app.pyThen open in your browser:
http://127.0.0.1:5000/
- Open the web app in your browser
- White moves first — click a piece, then click a valid square
- The AI (Stockfish) responds with its best move
- Use it to play, test, and analyze positions
- Backend: Python, Flask
- AI Engine: Stockfish
- Frontend: HTML, CSS, JavaScript
- Add move history panel
- Add difficulty levels (Stockfish depth/skill)
- Add chess clock
- Add FEN/PGN import & export
- Add online multiplayer (future)
- Fork the repository
- Create a branch: git checkout -b feature-name
- Commit changes: git commit -m "Add feature"
- Push: git push origin feature-name
- Open a Pull Request
- Flask
- Stockfish Chess Engine
- HTML, CSS, JavaScript

