Implement P2P polling app with Yjs and WebRTC

Uses Yjs CRDTs for conflict-free shared state and y-webrtc for
peer-to-peer data exchange. Users can add poll options and vote/unvote,
with all changes syncing in real-time across connected peers.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Patrick Charrier
2026-03-15 04:32:06 +01:00
parent 4a208ba05b
commit 2af5da59c4
5 changed files with 1768 additions and 0 deletions

18
package.json Normal file
View File

@@ -0,0 +1,18 @@
{
"name": "p2p-poll",
"private": true,
"version": "1.0.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "vite build",
"preview": "vite preview"
},
"dependencies": {
"yjs": "^13.6.0",
"y-webrtc": "^10.3.0"
},
"devDependencies": {
"vite": "^6.0.0"
}
}