How eduhubsolutions/chatboard works
Project type and purpose
• This is a WordPress plugin (“index.php” + “assets/style.css”) that injects a live-chat/chatbot widget into any WordPress site.
• Its core responsibility is embedding chat UI & loading/supporting the ChatBoard PWA admin console.
• It communicates with ChatBoard’s cloud platform for real-time chat, notifications, analytics, integrations (Dialogflow, WooCommerce, social channels).
File structure
• index.php: the main WP plugin file—registers hooks, shortcodes, enqueues assets, embeds ChatBoard scripts.
• assets/style.css: front-end styling for chat widget.
• README.md/readme.txt: documentation—no other code modules or microservices here.
Extract key architecture points from README
• Front-end chat widget (live chat + chatbot) embedded via shortcode or PHP.
• Back-end PWA admin console (runs within WP admin as a PWA).
• Web API / JS API / PHP API offered by ChatBoard cloud.
• Third-party integrations: Dialogflow, email/SMS/push services, WooCommerce, Facebook/Telegram, etc.
a. WordPress Host
• WP Core
• Chat Board Plugin (index.php + assets)
• Shortcode/Hook processor
• Asset enqueuer (CSS, JS loader for widget & PWA)
• WP Admin Area (with PWA service worker for admin console)
b. Visitor Browser
• Loads WP page → receives ChatBoard widget JS/CSS → displays chat UI
• Initiates WebSocket/REST calls to ChatBoard cloud
• Receives notifications (desktop push, title updates)
c. ChatBoard Cloud Platform
• Chat Server (WebSocket / Socket.io) for real-time messaging
• REST API for configuration, history, analytics
• Authoring & routing (live agents vs. bot)
• Bot Engine (Dialogflow CX/ES integration)
• Notification Engine (email, SMS gateway, push services)
• Data Storage (conversations, user profiles, analytics)
d. Third-Party Services
• Dialogflow (bot responses, NLP)
• WooCommerce (customer data sync)
• Social Channels (Facebook, Telegram)
• Email/SMS providers (SendGrid/Twilio)
• Push Notification Service (Web Push, FCM, APNs)
Relationships & interactions
• User ↔ Browser widget ↔ ChatBoard cloud (messages flow via WebSocket)
• Plugin ↔ Browser (injects widget code, installs PWA in admin)
• WP Admin console ↔ ChatBoard cloud REST API (admin config, view reports)
• ChatBoard cloud ↔ Dialogflow & other third parties (via REST/webhooks)
• ChatBoard cloud ↔ Notification services (via API calls)
Architectural patterns & principles
• Plugin acts as an “edge” or “proxy” that injects front-end code; business logic resides in cloud.
• SPA/PWA pattern for admin console.
• Real-time event bus (WebSocket) for messaging.
• Micro-integrations via REST/webhooks to external services.
• Shortcodes for seamless WP integration.