forked from quic-issues/427e7578-d7bf-49c8-aee9-2dd999e25316
- Add complete P2P polling application with React + TypeScript frontend - Implement Node.js backend with Yjs WebSocket and WebRTC signaling - Support dynamic poll creation, answer management, and voting - Add CRDT-based state synchronization using Yjs for conflict-free merging - Implement user tracking and vote prevention (one vote per user per option) - Create modern UI with Tailwind CSS and visual feedback - Add comprehensive documentation and setup instructions Features: - Users can create polls with custom questions - Anyone can add answer options to any poll - Real-time voting with instant cross-client synchronization - Smart vote tracking with visual feedback for voted options - User attribution showing who created polls and options - Connection status indicators for WebSocket and P2P connections Technical: - Hybrid P2P architecture (WebSocket + WebRTC) - CRDT-based state management with Yjs
36 lines
951 B
JSON
36 lines
951 B
JSON
{
|
|
"name": "p2p-poll-frontend",
|
|
"private": true,
|
|
"version": "1.0.0",
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "vite",
|
|
"build": "tsc && vite build",
|
|
"preview": "vite preview",
|
|
"lint": "eslint . --ext ts,tsx --report-unused-disable-directives --max-warnings 0"
|
|
},
|
|
"dependencies": {
|
|
"react": "^18.2.0",
|
|
"react-dom": "^18.2.0",
|
|
"yjs": "^13.6.8",
|
|
"y-websocket": "^1.5.0",
|
|
"y-webrtc": "^10.2.5",
|
|
"lucide-react": "^0.294.0"
|
|
},
|
|
"devDependencies": {
|
|
"@types/react": "^18.2.37",
|
|
"@types/react-dom": "^18.2.15",
|
|
"@typescript-eslint/eslint-plugin": "^6.10.0",
|
|
"@typescript-eslint/parser": "^6.10.0",
|
|
"@vitejs/plugin-react": "^4.2.0",
|
|
"autoprefixer": "^10.4.16",
|
|
"eslint": "^8.53.0",
|
|
"eslint-plugin-react-hooks": "^4.6.0",
|
|
"eslint-plugin-react-refresh": "^0.4.4",
|
|
"postcss": "^8.4.31",
|
|
"tailwindcss": "^3.3.5",
|
|
"typescript": "^5.2.2",
|
|
"vite": "^5.0.0"
|
|
}
|
|
}
|