A web interface for playing chess against bots. Play against the built-in Stockfish engine or challenge bots that follow the API spec. The interface also has built in teasting tool supporting the display of debug bitboards and analysing batch games.
- Node.js (v18 or higher)
- npm or yarn
git clone https://github.com/RJDonnison/chess-bot-interface.git
cd chess-bot-interface
npm installnpm run devThen open http://localhost:5173 in your browser.
A "host" is any chess engine exposed as an HTTP API.
- Click Add Host
- Enter a name and the URL of the bot's API (e.g.
https://my-chess-bot.dev) - Click Add
The new host will appear in the dropdown and persist across sessions.
Click the pencil icon next to any host in the Hosts panel to edit its name or URL, or the trash icon to remove it.
Note: The built-in host's cannot be removed.
If you want to run your own engine and add it as a host, your server must implement the Chess Bot API spec defined in api_spec.yml.
Your server needs a single endpoint:
GET /bestmove?fen=<fen-string>
It must return JSON in this shape:
{ "bestmove": "e2e4" }The move must be in UCI notation.
The interface sends a complete FEN string with every request. FEN encodes the full board state so each request is stateless.
Your server must allow cross-origin requests from wherever the interface is hosted. At minimum, add this response header:
Access-Control-Allow-Origin: *
The interface ships with Stockfish running locally in the browser. You can adjust its strength via the Depth input and use it to test your bots.
Pull requests welcome. Please open an issue first for any significant changes.