How yashsahane-eng/livevote-poll works
Real-Time Poll Rooms is an anonymous, full-stack polling app. A user creates a poll, receives a shareable poll link, and visitors load and vote on that poll; the backend persists votes and broadcasts updated results to clients in that poll’s Socket.IO room. The map also includes the documented fairness controls and the in-app documentation panel. Edges reflect the supplied excerpts and README; some client API wiring is visible, but no separate API-client or database-service implementation was sampled.
Main entry points: PollView.jsx View and vote · CreatePoll.jsx Create poll · pollRoutes.js Poll endpoints · server.js Poll socket room
Components 13
Poll Web App
- App routes
Frontend/frontend/src/App.jsx - Create poll
Frontend/frontend/src/pages/CreatePoll.jsx - View and vote
Frontend/frontend/src/pages/PollView.jsx - Feature docs
Frontend/frontend/src/components/DocsPanel.jsx
Poll API
- HTTP and socket server
Backend/server.js - Poll endpoints
Backend/routes/pollRoutes.js - Poll operations
Backend/controllers/pollController.js
Live Updates
- Socket client
Frontend/frontend/src/context/SocketContext.jsx - Poll socket room
Backend/server.js
Poll Storage
- Poll records
Backend/models/Poll.js
Other components
- Poll visitor
- MongoDB
- Socket.IO service
Connections 19
- Poll visitor → App routes: opens app
README.md - App routes → Create poll: routes to
Frontend/frontend/src/App.jsx - App routes → View and vote: routes to
Frontend/frontend/src/App.jsx - Create poll → Poll endpoints: creates via API
Frontend/frontend/src/pages/CreatePoll.jsx - View and vote → Poll endpoints: loads and votes
Frontend/frontend/src/pages/PollView.jsx - Create poll → Feature docs: opens
Frontend/frontend/src/pages/CreatePoll.jsx - HTTP and socket server → Poll endpoints: mounts routes
Backend/server.js - Poll endpoints → Poll operations: dispatches requests
Backend/routes/pollRoutes.js - Poll operations → Poll records: reads and writes
Backend/controllers/pollController.js - HTTP and socket server → MongoDB: connects
Backend/server.js - Poll records → MongoDB: stores poll data
README.md - View and vote → Socket client: uses socket
Frontend/frontend/src/pages/PollView.jsx - Socket client → Socket.IO service: connects client
Frontend/frontend/src/context/SocketContext.jsx - View and vote → Poll socket room: joins poll room
Frontend/frontend/src/pages/PollView.jsx - HTTP and socket server → Poll socket room: joins sockets
Backend/server.js - Poll operations → Poll socket room: broadcasts updates
Backend/controllers/pollController.js - Poll socket room → View and vote: delivers updates
README.md - Poll visitor → Create poll: submits poll
Frontend/frontend/src/pages/CreatePoll.jsx - Poll visitor → View and vote: casts vote
Frontend/frontend/src/pages/PollView.jsx