SG Supermarket bot allow users to easily access SG Supermarket promotions through this bot.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See Wiki for more details on how to deploy the project on a live system and other sample codes.
Here is how the different services are used and connected in my solution.
- The developer creates the chatbot using Microsoft Bot Framework (Bot Builder SDK) and deploy the code into GitHub for version control.
- Azure Cloud Services is used to host the Chatbot. An Azure Web App is created to provide the endpoint for the web service that will be used to point at to access the chatbot and connect to Bot Service for publication of the Chatbot to other channels (Facebook Messenger in particular for SG Supermarket Chatbot). It get access to the codes via GitHub repository. Language Understanding Intelligent Service (LUIS) is used and connected to the Web App to bring intelligence to the chatbot to behave just like like human.
- Having published the application to the platform, end-users can then interact with the chatbot
- Install NodeJS - Programming Language used for SG Supermarket
- Install Visual Studio Code* - You may use this code editor to edit your codes
- Install Git - Git for version control of your codes
- Install Bot Framework Emulator - For Local testing of the chatbot before deployment
- Azure Subscription - Required to publish the chatbot for public usage in the various platform (e.g. embed in webpage, Facebook Messenger, Telegram, Slack, etc.)
- Clone the
SGSupermarketChatbot
locally. In a terminal, run:
$ git clone https://github.com/chialiyun/SGSupermarketChatbot.git
- Change the directory in
SGSupermarketChatbot
$ cd SGSupermarketChatbot
- Install all required packages
$ npm install
- In the same terminal, run:
$ node index.js
This should show you:
$ restify listening to http://[::]:3978
-
Launch the
Microsoft Bot Framework Emulator
. You can read more about it here -
Create a new bot configuration Bot configuration is a file that keeps your settings that reaches out to your chatbot. Just by doing this step, you no longer have to always type your end point.
- Click on 'create a new bot configuration' in the Welcome page or File -> New Bot Configuration.
- Fill in the required fields and click save and connect:
Currently, for a local chatbot we only need to fill in:
- Bot Name (Give it any name that will be easy for you to identify next time)
- End Point URL ("http://localhost:3978/api/messages") As we are building the chatbot locally, our endpoint now will be pointing to the localhost (our computer)
- Start Testing
- Microsoft Bot Builder SDK
SG Supermarket by Chia is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License.