A shared party space has an interesting requirement: everyone should feel like they are in the same place, but they should not necessarily see the same information. In a card game, for example, my screen needs to show my hand without receiving yours.
Diwali Courtyard explores that problem through a 3D space containing games such as Tambola, Teen Patti, Poker, Carrom, and Codenames.
How does Diwali Courtyard work?
Diwali Courtyard combines a React and Three.js interface with a Cloudflare Worker and a SQLite-backed Durable Object for each party. The server validates game actions and returns player-specific views; the documented multiplayer client polls for updates.
View the restricted beta (approved email access only) · Browse the project repository
Separate the scene from authority
React interface + Three.js scene
↕ HTTP / polling
Cloudflare Worker → party Durable Object → SQLite-backed party state
→ player-specific views
React and Three.js give players the interface and the world they move through. The server-side party authority validates actions and maintains the canonical shared state. This distinction matters: a browser can show a proposed action, but it should not be the final judge of a deal, a turn, or a score.
Private information is handled at the response boundary. Instead of broadcasting every hand and relying on the interface to hide the wrong ones, the server provides views appropriate to the recipient. That is a stronger design than putting secrets in the browser and hoping the UI conceals them.
The current documented multiplayer flow uses HTTP polling. Earlier architecture material discusses WebSockets, but a proposed transport should not be mistaken for the one in the current flow. Local practice is separate: it uses browser-side state and saves for practice matches, rather than the shared party authority.
Treat recovery as part of play
Multiplayer is not only about the happy path where every request arrives exactly once. People refresh, lose connectivity, leave a game, or press an action whose response never comes back.
The repository documents rules and recovery behavior for individual games, including retrying an uncertain action without accidentally treating it as a new one. It also records checks at several levels: game-rule tests, runtime integration, browser journeys, and targeted recovery scenarios. These checks make the intended behavior inspectable rather than leaving it implicit in the interface.
The project also separates review evidence from a broader readiness claim. The repository describes a restricted beta and scoped local acceptance; those results do not establish public-release readiness or comprehensive physical-device and provider-capacity qualification.
The architectural trade-off
Central authority makes it easier to reason about shared rules and private views, but it also creates backend, availability, and cost responsibilities. A smooth animation is not enough if a lost request can create a second action or a private card leaks into a response.
My main lesson from this project is to design around the state players actually depend on: who is allowed to act, what each person may see, and how the game recovers when communication is unreliable.
Explore the project
- Open Diwali Courtyard: restricted beta, available only to approved email addresses.
- Read the repository and game rules.
- Explore the software factory workflow for another approach to recording decisions and verification.
This is a snapshot of the repository inspected on November 14, 2026.