Description:
Currently, our product pages are static regarding other users' activity. Adding a real-time "Live Viewers" indicator (e.g., "4 people are looking at this right now") would introduce a sense of urgency and potentially increase conversion rates. Since Socket.io is already configured for stock updates, we can seamlessly leverage the existing infrastructure for this feature.
Proposed Implementation:
Backend: Create a joinProductRoom socket event. Track active socket connections per product room and broadcast the updated viewer count (liveViewersUpdate) whenever a user joins or disconnects.
Frontend (ProductPage.jsx): Emit joinProductRoom on component mount, passing the productId, and listen for the liveViewersUpdate event.
UI: Render a small, subtly pulsating badge near the "Add to Cart" button to display the live count.
@niharika-mente could you plz assign this issue to me under SSOC 2026?
Description:
Currently, our product pages are static regarding other users' activity. Adding a real-time "Live Viewers" indicator (e.g., "4 people are looking at this right now") would introduce a sense of urgency and potentially increase conversion rates. Since Socket.io is already configured for stock updates, we can seamlessly leverage the existing infrastructure for this feature.
Proposed Implementation:
Backend: Create a joinProductRoom socket event. Track active socket connections per product room and broadcast the updated viewer count (liveViewersUpdate) whenever a user joins or disconnects.
Frontend (ProductPage.jsx): Emit joinProductRoom on component mount, passing the productId, and listen for the liveViewersUpdate event.
UI: Render a small, subtly pulsating badge near the "Add to Cart" button to display the live count.
@niharika-mente could you plz assign this issue to me under SSOC 2026?