Personal · 2024 – present
Claim
A card game I designed and built for iOS, Android and the web from one codebase. Play against AI or friends online, with an authoritative real-time game server, accounts and in-app purchases.
The game
Get your hand down to 10 points or less, then claim it’s the lowest at the table. Each round, one random rank becomes wild and is worth 0. Claim too early and someone lower catches you out. The rules are simple, and the bluffing is where it gets interesting.
One codebase, three platforms
- Built with Expo and React Native, running natively on iOS and Android and on the web through React Native Web, live at playclaim.app.
- Landscape card table with Reanimated card flights and SVG cards.
- Zustand stores for offline games, online rooms and the player profile.
A pure, tested game engine
- All the rules live in a pure TypeScript engine with no React in it: the UI calls
applyAction(state, action)and renders the result. - The AI opponents only use information a real player would have.
- The same engine runs on the client and the server, so the rules can’t drift apart.
Real-time multiplayer back end
- An authoritative game server on Cloudflare Workers, with one Durable Object per room holding state and talking to players over WebSockets.
- The server shuffles, validates every move with the shared engine, and sends each player only their own view, so nobody can peek at other hands.
- Empty seats are filled by AI, a 30-second turn timer covers players who stall, and disconnected players can rejoin.
- D1 (SQLite) for users, friends, presence, public rooms and game logs; Clerk for sign-in; Stripe for the Pro upgrade (tables of up to 8 players).
Quality
- 96 unit tests across the engine, room logic and rate limits.
- An end-to-end smoke test plays a full game with scripted players over real WebSockets.
History
The first prototype, built in September 2024, used a physics-based game engine. I later rebuilt Claim from scratch around a pure rules engine, so it could run on every platform and support online play.