HaNdTriX / next-p2p-chat

Home Page:next-p2p-chat.vercel.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Next.js p2p chat

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.

Development

First, run the development server:

yarn dev

Production

yarn build && yarn start

About

next-p2p-chat.vercel.app

License:MIT License


Languages

Language:JavaScript 56.3%Language:TypeScript 40.5%Language:CSS 3.2%