Salonniere is an intelligent event organizer that won UC Berkeley's Chatbot Collider Competition in Fall 2016. Here's an article about the competition and results.
Salonniere's Webpage
Salonniere's Facebook Page
This repository contains static informational pages and endpoints for Facebook's Messenger Bot API.
Based on this tutorial and this guide
Follow the instructions here with some small changes. Basically, follow the steps below (verify with the guide) with some small differences, which are specially marked below.
- Install dependencies. Do note that you can use
virtualenv
if you want; if you don't, you will have to manually edit requirements.txt later (as opposed to just$ pip freeze > requirements.txt
).
$ pip install Flask
$ pip install psycopg2
$ pip install Flask-SQLAlchemy
$ pip install gunicorn
$ pip install Flask-Heroku
$ pip install wit
$ pip install flask-mail
- Install Postgress.app.
Add this to your .bash_profile (*This is different from the guide because the latest version is 9.6 and not 9.3)
export PATH="/Applications/Postgres.app/Contents/Versions/9.6/bin:$PATH"
Run the downloaded app. Then, create a new database (for the main database I used locally, I called it all-users
). In terminal, run:
$ createdb main
.
You can verify that the database was created by running =# \list
in psql (the downloaded App's terminal, or running psql in the terminal). If your database was created succesfully, you should see a database with the name all-users
.
- Create database based off the model.
$ python
>>> from app import db
>>> db.create_all()
>>> exit()
-
Add DB URL to app.py Uncomment line 12 in app.py (
# app.config['SQLALCHEMY_DATABASE_URI'] = 'postgresql://localhost/all-users'
) to let Flask know where the postgresql database is. Comment out line 14 (heroku = Heroku(app)
). -
Run it! Try running
python app.py
and go tolocalhost:5000/signup
and after inputting an email verify that it shows up inlocalhost:5000/users
. -
To deploy to Heroku, undo step 3. You'll need to install the Heroku toolbelt and link it to your account, which should have access to our Heroku app (salonniere.herokuapp.com)