Skip to content

HALtheWise/bear-with-me

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

57 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bear-with-me

Creating authentic human connection in the modern world, via bear.

By: Eric Miller, Toby Shapinsky, Jared Briskman

Drawing inspiration from bear-as-a-service.

Overview

bear-with-me is a project of both software and social invention. Users call The Bear, who will connect their call with another random user, and give them a conversation prompt. This provides an unexpected yet intentional interaction.

From a technical perspective, bear-with-me is a python webapp integrated with twilio, and deployed on heroku.

Setup

Python

Use pipenv for dependency resolution. Installation instructions here.

Then resolve python dependencies with:

$ pipenv install

Heroku

You will also need the heroku CLI. On Ubuntu:

$ sudo snap install heroku --classic

Postgres

Install

For development, a local postgresql db is recommended. Install postgres:

$ sudo apt install postgresql

On Ubuntu, this installs authorized to a dedicated unix account 'postgres'.

Config

To create a separate account with a password:

$ sudo -i -u postgres
$ createuser <username>
$ createdb <dbname>
$ psql
# ALTER USER <username> WITH ENCRYPTED PASSWORD '<password>';
# GRANT ALL PRIVILEGES ON DATABASE <dbname> TO <username> ;
# \q 

You may also need to modify your pg_hba.conf to change local authentication from peer or ident to md5. More information found here and here.

Environment Variables

Copy env.template to env.local and edit the variables inside to match your configuration. To set the environment, simply $ source env.local.

Database Migrations

To change database schema, modify the models.py file, then commit the migration:

$ pipenv run flask db migrate -m "Changelog goes here"

Check the migration script, and apply with:

$ pipenv run flask db upgrade

To upgrade the production database, run:

$ heroku run upgrade

Local Testing

Upon inital setup, you will need to upgrade the local db prior to use. Make sure all secrets are set in env.local.

To start a local webserver, run:

$ pipenv run gunicorn app:app

Deployment

Heroku server live at https://htl-p1-bear.herokuapp.com/ To deploy, push to the master branch on the heroku remote.

About

Creating authentic human connection in the modern world, via bear.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published