A real-time chess game application built with Python FastAPI, WebSocket, and HTMX.
- Real-time chess gameplay between two players
- WebSocket communication for instant move updates
- Beautiful chess board UI using chessboard.js
- Simple and intuitive interface
- Create a virtual environment (recommended):
python -m venv venv
source venv/bin/activate # On Windows: venv\Scripts\activate
- Install dependencies:
pip install -r requirements.txt
- Run the application:
python main.py
- Open your browser and navigate to
http://localhost:8000
- First player: Click "New Game" to create a new game
- Second player: Click "Join Game" and enter the game ID shown to the first player
- Start playing! White moves first
- Backend: Python FastAPI with WebSocket support
- Frontend: HTMX, chessboard.js
- Chess Engine: python-chess