This example uses Y.js, valtio, and valtio-yjs to implement a simple peer to peer chat. The history is stored in IndexedDB and synced via WebRTC to other clients. Conflicts are being automatically resolved by Y.js.
For signaling public servers (wss://y-webrtc-signaling-eu.herokuapp.com/
and wss://signaling.yjs.dev/
) are used to create the webrtc-handshake.
First, run the development server:
yarn dev
yarn build && yarn start