ContriHUB / EAT_EASY

EatEasy- A mess management website , Managing Complaints Mastering Satisfaction
MIT License
0 stars 18 forks source link

Modify Real-Time Comment Section with Upvote/Downvote Using Socket.io #1

Closed Codipk closed 1 month ago

Codipk commented 1 month ago

Description

We need to implement a real-time comment section for user complaints, allowing users to upvote and downvote comments. Both comments and vote counts (upvotes/downvotes) should update for all users connected to the system in real time, ensuring smooth communication, interaction, and feedback.

Features:

1.Real-Time Updates: Comments, upvotes, and downvotes should be sent and received in real time without requiring page reloads. 2.Upvote/Downvote Feature: Users should be able to upvote and downvote comments, with vote counts updating instantly across all connected users.

Technical Details:

Backend: Use Node.js and Express to handle server-side logic. Manage upvote/downvote actions through Socket.io to ensure real-time updates. Store votes in a database for persistence. Real-Time Communication: Use Socket.io to manage both real-time comment updates and voting actions (upvote/downvote). Ensure changes to vote counts are broadcasted to all connected users immediately. Frontend: Dynamically update comments and vote counts using React without requiring a page reload. Display upvote/downvote buttons for each comment, along with real-time vote counts.

Screenshot 2024-10-05 at 10 37 41 PM
Codipk commented 1 month ago

@Aryan10 ,You can start working on this issue. After you complete the task, create a pull request (PR) and make sure to attach a screenshot of your work on the website to showcase what you've done.

Codipk commented 1 month ago

@Aryan10 write here comment so that I can make you asignee

Aryan10 commented 1 month ago

Hello sir, can you assign this to me?

Codipk commented 1 month ago

@Aryan10 Can u verify once whether it is working fine or not bcoz from my side it is not changing real time .Take the changes from current repo .

Aryan10 commented 1 month ago

@Codipk it might be an issue with the ports. I have performed all tests at • client running at 3000 (hardcoded as default) • server running at 4000 • socket-server running at 5000 (hardcoded as default)

I have just tested and it is possible to change these with .env files. Please ensure these are set properly.

(server .env) FRONTEND_LINK=http://localhost:3000 SOCKET_SERVER_PORT=7000

(client .env) REACT_APP_SOCKET_SERVER_URL=http://localhost:7000

This requires introducing changes to the documentation for .env file.

Codipk commented 1 month ago

Okay! You can modify the read me file for this purpose. but no issue

Aryan10 commented 1 month ago

@Codipk Thank you I will keep that in mind next time.