emploji bot as Employee self service assitant / focus days 2017 - internal hackathon AXA Winterthur
Additional readme: checkout our hackzurich AXA 2016 GitHub for other ressources how to setup nodejs, Visual Studio Code, Mongodb if needed, Debugging, Nodemon
- download and install nodejs environment
- download and install keypass (to read our passwords)
- download ngrok
- download Microsoft Bot Emulator
- login to Microsoft Bot framework: registering Bot
- login to Microsoft LUIS.ai: learning sentences (intents)
- login to Botsociety.io: designing the bot
- https://nodejs.org/
- Download V6.10.* version and install
- Alternative Linux+Mac using https://github.com/creationix/nvm to support multiple version
- nvm please use version 6.10.3 as "node" version not 7.x
to be able to automatically restart nodejs after a change in a file See our hackzurich documentation
- Download and install http://keepass.info/ to have access to our secured environments
- See file emploji-pass.kdbx
- download from https://ngrok.com/
- download the emulator to test locally or remote bots
- https://docs.microsoft.com/en-us/bot-framework/debug-bots-emulator
- Latest Windows Installer: https://emulator.botframework.com/
- Mac, Linux Installer: https://github.com/Microsoft/BotFramework-Emulator/releases
- install ngrok as described in article
-
Login with microsoft Live ID (emploji@gmail.com)
-
Principles of bot design https://docs.microsoft.com/en-us/bot-framework/bot-design-principles
-
Quickstart Guide documentation NodeJS https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-quickstart
-
Examples on gitHub https://docs.microsoft.com/en-us/bot-framework/nodejs/bot-builder-nodejs-samples
- https://www.luis.ai
- Login with microsoft Live ID (employji@gmail.com)
git clone https://github.com/lolo8304/emploji-bot.git
cp _env .env
edit .env file and configure the 3 settings
use entry in keypass "MICROSOFT_APP_ID emploji bot"
- MICROSOFT_APP_ID= use "user-id" from entry
- MICROSOFT_APP_PASSWORD= use "password" from entry
use entry in keypass "MICROSOFT_LUIS_MODEL"
- MICROSOFT_LUIS_MODEL= use "MICROSOFT_LUIS_MODEL" entry
verify the BOT_DOMAIN pointing to localhost or server
- BOT_DOMAIN_URL=http://localhost:3800
- BOT_DOMAIN_URL=https://emploji-bot.herokuapp.com
verify the DB_URL pointing to localhost (no user and password needed)
- DB_APP_URL=localhost:27018/emploji-bot
verify the DB_URL pointing to remote DB if needed (user and password needed)
- DB_APP_URL=domain:port/name
- DB_APP_USER=user
- DB_APP_PWD=pwd
cd emploji-bot
npm install
cd emploji-bot
npm start
every change of a file will restart
cd emploji-bot
./start-npm.sh
or windows
cd emploji-bot
start-npm.bat
- start emulator
- enter URL: http://localhost:3800/api/messages
- fill in the credentials from keypass
- type 'start' or 'hello'
- if all is fine you should see this
- start npm
- open URL: http://localhost:3800
- stype "start"
- and you should see the "emploji"
- type "testen" and try "5 Tage Ferien am 23.4.2016"
- type "hilfe" and try "was ist focus days"
- buttons does not work !!!!! will fix it
we are using https://botsociety.io to design bot conversations.
- use Chrome Browser
- use https://botsociety.io
- Login with our account emploji@gmail.com
- edit / create new bot
- ...
- open new Browser Tab
- https://emploji-simulator.herokuapp.com/
- click on "Chrome snippet" to get javascript to execute
- Ctrl+a / Cmd+a to select all
- Ctrl+c / Cmd+c to copy
- Menu - "more tools" - "Developer tools"
- Tab "Source"
- "Run" the snippet
- The script creates a JSON file and is uploading it to the central server (based on the script)
- output
bot posting to your.domain.com ... Capture BotSociety:100 ... successfully done