Feature/realtime customer support chat#231
Merged
mohityadav8 merged 10 commits intoJun 22, 2026
Merged
Conversation
|
@Madhavi1108 is attempting to deploy a commit to the Bhuvansh's projects Team on Vercel. A member of the Team first needs to authorize it. |
…stomer-support-chat
…stomer-support-chat
BHUVANSH855
requested changes
Jun 22, 2026
BHUVANSH855
left a comment
Member
There was a problem hiding this comment.
have a look once on the files changed in PR.
I think you mashed up two issues in this PR.
this PR also contains the changes made in PR #230.
Contributor
Author
|
Hi @BHUVANSH855, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
This PR introduces a complete real-time customer support chat system that enables customers to communicate directly with administrators through an integrated chat widget powered by Socket.io. The implementation provides persistent conversations, live message delivery, secure WebSocket authentication, and a dedicated administrative support interface for managing customer interactions.
The solution combines WebSocket communication, database-backed message persistence, REST APIs, and responsive frontend components to deliver a scalable and production-ready customer support experience.
Closes #190
Type of Change
Checklist
What Was Implemented
Persistent Chat Database Schema
Introduced a dedicated database schema for storing conversations and messages.
New Schema
backend/scripts/chat_schema.sqlThe schema creates:
chat_conversationschat_messagesThe implementation stores:
This enables conversations to persist across sessions and server restarts.
Socket.io Infrastructure
Integrated Socket.io to provide real-time bidirectional communication between customers and administrators.
New Socket Manager
socketManager.jsThe socket layer:
This enables instant messaging without polling.
Server Integration
Updated the backend server architecture to support both REST APIs and WebSocket communication.
Updated Server
server.jsChanges include:
http.ServerSecure WebSocket Authentication
Implemented authentication and room-level access control for all socket connections.
Customers:
Administrators:
admin_roomThis preserves conversation privacy and prevents unauthorized access.
Customer Chat Widget
Created a reusable floating support widget for customer-facing pages.
New Files
chat-widget.jschat-widget.cssThe widget includes:
Customers can access support from anywhere within the storefront.
Global Widget Injection
Integrated the chat widget into the shared frontend component system.
Updated File
components.jsThe widget is automatically injected across customer-facing pages without requiring manual script inclusion for each individual page.
Supported pages include:
Conversation Persistence
Implemented automatic retrieval of previous conversations when users reconnect.
Returning customers:
This improves continuity during customer support interactions.
Administrative Support Dashboard
Extended the administration panel with a dedicated support management interface.
Updated File
admin.htmlAdded a new:
The interface follows a three-pane layout consisting of:
This provides administrators with a centralized workspace for customer communication.
Conversation Management Interface
The administrator dashboard includes:
Left Pane
Supported filters include:
Center Pane
Provides the active messaging interface where administrators can:
Messages synchronize in real time through Socket.io.
Right Pane
Displays customer-related information including:
This provides additional context while handling support requests.
Administrative Chat APIs
Added backend APIs supporting support workflow management.
The implementation enables administrators to:
Administrative actions are protected through existing authentication and authorization middleware.
Client-Side Chat Logic
Updated frontend administration scripts to support real-time chat operations.
Updated File
admin.jsThe implementation handles:
Responsive and Fault-Tolerant Design
The chat system has been designed to handle common runtime scenarios gracefully.
Features include:
This ensures a reliable customer support experience under varying network conditions.
Benefits
Acceptance Criteria
Technical Notes