MindMap Gallery Tiledesk Structural Analysis
This is a mind map about Tiledesk. The main content includes: tiledesk-chatbot, tiledesk, design-studio, tiledesk-dashboard, tiledesk-server.
Edited at 2024-11-17 16:41:40Tiledesk
tiledesk-server
Common dependencies
Server framework: Express, Body-PARSER, COOKIE-PARSER, CORS, Express-Session
database:
MongoDB related: mongoose, mongoose-sequence, multer-gridfs-storage
Redis support: connect-redis
Communication library:
http related: request, request-promise, http, retry-request
WebSocket related: ws
Identity authentication: passport series modules, jsonwebtoken
File processing: multer, sharp (for image processing)
Queue and task scheduling: jobs-worker-queued, node-schedule
Template engines: handlebars and jade
Logging: winston and its MongoDB integration
exclusive dependency
core module
@tiledesk/tiledesk-apps: core module for managing and running Tiledesk applications
Function: Manage and run various applications in Tiledesk.
Purpose: As part of the overall architecture, support routing and scheduling of IM messages
IM dependencies: Provide back-end support, handle message scheduling and data interaction
@tiledesk/tiledesk-client: Client SDK, used for client to communicate with server
Function: Provides an SDK for clients to communicate with Tiledesk servers
Purpose: To implement message sending, receiving, and real-time communication with the Tiledesk server
Description: The core communication module of IM provides communication capabilities for front-end applications and uses WebSocket capabilities for communication.
Connect with tiledesk-chatbot
@tiledesk/tiledesk-chatbot-util: Tool module for developing chatbots
@tiledesk/tiledesk-chatbot-templates: Chatbot templates
Connector module
@tiledesk/tiledesk-whatsapp-connector: Connect WhatsApp API
@tiledesk/tiledesk-telegram-connector: Connect Telegram
@tiledesk/tiledesk-rasa-connector: Connect to Facebook Messenger
@tiledesk/tiledesk-dialogflow-connector: Connect to Google’s Dialogflow
@tiledesk/tiledesk-rasa-connector: connect to Rasa
@tiledesk/tiledesk-kaleyra-proxy: connect Kaleyra
Rules and tasks module
@tiledesk/tiledesk-json-rules-engine: JSON-based rules engine for defining and processing business logic
@tiledesk/tiledesk-train-jobworker: Worker module responsible for chatbot training tasks
@tiledesk/tiledesk-whatsapp-jobworker: Background task for processing WhatsApp messages
Auxiliary function module
@tiledesk/tiledesk-sms-connector: integrated SMS service
@tiledesk/tiledesk-vxml-connector: Integrate VoiceXML capabilities for voice services
IM related service modules
Core modules: messageService.js, requestService.js, testWsService.js
messageService.js: directly handles message sending, receiving, storage and other functions, and is the core module of IM
requestService.js: manages message requests and may be responsible for the logic of sending and receiving instant message requests
testWsService.js: related to WebSocket testing, may be used for real-time communication testing of IM systems
User management: userService.js, banUserNotifier.js
userService.js: manages user information, such as user login status, authentication, etc.
File processing: fileService.js, fileGridFsService.js, filesystemService.js
Handles file uploads, downloads, and storage, possibly for IM's file sharing functionality
Cache: cacheEnabler.js, mongoose-cache.js
Session flow related service modules
Core modules: chatbotService.js, openaiService.js
chatbotService.js: The core logic module of the chatbot, managing the processing and response of the conversation flow
openaiService.js: Integrate OpenAI services to support generating AI conversations in conversation flows
Session management: labelService.js
labelservice.js: processing label management, used to classify and diverge the dialogue
Event handling: subscriptionNotifier.js, updateLeadQueued.js
subscriptionNotifier.js: A service that notifies subscription events, related to dynamic dialogue flow updates or function triggers
updateLeadQueued.js: handles tag management for classifying and triaging conversations
Summarize:
Developed entirely based on basic libraries, no third-party products are used
Communication is based on WebSocket, and external services use the http interface.
tiledesk-chatbot
Mainly responsible for two functions: chatbot and help center
Common dependencies
Backend service architecture:
Use Express to build API services
Support MongoDB and Redis for data storage and caching
Templates and internationalization:
Support handlebars and liquidjs to handle dynamic templates
Provide language parsing function (accept-language-parser)
Security:
Authentication using JWT
Use vm2 to provide a sandboxed script execution environment
Development library:
Provides multiple tool libraries (such as axios, dotenv and uuid) to improve development and operation efficiency
exclusive dependency
@tiledesk/helpcenter-query-client
Responsible for interacting with the Tiledesk Help Center and supporting queries to the knowledge base and FAQ
@tiledesk/tiledesk-chatbot-client
Provides a client interface to the Tiledesk chatbot API.
@tiledesk/tiledesk-chatbot-util
Provide some auxiliary functions (processing message formats, building robot conversations)
@tiledesk/tiledesk-client
Universal SDK, used for client-server communication and the same package used by server
@tiledesk/tiledesk-tybot-connector
Integrate TyBot, which may involve extended support for external services
core module
tybotRoute
models
Is a module in the project used to interact with data, such as user, session or message models
tiledeskChatbotPlugs
It is the core part of the project, which contains logic related to the Tiledesk chatbot.
Summarize:
Server-side project based on Node.js
May be used to extend the functionality of the Tiledesk chatbot, or implement specific conversation flow and caching mechanisms
Summarize
The warehouse is constantly updated
There is very little code involving artificial intelligence capabilities, basically simple communication
This project is one of the core functions provided by Tiledesk (chatbot, help center)
It combines some common Node.js tool libraries for building and extending back-end services.
design-studio
Front-end interface engineering for conversation flow
core framework
Modular and responsive web application based on Angular 14
@angular/animations: provides animation support for dynamic effects and transition animations
@angular/cdk: Material Design component development toolkit (such as drag-and-drop, layout)
Library for implementing session flow drag and drop function
@angular/common: Provides common functional modules such as built-in directives and pipes
@angular/compiler: Angular template compiler
@angular/core: Angular’s core functional module, supporting dependency injection, components and other functions
@angular/material: UI component library for Material Design skins
Change skin and change here
@angular/platform-browser-dynamic: supports dynamic module loading
@angular/platform-browser: BOM manipulation library
@angular/forms: form processing module, supporting template-driven forms and responsive forms
@angular/router: routing management
zone.js: Angular runtime essential library for context management of asynchronous operations
UI and user experience
Use the responsive UI component library provided by Angular Material and Bootstrap
Enhance user experience through Emoji selector, pop-up window (SweetAlert) and other components
Multi-language support
Use @ngx-translate to achieve dynamic multi-language switching, suitable for international applications
Need to make your own language pack
real-time functionality
Support real-time data sync and user authentication using Firebase
other
time module
Log module
test development
typescript
TypeScript compiler, the project requires using ts for development
in conclusion
Pure front-end engineering
tiledesk-dashboard
IM front-end interface
core framework
Modular and responsive web application based on Angular 14
Similar to design-studio
UI and user experience
Similar to design-studio
Back-end support and communication: mainly used for communication and server-side interaction
express: a simple server built-in
Only used in one place and has nothing to do with core functionality
firebase: docked with Google’s back-end service solution
Accessing Google’s account system has nothing to do with core functions
other
Partly similar to design-studio
Add some libraries to improve user experience such as (leaflet, perfect-scrollbar), etc.
in conclusion
Basically it can be regarded as pure front-end engineering
It is basically the same as the project configuration of design-studio. It can be seen that the same technical system is completed.
tiledesk
Only responsible for Docker-related deployment capabilities