REAL TIME POLLING AND CHAT
Command to run:-
npm i
Node server
Real-time Polling Application with Chat Feature
Objective: Develop a comprehensive real-time polling application that integrates a voting system and a chat feature. This assignment focuses on combining these two features to create an engaging and interactive application using WebSockets and Node.js.
Requirements:
-
Project Setup:
- Create a new Node.js project with necessary dependencies (Express and Socket.IO).
- Set up an Express server to serve static files and handle WebSocket connections.
- Integrate Socket.IO to facilitate real-time communication.
-
Client-side Interface:
- Design an interactive HTML interface for the polling and chat application.
- Display the poll options, their current vote counts, and the chat interface.
- Implement user interface elements for voting, sending chat messages, and displaying chat history.
-
Real-time Voting System:
- Enable users to vote on various topics or options.
- Implement a real-time update mechanism for poll results, notifying all connected users.
- Utilize broadcasting to ensure all users receive updated poll data.
-
Real-time Chat Feature:
- Integrate a real-time chat feature alongside the polling interface
- Typing Indicator (Shows a dot animation when a user is typing)
- Allow users to send and receive chat messages in real-time.
- Ensure that chat messages are visible to all connected users.
-
Data Management:
- Maintain data structures on the server to store poll options, chat messages, and user information.
- Update poll data and store chat messages as users interact.
-
Authentication and User Management:
- Develop a basic user authentication system to uniquely identify users.
- Associate user names with chat messages.
-
Styling and User Experience:
- Apply CSS styling to create an attractive and user-friendly interface.
- Differentiate the sections for polling, chat, and voting buttons.
-
Bonus Challenges (Optional):
- Allow users to edit or delete their chat messages.
- Implement persistent user profiles and message history.
- Provide options to mute or disable chat notifications.