####Check out our live demo Alpha is a bot, or rather a base to craft your own web-based chatbot. We started this project because we think chatbots can be super helpful and quite fun, however the current state of affairs has most chatbots limited to existing messaging platforms such as Facebook, which is quite OK, but what if you want your bot to live elsewhere on the web?
You can build your own bot and define your own visual styles and rules as well as have unlimited control for customization and logic. Various solutions already exist, but they can be limiting, costly and hard to implement.
This is where Alpha comes handy. This library is designed to let you build your own bot in a very simple way. You just have to 1) Download, 2) Insert your own Q&A tree, 3) Insert your own colors and images. Alpha takes care of the whole UI rendering and handling of the application state. You don't really need to know any React (or Javascript for that matter). However, if you know your way around React and Redux you can further customize the rendering of the bot-app, and even connect it to any back-end or AI engine of your choice.
Alpha is built to run on Docker. However you can run it locally as long as you have NodeJS as well as npm or yarn (preferred!) in your system.
To install and run in your computer just run the following commands in your terminal. You'll need to have Docker installed (See below for instructions witout docker):
- Clone this repo:
git clone https://github.com/IcaliaLabs/alpha.git - Navigate into directory:
cd alpha - Start with Docker:
docker-compose up web
That's it! you should see the demo bot up and running in your browser if you open localhost:3000 in your browser.
A couple of important points when running on development mode:
- The bot app will have Hot Reloading enabled, so that you can experience the benefits of Webpack + React.
- Redux DevTools are enabled by default so that you can inspect the app's actions/state chages in real time.
- The time between each bot message is set to 0. This is to minimize developers' frustration when they go over the conversation flow again and again, however you can change this behavior if you wish at
app/containers/BotContainer/sagas.js.
- **Heroku: **
Just run
git push heroku master. This bot is Heroku-ready!
If you wish to install and run without Docker you'll have to install all the dependencies directly in your directory:
For Development:
- Clone this repo:
git clone https://github.com/IcaliaLabs/alpha.git - Navigate into directory:
cd alpha - Run either
npm installoryarn installto install the dependencies - Run
npm startto fire up the server - Visit localhost:3000 in your browser
For Production:
All the logic behind what the bot says, including the Q&A logic live inside the BotMind which lives at app/BotMind/:
The main file for the BotMind is BotMind.js, but this file only acts as the collector and exporter of the functions living at _initialBubble.js, _nextBubble.js, and _recommendationBubbles.js.
These three files in turn carry out their logic based on the Q&A trees that live inside app/BotMind/BotMindFlows/.