/// Real-time Web App Case Study
Shark
A multiplayer board game powered by PartyKit
Category
Real-time Web App
Stack
Next.js, TypeScript, Tailwind CSS, PartyKit, More...
Year
2026
01 / The Context
Built With
Live At
https://shark.4rd.techA multiplayer board game powered by PartyKit
My friends and I used to spend hours playing the physical board game "Shark" at a local cafe. It's a brilliant, chaotic game of stock manipulation, corporate ruthlessness, and constant negotiation.
When our group dispersed geographically, we lost that weekly ritual. I looked into existing digital board games, but they felt clinical and joyless. They digitized the rules, but failed to capture the tension of sitting around a table yelling at each other.

I decided to build a "digital twin" of the game. The product goal wasn't just to enforce game logic, but to engineer real-time, instant feedback that kept the chaotic energy alive over the internet.
02 / The Problem Space
Defining the core
user pain points.
01
Real-time State Sync
Replicating the real-time nature of a physical game requires robust state management. I engineered a WebSocket architecture using PartyKit to handle race conditions, dropped connections, and late-joining players without breaking the shared state.
02
Digital Affordances
Physical games allow for simultaneous, out-of-turn negotiation. I had to design UI patterns and notification systems that facilitated rapid, chaotic actions without overwhelming the screen or confusing players.
03
Game Logic Integrity
Translating a physical rulebook into deterministic code—especially handling edge cases around simultaneous stock crashes—required extensive logic mapping, state machines, and edge-case testing.
03 / Strategy & Execution
From hypothesis
to prototype.
3 Days
Analyzed the core loop of the physical game to identify which specific mechanics created the most "fun" (e.g., the sudden stock market crashes) and prioritized those for the MVP.
1 Week
Architected the game state schema and WebSocket event payloads (PlayerJoined, StockBought, TurnEnded) before touching any frontend code to ensure a bulletproof backend.
2 Weeks
Built the MVP using React and PartyKit. Used persistent WebSocket rooms for effortless state sync, requiring zero traditional database infrastructure on my end.
Ongoing
Conducted playtests with my original friend group, iterating rapidly on the UI based on their feedback regarding game speed, turn clarity, and visual feedback, player room management, reconnection handling, and responsive board layout.
04 / Impact & Learnings
Measuring
success.
Happy!
to Play Again
Me and my friends can play the game whenever we want now
100%
Rules Translated
Every physical game mechanic runs flawlessly in code.
0
Distance Barrier
We can now play our favorite cafe game from anywhere.