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.
Realtime chess engine · integration-ready
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.
One socket per login session, straight to the engine. Latency pings auto-answered, lag compensation, and auto-reconnect with the same session token.
All chess logic — move legality, clocks, results — is validated by the engine. The client is never trusted. Anti-cheat from the foundation.
Queue, pairing, tournament rounds, and a vs-bot mode — queueing straight from the client socket. match_found and tournament_complete callbacks to the platform.
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.
@inachess/sdk wraps EngineClient: connect once with a session token, queue, send moves, answer pings, reconnect — all reactive and ready to use.
The engine computes the rating change per game; your platform stores it. Delivered in full in the game_result callback.
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.
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.
Your platform talks to the engine only through this contract — nothing else.
REST /v1you → engineMint session tokens at login, fetch game-types, create tournaments. Auth via IP whitelist + X-Service-Auth.
Callbacksengine → youReliable 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.
The platform mints a session token at login; the client opens one engine socket with it.
Moves validated by the engine in realtime; clocks & lag handled server-side.
game_result, match_found, fairplay_flag sent back to the platform.
games/results?since= reconciles results if a callback is missed.
A stable REST + callback contract, a ready-to-use TypeScript SDK, and a fully documented WebSocket protocol. Just wire it up.
♞ Open the docs