Giter Site home page Giter Site logo

alfred-chatbot's Introduction

๐Ÿคต ๐Ÿค– Alfred

Alfred's proxy chatbot written in PHP

Entry point: bot.php

Setup instructions

LAMP/XAMPP stack must be setup first

cd public_html/  # or /var/www/html/
git clone [email protected]:aldnav/alfred-chatbot chatbot
cd chatbot
composer install
ngrok http
# should now be accessible via
# if from public_html/ - https://<ngrok-url>/~<pc-username>/chatbot/bot.php - e.g. https://g2kcx3.cf/~aldnav/chatbot/bot.php
# if from /var/www...  - https://<ngrok-url>/chatbot/bot.php
# visit web portal provided by running the ngrok command above

Update your messenger app's event subscription setting to point to the ngrok url above. Validate with the token you provide, e.g. masterbruce. Once validated, you are now ready to interact with the bot.

If you stop ngrok and run it again, it will give you another ngrok endpoint when you use the free plan. This means that you need to update your messenger apps' url setting to point to the new ngrok endpoint.

Installation

sudo apt install mongodb-org mongodb-org-server
sudo systemctl start mongod
sudo systemctl status mongod
composer install
sudo service apache2 restart

Contributing Guide

First off, thank you for taking the time to contribute!

When contributing to this repository, please first discuss the change you wish to make via issue, email, or any other method with the owners of this repository before making a change.

Local development workflow:

- Postman sends request -> FbBot receives requests -> Commands process messages -> Sends back response -> Postman displays response
                                FbBot.php               \Commands\Twitter.php
                                                        \Commands\Reminder.php
                                                        \Commands\Base.php

Code management:

Making updates

  • Create a branch. Branch out from master always. -b means create and checkout a new branch. For more help, type git {command} -h
git checkout master
git checkout -b feature/simple-reminder
  • Make changes.
  • Add changes.
git add {list of files you want to add}
  • Commit to changes made. Describe what the update is about.
git commit -m "Add a simple reminder list"
  • Make more changes and follow the previous steps. Or, when you think you have to save this to our remote repository (e.g. aldnav/alfred-chatbot) git push origin feature/simple-reminder

Pulling updates

  • Pull updates from the branches you need
git checkout feature/simple-reminder
  • If there are conflicts, check the files listed. Resolve them first by editing each conflicted file.

Creating a Pull Request

When you are ready to get your code reviewed, create a pull request. "Base" means the branch where you want it merged. So for example, you are done with the simple-reminder feature, you create a base: master <- compare:feature/simple-reminder pull request.

Wait for others to review your work. This is important to keep the master branch stable and working.

alfred-chatbot's People

Contributors

aldnav avatar

Watchers

 avatar  avatar  avatar  avatar

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.