All projects

Realtime · Multiplayer games · 2026

Realtime board-game platform — Go, Dou Shou Qi & more

Two guests spin up a room and play a live, fully validated match — every move ruled on by the server, every board state broadcast from one source of truth, on an engine built to take on new games.

Role
Full-stack developer
Year
2026
Backend
Go + WebSockets
Frontend
SvelteKit
hero screenshot — 16:8

Overview

The platform began as a real-time Go (Baduk/Weiqi) game and was deliberately refactored into a multi-game engine — it already hosts Dou Shou Qi, and the architecture is built so that adding new games is a first-class extension point, not a rewrite. The Go server is the single source of truth: clients never trust each other, every move is validated against a pure rules engine, and the resulting state is broadcast to both players over WebSockets.

REST handles only session and room lifecycle; all live gameplay and the lobby feed happens over WebSockets. Each game's rules engine is pure and deterministic — no I/O — so it round-trips through JSON snapshots that the store persists and rehydrates, with a pluggable in-memory or PostgreSQL backend chosen at compile time.

Key features

  • Extensible multi-game engineGo and Dou Shou Qi share one room, lobby and protocol layer; new games slot into a clean extension point.
  • Server-authoritative rulesPure, exhaustively unit-tested engines enforce legality, ko, handicap, and area scoring per game.
  • Live WebSocket play & lobbyPer-room gameplay and a shared lobby feed broadcast every state change in real time.
  • Reconnect & pluggable persistenceGrace timers survive disconnects, and the store runs in-memory by default or on PostgreSQL via a build tag.

The challenge

The trickiest part was keeping two parallel state machines in sync — the engine phase (playing → scoring → finished) that drives move legality, and the persisted room lifecycle that drives the lobby and rehydration. Funnelling every transition through a single set of choke-point methods, each holding the right lock, kept the live game and its durable record from ever drifting apart — and it's the same discipline that makes dropping in a new game safe rather than risky.

Gallery

Next project
INTEGRAZOO — livestock management platform