ClientOne strict TypeScript codebase
Built on React Native, with a broadcast-style 3D match view and a 2D pitch, animation off the main thread, sound and haptics. Around thirty screens, laid out for iPhone, iPad and iPhone Duo from one codebase.
TypeScriptReact NativeExpoReanimatedSVG
Match engineDeterministic and seeded
Elo ratings and a Poisson goal model with a low-score correction, tuned to real-world scoring and draw rates. The same seed gives the same match on any phone or on the server.
Seeded RNGEloPoisson modelGolden tests
BackendOne Worker, one database
Friends' leagues run on a single serverless Worker with a D1 database, scheduled jobs and rate limiting at the edge. The stored state is tiny; everything else is rebuilt from the seed.
Cloudflare WorkersD1Cron TriggersRate limiting
ConsistencyMoney can't be created
Every money or ownership change is one atomic, guarded SQL statement. Transfers are an append-only ledger replayed the same way on server and phone, and budgets are derived from it, never stored.
Atomic SQLAppend-only ledgerIdempotency keys
OfflinePlays offline, syncs when back
The solo game never touches the network, and a test enforces it. Multiplayer moves made offline queue up and replay in order, safely, when the connection returns.
Offline queuePolling syncLocal cache
ShippingShip daily, in 21 languages
Signed over-the-air updates from a self-hosted update server, 21 in-app languages, and store listings in 50 locales pushed by script.
OTA updatesR2fastlanei18n