Giter Club home page Giter Club logo

bmatch's Introduction

Bmatch

Connect voluntary blood donors with recipients. Chatbot built with Here, Telegram, Facebook messenger, Wit ai, and Sails JS

Requirements

  1. Here Developers Account
  2. Wit AI Account.
  3. Facebook Messenger Account.
  4. Telegram Account.
  5. Mac OS (feel free to use any OS).
  6. Git.
  7. Node (NPM)
  8. Sails JS.
  9. Mongo DB.
  10. Ngrok or a cloud hosting service (DigitalOcean, AWS).

Setup

Here:

  1. Create a freemium account via Here.
  2. Create an API Key and store it in your OS environment variable by running:
export HERE_API_KEY=YOUR-API-KEY
  1. Create places data layer and store the space ID in your OS environment variable by running:
export HERE_SA_PLACE_SPACE_ID=YOUR-SPACE-ID

Note: We used South Africa data layer. Feel free to replace HERE_SA_PLACE_SPACE_ID with your preferred variable name and also update it in your code 4. Create an access token and store it in your OS environment variable by running:

export HERE_ACCESS_TOKEN=YOUR-ACCESS-TOKEN

Telegram:

  1. Create a new chatbot via BotFather.
  2. Store the newly created telegram bot access token in your OS environment variable by running:
export TELEGRAM_TOKEN=YOUR-ACCESS-TOKEN

Facebook

  1. Follow the necessary steps to create a developer account and chatbot via Facebook Messenger Documentation.
  2. Store your Facebook token in your OS environment variable by running:
export FACEBOOK_TOKEN=YOUR-FACEBOOK-APP-TOKEN

Wit AI:

  1. Store the wit.ai server access token in your OS environment variable by running:
export WIT_AI_TOKEN=YOUR-WITAI-ACCESS-TOKEN

Usage

Navigate to the project directory in your terminal and install the necessary packages

npm install

Start the project by running:

Production
npm run start
Development
npm run dev

Open a new terminal, Navigate to the project directory and start your Ngrok Server

ngrok http 1500

To set the webhook URL to your telegram chatbot, run this in your terminal. Note: Replace YOUR_NGROK_URL with your Ngrok server URL.

curl https://api.telegram.org/bot$TELEGRAM_TOKEN/setWebhook?url=https://YOUR_NGROK_URL/flow/callback/telegram

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.