Realtime chess engine · integration-ready

Full authority over every board.

Inachess is a chess engine that is the single source of truth: it validates every move, manages the clocks, and broadcasts results to your platform over a clear contract. Clients just play.

REST APIWebSocketTypeScript SDKReliable callbacks
♜
♞
♝
♛
♚
♝
♞
♜
♟
♟
♟
♟
♟
♟
♟
♟
♟
♟
♟
♟
♟
♟
♟
♟
♜
♞
♝
♛
♚
♝
♞
♜
LIVEWhite to move
1.e2e4e7e52.d1h5b8c63.f1c4g8f64.h5f7
UCI
move format
Realtime
WebSocket + SDK
No JWT
one session token
100%
server-authoritative

What the engine brings

⚡

Realtime WebSocket

One socket per login session, straight to the engine. Latency pings auto-answered, lag compensation, and auto-reconnect with the same session token.

🛡️

Full authority

All chess logic — move legality, clocks, results — is validated by the engine. The client is never trusted. Anti-cheat from the foundation.

🎯

Matchmaking & tournaments

Queue, pairing, tournament rounds, and a vs-bot mode — queueing straight from the client socket. match_found and tournament_complete callbacks to the platform.

👁️

Spectate & fair play

Watch live games with a spectator delay — subscribe from the same socket you play on. fairplay_flag signals are sent to the platform to act on.

🔌

TypeScript SDK

@inachess/sdk wraps EngineClient: connect once with a session token, queue, send moves, answer pings, reconnect — all reactive and ready to use.

🏅

Glicko-2 rating

The engine computes the rating change per game; your platform stores it. Delivered in full in the game_result callback.

🔍

Game review

On-demand Stockfish analysis: per-move accuracy, ten move classes (brilliant → blunder), estimated rating and an eval graph. GET /v1/matches/{id}/review — generated once, then permanent.

🧩

Puzzles

Serve puzzles by rating & theme, then grade each solve move-by-move. The first attempt is rated with Glicko-2 — an overall plus a per-theme delta your platform stores.

Integration via three channels

Your platform talks to the engine only through this contract — nothing else.

REST /v1you → engine

Mint session tokens at login, fetch game-types, create tournaments. Auth via IP whitelist + X-Service-Auth.

Callbacksengine → you

Reliable webhooks: match_found, game_result, tournament_complete. Idempotent by eventId, retried until 2xx.

WebSocket + SDKuser → engine

@inachess/sdk opens one socket per login session with a session token. Queue, realtime play, spectate, auto-reconnect.

Data flow, A–Z

  1. 1
    Session

    The platform mints a session token at login; the client opens one engine socket with it.

  2. 2
    Play

    Moves validated by the engine in realtime; clocks & lag handled server-side.

  3. 3
    Callback

    game_result, match_found, fairplay_flag sent back to the platform.

  4. 4
    Reconciliation

    games/results?since= reconciles results if a callback is missed.

Ready to integrate.

A stable REST + callback contract, a ready-to-use TypeScript SDK, and a fully documented WebSocket protocol. Just wire it up.

♞ Open the docs