/ concept-collection / commonview
Sign in
concept-collection / commonview
commonview / README.md
2.2 KBPreviewCodeBlameHistoryRaw

CommonView#

A minimal peer-to-peer web app. Everyone who opens the page becomes a peer in a single shared network. Peers discover each other over nostr relays and communicate over WebRTC (full mesh). It borrows the discovery/signaling approach from trystero's nostr strategy, but only the parts needed here.

For now the shared state is just a counter — a stand-in for the richer state (including binary blobs) planned later.

How it works#

Run#

npm install
npm run dev

Open the printed URL in two different browsers or profiles (two tabs in the same profile share the same localStorage key, so they'd be the same peer). Watch the roster populate and the counter stay in sync.

moveopenescclose