All Projects → evilai → nodejs-bot-platform

evilai / nodejs-bot-platform

Licence: other
Node.js bot and personal assistants platform. Boilerplate, start point, tools, best practices for building bots and personal assistants.

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to nodejs-bot-platform

Botpress
🤖 Dev tools to reliably understand text and automate conversations. Built-in NLU. Connect & deploy on any messaging channel (Slack, MS Teams, website, Telegram, etc).
Stars: ✭ 9,486 (+16839.29%)
Mutual labels:  bot-framework, conversational-ui, bot-builder
BotBuilder.Standard
An unofficial CoreCLR targeted .NET Standard ported version of BotBuilder.
Stars: ✭ 22 (-60.71%)
Mutual labels:  bot-framework, bot-builder
Botonic
Build chatbots and conversational experiences using React
Stars: ✭ 144 (+157.14%)
Mutual labels:  bot-framework, conversational-ui
flow-bot
Framework to make bots based on Microsoft Bot Framework.
Stars: ✭ 14 (-75%)
Mutual labels:  bot-framework, bot-builder
Slick
Slick, a Slack bot in Go
Stars: ✭ 150 (+167.86%)
Mutual labels:  bot-framework, conversational-ui
MyBot
🧠 Create chatbots easily with Bot Framework! 🤖
Stars: ✭ 30 (-46.43%)
Mutual labels:  bot-framework, bot-builder
Rasa
💬 Open source machine learning framework to automate text- and voice-based conversations: NLU, dialogue management, connect to Slack, Facebook, and more - Create chatbots and voice assistants
Stars: ✭ 13,219 (+23505.36%)
Mutual labels:  bot-framework, wit
Botframework Solutions
Welcome to the Bot Framework Solutions repository which is the home for a set of templates and solutions to help build advanced conversational experiences using Azure Bot Service and Bot Framework. Microsoft Bot Framework is a comprehensive framework for building enterprise-grade conversational AI experiences.
Stars: ✭ 965 (+1623.21%)
Mutual labels:  bot-framework, conversational-ui
Botframework Sdk
Bot Framework provides the most comprehensive experience for building conversation applications.
Stars: ✭ 6,673 (+11816.07%)
Mutual labels:  bot-framework, bot-builder
Stealth
An open source Ruby framework for text and voice chatbots. 🤖
Stars: ✭ 481 (+758.93%)
Mutual labels:  bot-framework, conversational-ui
airy
💬 Open source conversational platform to power conversations with an open source Live Chat, Messengers like Facebook Messenger, WhatsApp and more - 💎 UI from Inbox to dashboards - 🤖 Integrations to Conversational AI / NLP tools and standard enterprise software - ⚡ APIs, WebSocket, Webhook - 🔧 Create any conversational experience
Stars: ✭ 299 (+433.93%)
Mutual labels:  bot-framework, conversational-ui
Botframework Webchat
A highly-customizable web-based client for Azure Bot Services.
Stars: ✭ 1,198 (+2039.29%)
Mutual labels:  bot-framework, conversational-ui
Eddi
Scalable Open Source Chatbot Platform. Build multiple Chatbots with NLP, Behavior Rules, API Connector, Templating. Developed in Java, provided with Docker, orchestrated with Kubernetes or Openshift.
Stars: ✭ 171 (+205.36%)
Mutual labels:  bot-framework, conversational-ui
Whatsapp Bot
BOT - WhatsApp Web in TypeScript
Stars: ✭ 170 (+203.57%)
Mutual labels:  bot-framework
Botbuilder Community Dotnet
Part of the Bot Builder Community Project. Repository for extensions for the Bot Builder .NET SDK, including middleware, dialogs, recognizers and more.
Stars: ✭ 196 (+250%)
Mutual labels:  bot-framework
Telegram Bot Sdk
🤖 Telegram Bot API PHP SDK. Lets you build Telegram Bots easily! Supports Laravel out of the box.
Stars: ✭ 2,212 (+3850%)
Mutual labels:  bot-framework
Serverless Slack App
A Serverless.js Slack App Boilerplate with OAuth and Bot actions
Stars: ✭ 217 (+287.5%)
Mutual labels:  bot-framework
Botbuilder Microsoftteams
Microsoft Bot Builder extension library for developing bots for Microsoft Teams
Stars: ✭ 192 (+242.86%)
Mutual labels:  bot-framework
Framework
Chatbot framework
Stars: ✭ 130 (+132.14%)
Mutual labels:  bot-framework
Awesome Bots
The most awesome list about bots ⭐️🤖
Stars: ✭ 2,864 (+5014.29%)
Mutual labels:  bot-framework

Node.js Bot Platform

This is a Node.js platform for bots (boilerplate and start point). Implemented on top of Express, which is used only for routing, so it's easily can be changed. Platform in this case is a boilerplate, set of tools, architecture and best practices for bot building.

What's implemented.

Keys (important)

Google Cloud

Be sure that you replaced keys in /keys/ folder. To download json with keys:

  1. Go to Google Console API manager and check credentials.
  2. Click on the button Create credentials -> Service Account Key -> JSON.
  3. Download generated file, rename it to google.json and replace /keys/google.json.
  4. Don't forget to enable APIs (if you use it, of course):
    • Datastore
    • Natural Language

Other keys

Please, replace app.yaml and app-dev.yaml files and provide listed keys. If you use different environments (live/staging/dev), don't forget to specify different keys. Right now there are only two environments: development and production.

Example of app.yaml file:

runtime: custom
vm: true

env_variables:
  LOGGING_LEVEL: 'debug'
  APP_WIT_TOKEN: 'yourkeyhere'
  APP_WIT_VERSION: '20161008'
  GOOGLE_PROJECT_ID: 'youridhere'
  FACEBOOK_PAGE_TOKEN: 'yourtokenhere'
  NEW_RELIC_APP_NAME: 'youappname'
  NEW_RELIC_LICENSE: 'yourkey'

Example of the app-dev.yaml file:

runtime: custom
vm: true

env_variables:
  LOGGING_LEVEL: 'silly'
  APP_WIT_TOKEN: 'yourkeyhere'
  APP_WIT_VERSION: '20161008'
  MEMCACHE_PORT_11211_TCP_ADDR: 'localhost'
  MEMCACHE_PORT_11211_TCP_PORT: '11211'
  GOOGLE_PROJECT_ID: 'youridhere'
  FACEBOOK_PAGE_TOKEN: 'yourtokenhere'
  NEW_RELIC_APP_NAME: 'youappname'
  NEW_RELIC_LICENSE: 'yourkey' 

It's almost the same, but logging level is different and you need to provide memcached host and port. In case of app.yaml (for production) it will be provided by Google App Engine automatically.

Build

For building I use webpack. Please, notice that I have aliases for common libraries and files, that I use:

  • skill-cluster (pretty self explanatory, will discuss later)
  • config (please, keep only global configuration for the whole platform)
  • logger (based on Winston)

You can find configuration at /build/index.js.

How to build

  • npm run build:dev - build for development.
  • npm run build:dev:watch – build for development in watch mode.

Start

Package.json scripts

  • npm run start – run production environment with keys from app.yaml.
  • npm run start:dev – run development environment with keys from app-dev.yaml.

Shell scripts

All shell scripts are used by package.json scripts, so you don't need to run it explicitly.

  • /tools/start/prod.sh – read variables from app.yaml and starting builded bot in /dist/bot.js.
  • /tools/start/dev.sh – read variables from app-dev.yaml and starting builded bot in /dist/bot.js.

Deployment

Node.js Bot Platform right now is easily deployable to Google App Engine.

Architecture

Please, check code and folders. I'll try to add README in all folders and leave as much comments in the code as possible.

File system

  • The major folder is /src/bot. There you should put all skills clusters for all IM Platforms.
  • In folder /src/bot/skills/clusters you should put only reusable (between different platforms) skills and skills clusters.
  • In folder /src/bot/platforms/ you should put unique, not reusable skills and clusters.

Code

Please, check comments inside files. I use Express.

index.js

In the index.js file look at yourBotMessengerRouter and buildRoute functions, that add new route to Express Router. This route should be used by webhooks (like FB Messenger) or device API.

  • '/messenger/yourbot' – is a url, that you need to specify in your messenger webhooks. For example https://yourbot.app.com/messenger/yourbot.
  • buildRoute – just add provided routes to the Express Router.
  • yourBotMessengerRouter – is the most important part. There you can add or remove different services, that you want to use (for example, Google Storage, Memcached, Wit.ai and others) in your skills. Also you specify the initial Skills Cluster:
/bot/platforms/messenger/bot-name/router-builder.js

Check comments inside files. In this file you should:

  • add routes for web hooks;
  • set up all services that can be used in skills;
  • initialize request context, that can be passed between skills;
  • and finally run initial Skills Cluster.
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].