Files
427e7578-d7bf-49c8-aee9-2dd…/app.js
ako a76f00a08a feat: implement P2P polling app with Automerge sync
Core functionality using Automerge CRDT for real-time P2P sync:
- Creates or loads a shared document via URL hash
- Syncs over BroadcastChannel (local tabs) and WebSocket (wss://sync.automerge.org)
- Persists state to IndexedDB
- Add poll options with case-insensitive duplicate detection
- Toggle-vote per option, tracked per-document in localStorage
- Options sorted by vote count descending
- 2-minute countdown timer that disables voting on expiry
- Copy-to-clipboard for shareable URL

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-11 14:49:12 +01:00

5.7 KiB