self care SMS
a playful project to crowdsource self-care among strangers. built using cathy deng's original sms bot project in the buzzfeed open lab repo.
This is a flask app that handles text message exchanges with strangers. It uses Twilio to send/receive SMS.
In a nutshell, the app:
- texts a prompt
- stores responses
- texts randomly selected responses from strangers
- texts notifications when responses have been seen
- allows admins to moderate responses
Try it out: 1 (530) 212-6073
1. Make sure you have OS level dependencies
- Python 3
2. Clone this repo
3. Install required python libraries
(Optional but recommended: do this within a python virtual environment)
pip install -r requirements.txt
4. create a MySQL database
mysql -u root
create database sms_self_care;
If you're working locally, you're good to go. But if you're going to host this on a shared server you probably want to create a new user for this database instead of using
5. Configure the app
There are two ways to do this: (a) making a config file or (b) setting environment variables.
You will need the credentials from your Twilio account & number to configure the app. You can find your Twilio keys on https://www.twilio.com/console
Copy the example secret config file
cp sms_swap/config_vars_secret.py.example sms_swap/config_vars_secret.py
sms_swap/config_vars_secret.py.example for the names of environment variables to set & descriptions of what the values should look like.
6. Run the app locally
7. Initialize the database
/initialize route (e.g.
localhost:5000/intialize) & enter admin credentials (
ADMIN_PASS). This will create the table for storing responses.