Comeet
From a recorded conversation to something you can work with.
TOOLS / A PERSONAL PROJECT
Shared game state, with a React-shaped interface.
Open source · Code & documentationA React library for peer-to-peer multiplayer and shared state. It grew out of the kinds of interactions that board and tabletop games need.
The API uses WebRTC with manual signaling through shareable links or QR codes. The documentation includes hooks for joining a session and working with shared state.
Board games need a shared understanding of the table: whose turn it is, what changed, and which state is authoritative. I built a React interface around peer connections so a game can express those concepts without owning every networking detail.
The library uses WebRTC data channels, manual offer-and-answer exchange, and links or QR codes for signaling. useSharedState keeps the host as the source of truth; peers receive its updates. A reducer API supports a different interaction model and should not be mistaken for a conflict-resolution system.
Manual signaling removes the need for an application signaling service, but makes joining a session more involved. Cross-network connectivity may need STUN or TURN infrastructure. This is a library for exploring shared interactions, not a claim that every network will connect or that it provides production anti-cheat.
Source and examples are available on GitHub. Peer connections depend on the participants’ network environments.
A REAL DATA CHANNEL / A LOCAL DEMONSTRATION
These panels represent two separate WebRTC peers in this browser. The host sends a counter; the second panel updates only when its data channel receives the message.
Updated through the connection.
No microphone, camera, external STUN server or signaling service is used here. This demonstrates the transport locally, not connectivity across different networks. For cross-device setup, see the library’s examples and network limitations.