Chat Support Widget - Modular Architecture

This directory contains the modular implementation of the Chat Support Widget, split into focused, maintainable modules.

Structure

Core Files

Feature Modules

Configuration

API & Communication

State & Storage

Utilities

Usage

The main entry point is chat-support.js which imports from this directory:

import { ChatSupportWidget } from "./chatSupport/ChatSupportWidget.js";

Module Responsibilities

ChatSupportWidget

UIManager

WebSocketManager

PollingManager

StorageManager

Session Module

Messages Module

API Module

Benefits

  1. Separation of Concerns - Each module has a single, clear responsibility
  2. Maintainability - Easy to locate and modify specific features
  3. Testability - Modules can be tested independently
  4. Readability - Smaller, focused files are easier to understand
  5. Reusability - Modules can be reused in other contexts

Removed Code