/open-source-edu-bot

Open Source Education bot, built by the Developer Circles community.

Primary LanguagePythonMIT LicenseMIT

Open Source Love Push Container to Heroku License: MIT

Open Source Education Bot

Open Source Education Bot built by the Facebook Developer Circles community to help members contribute to open source projects.

Installation

requirement: python 3.6 or more

Start by cloning the repository locally and enter the project folder into your system.

git clone https://github.com/fbdevelopercircles/open-source-edu-bot
cd open-source-edu-bot

Setting up the environment:

Create the virtual environment

python3 -m venv venv

On Windows

py -3 -m venv venv

Activate the virtual environment

Before you work on your project, activate the corresponding environment:

. venv/bin/activate

On Windows:

venv\Scripts\activate

Your shell prompt will change to show the name of the activated environment.

Install the required python packages

pip install -r requirements.txt

Set up the environment variables

Navigate to the src folder(root directory of the project):

cd src

Copy the environments file and adapt it:

cp .sample.env .env

On Windows:

copy .sample.env .env

Compile the localization files

pybabel compile -d locales

To start the application locally run

flask run

Using Docker and docker-compose:

If you have docker and docker-compose installed in your computer, just run

docker-compose up -d

Check your webhook with this command

curl -X GET "<YOUR HOST>/webhook?hub.verify_token=<YOUR VERIFY TOKEN>&hub.challenge=CHALLENGE_ACCEPTED&hub.mode=subscribe&init_bot=true"

If your webhook verification is working as expected, you should see the following:

-WEBHOOK_VERIFIED logged to the command line where your node process is running.
-CHALLENGE_ACCEPTED logged to the command line where you sent the cURL request.

Then check the logs to see if the profile is setup successfully!

Test the chatbot

The chatbot can be tested here: https://m.me/OpenSourceChatbot before deploying it to your own page.

CONTRIBUTORS

License

Open Source Education Bot is MIT licensed.