
Security News
Axios Supply Chain Attack Reaches OpenAI macOS Signing Pipeline, Forces Certificate Rotation
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.
ws-chat-sdk
Advanced tools
React chat widget SDK for restaurant customer service with AI and human CS support - Optimized for React 18+
A comprehensive real-time chat widget system with AI assistance and seamless customer service handover, built with React, TypeScript, Socket.IO, and Next.js.
npm install ws-chat-sdk
# or
yarn add ws-chat-sdk
# or
pnpm add ws-chat-sdk
"use client";
import 'ws-chat-sdk/dist/index.css';
import { ChatWidget } from 'ws-chat-sdk';
export default function HomePage() {
return (
<div>
<h1>Welcome to Our Store</h1>
<ChatWidget
serverUrl="http://localhost:3001"
customerId="customer_123"
customerName="John Doe"
position="bottom-right"
primaryColor="#4F46E5"
/>
</div>
);
}
"use client";
import 'ws-chat-sdk/dist/index.css';
import { CSChatPanel } from 'ws-chat-sdk';
export default function CSDashboard() {
return (
<div>
<h1>Customer Service Dashboard</h1>
<CSChatPanel
serverUrl="http://localhost:3001"
csUserId="cs_001"
csName="Agent Sarah"
position="bottom-right"
primaryColor="#10B981"
/>
</div>
);
}
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
serverUrl | string | ✅ | - | WebSocket server URL |
customerId | string | ✅ | - | Unique customer identifier |
customerName | string | ✅ | - | Customer display name |
position | 'bottom-right' | 'bottom-left' | ❌ | 'bottom-right' | Widget position |
primaryColor | string | ❌ | '#4F46E5' | Primary theme color (hex) |
| Prop | Type | Required | Default | Description |
|---|---|---|---|---|
serverUrl | string | ✅ | - | WebSocket server URL |
csUserId | string | ✅ | - | Unique CS agent identifier |
csName | string | ✅ | - | CS agent display name |
position | 'bottom-right' | 'bottom-left' | ❌ | 'bottom-right' | Panel position |
primaryColor | string | ❌ | '#10B981' | Primary theme color (hex) |
This widget requires a Socket.IO server with the following events:
start_chat - Initialize chat sessioncustomer_message - Send customer messageget_customer_chat_history - Request chat historymark_message_read - Mark message as readcs_login - CS agent logincs_logout - CS agent logoutcs_select_room - Select chat roomcs_send_message - Send CS messagecs_get_all_rooms - Get all chat roomscs_mark_messages_read - Mark messages as readchat_started - Chat session createdreceive_message - New message receivedai_typing - AI is typing indicatorcs_assigned - CS agent assignedmessages_read_by_cs - Messages read by CScustomer_chat_history - Chat history datacs_chat_rooms - Available chat roomscs_chat_history - Room chat historycustomer_message_to_cs - Customer message notificationnew_customer_chat - New chat notificationcs_message_sent - Message sent confirmationmessage_read_by_customer - Read receipt<ChatWidget
serverUrl="http://localhost:3001"
customerId="customer_123"
customerName="John Doe"
primaryColor="#FF6B6B" // Custom red
/>
<ChatWidget
serverUrl="http://localhost:3001"
customerId="customer_123"
customerName="John Doe"
position="bottom-left" // Left side
/>
Check console for errors
Verify serverUrl is correct
Ensure Socket.IO server is running
Check CORS settings on server
Check socket connection status
Verify customerId/csUserId are unique
Check browser console for errors
Ensure event names match server implementation
Ensure Tailwind CSS is properly configured
Check for CSS conflicts
Verify component is client-side rendered ("use client")
Full TypeScript support with type definitions included:
import type { ChatWidgetProps, CSChatPanelProps, Message, ChatRoom } from 'ws-chat-sdk';
Contributions are welcome! Please follow these steps:
git checkout -b feature/amazing-feature)git commit -m 'Add amazing feature')git push origin feature/amazing-feature)For issues and questions:
Made with ❤️ by Intelsysdata
Version: 1.1.6
Last Updated: November 2025
FAQs
React chat widget SDK for restaurant customer service with AI and human CS support - Optimized for React 18+
The npm package ws-chat-sdk receives a total of 14 weekly downloads. As such, ws-chat-sdk popularity was classified as not popular.
We found that ws-chat-sdk demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
OpenAI rotated macOS signing certificates after a malicious Axios package reached its CI pipeline in a broader software supply chain attack.

Security News
Open source is under attack because of how much value it creates. It has been the foundation of every major software innovation for the last three decades. This is not the time to walk away from it.

Security News
Socket CEO Feross Aboukhadijeh breaks down how North Korea hijacked Axios and what it means for the future of software supply chain security.