~/work/meridian
Meridian
01 ▪ THE PROBLEM
Meridian is a full implementation of the Catan base game with original name and art: snake-draft setup, dice production, the robber and discards, building, trades and development cards, on a painted-miniature 3D board, with friends in their own browsers. The server owns the rules, so nobody can cheat.
02 ▪ ARCHITECTURE
A Turborepo. A pure TypeScript rules engine with no rendering or networking dependencies: hex math, zod-validated declarative rulesets, a single intent reducer, and win detection, fully unit-tested without a browser. A zod protocol package for every client-server message. A game-agnostic match engine that runs as one Cloudflare Durable Object per match: it owns the game state in SQLite, holds the players' WebSockets while they hibernate, and drives bots and timers from a single alarm. Clients send intents, the engine validates them, and each seat receives a redacted snapshot so a player only ever sees what they are allowed to know. Nothing runs between matches, so hosting is free.
The client is Vite and React Three Fiber: a lobby with four-letter join codes, the 3D board, click-to-build with legality glow, and the HUD for discards, steals and the win screen. The end-to-end suite drives a full three-browser match and captures a performance snapshot.
03 ▪ DECISIONS
Secrets never leave the server. Hidden development cards and hands are redacted per seat before a snapshot is sent, so the spoof-proof guarantee lives in the protocol rather than in client discipline.
Absent players don't stall the table. A caretaker pilot plays disconnected seats, and a reconnecting player can reclaim their seat until the game ends. The host can fill empty seats with bots and start whenever the table is ready.
Rules are data. Rulesets are declarative and validated at load, so variants and expansions are content drops rather than engine changes.
Frame rate is budgeted. Instanced geometry, a draw-call budget, and a low quality tier that drops the ambient-occlusion pass keep mid-range laptops at a steady frame rate.