Multiplayer Chess Application
A real-time, multiplayer and production-grade chess platform
2026 · shipped · 2 min read
on this page
on a random week day afternoon, i played my first game of chess at chess.com. i went through the full flow in the application, i made an account, i got matched with a random player, i competed and played and at last, lost :(
i was sad, but i was amazed at how chess.com operated, and at that time, it was quite a buzz, so i dissected it like any developer would and decided to make a mini version for me, built by myself. so i built it and below are all the features i integrated in the platform.
ngl whenever i was stuck, i relied on materials online and AI, of course. so, just making it clear :)
Feature Set#
Area | Capability |
|---|---|
Gameplay | Real-time play, server-owned clocks, Fischer increment, legal-move enforcement, optimistic client rendering with server rollback |
Endings | Checkmate, resignation, timeout, draw offers, stalemate, threefold repetition, insufficient material |
Ratings | Glicko-2 with deviation and volatility, provisional ratings, peak-rating tracking, inactivity decay |
Matchmaking | Rating-banded queue with a time-widening search window |
Analysis | Stockfish evaluation, blunder classification, per-player accuracy, LLM commentary streamed over SSE |
Persistence | Full move history, PGN export, game resumption across restarts |
Social | In-game chat, spectator mode |
Security | Socket-bound identity, JWT access/refresh, bcrypt hashing, tiered rate limiting, CORS allowlist |
Engineering highlights#
Rebuilt the message layer so identity is bound to the authenticated socket rather than read from the request body, closing an impersonation hole that allowed acting on another player's behalf
Implemented Glicko-2 from the specification, including the Illinois-variant regula falsi volatility solver, with zero runtime dependencies
Made game conclusion a single idempotent operation, eliminating a race where a resignation arriving alongside a flag-fall could apply rating changes twice
Moved clock authority from the client to the server, so abandonment resolves as a timeout rather than an indefinitely open game
Drove Stockfish over child-process stdio after the WASM build proved unable to expose engine output reliably
Built the analysis pipeline so the engine owns all evaluation and the LLM only narrates, with a degradation path that still delivers engine results if commentary fails
111 tests covering rules, ratings, clocks, rate limiting and engine analysis, with build, typecheck, lint and test enforced in CI on every pull request
thanks for reading to whoever made it this far.