$ show guidone/node-red-contrib-chatbot
This repository is a comprehensive Node-RED package for building multi-platform chatbots with minimal coding. It provides a visual flow editor (Node-RED) with over 100 custom nodes for message handling, conversation management, AI integration (OpenAI, Dialogflow), and platform adapters for Telegram, Facebook Messenger, WhatsApp, Slack, Viber, Sinch, DeepChat, and more. The package also includes Mission Control, a React-based admin dashboard for managing users, content, messages, plugins, and device tracking, with a GraphQL API and WebSocket real-time updates. The architecture follows a middleware pattern (ChatExpress) for message normalization and platform abstraction, with a plugin system (code-plug) for extending the admin UI. While primarily an application, it includes some data persistence (SQLite via Sequelize) for chat logs, user records, and content management, but no data science or analytics pipelines.
The LLM identified 4 files worth highlighting for reuse:
Implements a SocketHub that maps chat IDs to live WebSocket connections, buffers outbound messages while offline, flushes on reconnection, and replaces stale connections. Demonstrates a robust real-time messaging pattern with heartbeat, buffer limits, and close codes. Could be extracted as a standalone WebSocket connection manager for any chat application.
An asynchronous template engine that resolves {{variable}} placeholders from chat context, flow/global context, and special values. Supports nested lookups and async resolution. This is a self-contained utility that could be reused in any Node.js project needing dynamic string interpolation with context.
A lightweight plugin system for the Mission Control admin UI, allowing registration of pages, widgets, sidebar items, permissions, and reducers. Uses a service-container pattern with hooks and components. This is a well-architected extensibility framework that could be adapted for other admin panels or modular applications.
A Node-RED node that evaluates a set of rules (language, command, event, variable comparison, etc.) to route messages to different outputs. The rule evaluation logic is self-contained and could be extracted as a standalone rule engine for any event-driven system, independent of Node-RED.