No description
| pieces | ||
| .gitignore | ||
| app.js | ||
| chess.js | ||
| docker-compose.override.yml.dist | ||
| docker-compose.yml | ||
| Dockerfile | ||
| engine-worker.js | ||
| favicon.ico | ||
| index.html | ||
| README.md | ||
| stockfish-asm.js | ||
| style.css | ||
Chess (Browser)
Play chess in the browser against a bot. Works on desktop and mobile, no install needed.
Features
- Player vs bot (Stockfish ASM)
- Touch-friendly board
- Move list with turn navigation (click a line or use browser back/forward)
- Copy PGN and FEN
- FEN in URL for sharing/restoring
- Telnet-style board and pieces
- Optional sounds
- Local PGN cache for fast restore
Run locally
Start a simple web server in the project root:
python -m http.server 9001 --bind 0.0.0.0
Open:
http://<your-ip>:9001/
Docker
Build and run:
docker compose up --build
Dev override (volume)
Copy the sample override for a bind mount in dev mode:
cp docker-compose.override.yml.dist docker-compose.override.yml
This uses a bind mount to serve live files:
services:
chess:
volumes:
- .:/app:ro
This file is ignored by git on purpose.
URL restore
The URL hash always contains the current FEN:
http://host:9001/#<fen>
On load, the app restores the board from the FEN. If the local cached PGN
matches the same FEN, the move list is filled; otherwise unknown past moves
are shown as ? until the current turn.
Navigation
- Click a move row to jump to the end of that full turn.
- Use the browser back/forward buttons to move through positions.
Notes
- This is a static app; any web server works.
- For the best UX, run on the same origin where you play so local storage can restore the move list.