finds.dev← search

// the find

dmotz/trystero

★ 2,595 · TypeScript · MIT · updated Jun 2026

✨🤝✨ Build instant multiplayer webapps, no server required — Magic WebRTC matchmaking over BitTorrent, Nostr, MQTT, IPFS, Supabase, and Firebase

Trystero is a WebRTC signaling abstraction that lets you build serverless P2P web apps by piggybacking peer discovery on existing public infrastructure (BitTorrent trackers, Nostr relays, MQTT brokers, Firebase, Supabase, or your own WebSocket relay). You write one API regardless of which signaling backend you pick — swap the import, keep the code. Aimed at developers who want multiplayer or collaborative features without operating matchmaking servers.

The multi-strategy design is the real win here: you can start with Nostr (no account needed, hundreds of public relays) and migrate to a self-hosted WebSocket relay with a one-line import change. The action API handles chunking, serialization, and binary metadata automatically — sending a 50MB file is the same call as sending a string. The passive mode for always-on server-side peers is a thoughtful addition that solves the 'who remembers state when everyone leaves' problem without requiring a full server. The handshake callback with request/response semantics gives you a clean hook for custom auth without reimplementing the WebRTC negotiation dance.

WebRTC's NAT traversal failures are still your problem — Trystero documents TURN servers as a fix but provides no defaults, so production apps on hostile networks need you to either pay Cloudflare or run coturn yourself. The React hooks section is misleading: the 'just use it as a hook' example recreates the room on every render without cleanup, and the fix they provide is a manual useRef pattern that most React developers will get subtly wrong. Node/Bun support is marked experimental and requires a WebRTC polyfill (werift), making the 'run an always-on peer' use case fragile in practice. No built-in reconnection logic for the data channel itself — if a peer's connection drops mid-transfer, you restart from scratch.

View on GitHub → Homepage ↗

// want more like this?

We dig through GitHub every week and send a few repos picked for what you actually care about — each with an honest take like this one.

Get finds in your inbox → Search again →