Architecture and modules
Messaging channels
Makes bot able to response on any available messaging channel.
- Connector (
<Facebook>, <BotService>, ...
) - transforms an incomming event - Sender (
<FacebookSender>, <BotServiceSender>, ...
) - sends an outgoing event
Conversational interface
Transforms incomming messaging event to bot response and is responsible for managing conversation state.
Modules (Services)
Provides additional abilities like logging, NLP and Notifications.
Chat Logger - Stores the history of conversations
Available at
lib/chatLogStorage.js
and connected to Messaging Channel Connector atbot/index.js
Anonymization - Filters any sensitive data in text messages
Available at
bot/anonymize.js
, connected to<Ai>
atbot/bot.js
and to Analytics atbot/onAction.js
Chat Analytics - By default as an integration to Google Analytics
Available at
bot/onAction.js
connected toProcessor
atbot/Processor.js
to catch incomming events and connected toRouter
atbot/bot.js
to catch all visited interactions.NLP - Natural language processing service
Wingbot NLP is built in core
wingbot
NPM module. It's configured inbot/bot.js
in globalwingbot.ai
service. You can register own NLP modulte withai.register(module)
method.Plugins - Business logic and API integrations
Available at
bot/plugins/index.js
to be able to register all required modules. Connected atbot/bot.js
toBuildRouter
.Notifications
Complex subsystem consists of
Notifications
service atlib/notifications.js
which usesNotificationsStorage
at the same place. Notifications has own "interval" script in routes and are connected as a processor plugin toProcessor
atbot/processor.js
.
GraphQL API
Makes wingbot.ai or other applications able to access bots services. Has own route in routes/api.js
. Allows to attach or detach any API you want.