No description
Find a file
2025-12-31 11:18:23 +01:00
pieces Initial browser chess vs bot 2025-12-30 09:31:58 +01:00
.gitignore Add Docker setup and README 2025-12-31 10:49:13 +01:00
app.js Improve endgame overlay actions 2025-12-31 11:18:23 +01:00
chess.js Initial browser chess vs bot 2025-12-30 09:31:58 +01:00
docker-compose.override.yml.dist Add Docker setup and README 2025-12-31 10:49:13 +01:00
docker-compose.yml Add Docker setup and README 2025-12-31 10:49:13 +01:00
Dockerfile Add Docker setup and README 2025-12-31 10:49:13 +01:00
engine-worker.js Refine layout, coords, logs, and offline 2025-12-30 17:02:30 +01:00
favicon.ico Refine layout, coords, logs, and offline 2025-12-30 17:02:30 +01:00
index.html Improve endgame overlay actions 2025-12-31 11:18:23 +01:00
README.md Update README with dev override and references 2025-12-31 11:03:51 +01:00
stockfish-asm.js Initial browser chess vs bot 2025-12-30 09:31:58 +01:00
style.css Improve endgame overlay actions 2025-12-31 11:18:23 +01:00

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.