https://github.com/ttarlov/tweet-bot
https://github.com/emackinnon1/oversite-fe
- Steve Meyers GitHub
- Raymond Nguyen GitHub
- Jenny Klich GitHub
- Elliot Mackinnon GitHub
- Taras Tarlov GitHub
OverSite was our final cross pollination project at Turing School of Software and Design. The goal for this project was to build a full stack application from ideation to production in just 14 days. The emphasis was on creating a professional agile workflow with a combination of front-end and back-end developers. The core mission of OverSite is to amalgamate civic information into one easy to use application that allows the user to easily find Senator and Representative contact information, and Tweet at them directly through the app. Currently the user can search by state and access their local district level representatives throught their profile. Live Site
Technologies Used:
Front End:
React.js, React Router, React Hooks, Cypress, Heroku, Circle CI
Back End:
Python on Flask, SQLAlchemy, Travis CI, Heroku, Pytest, Nightmare.js (Express/Node microservice), Postgres DB
Challenges: The main challenge of this project was connecting a front end and back end into a working deployed production application while implementing continuous integration with testing. On the back end, challenges included build a REST API using an entirely new language and framework. On the front end using Cypress with CI was a challenge that we hope to continue working on in future iterations.
Future Iterations:
- Ability to search for representatives by name, district, and other parameters.
- Log-in with Google OAuth.
- Other means of messaging representative such as an email via Sendgrid.
- "In The News" feature that will show the most recent news article using the Google API for the chosen representative.
- For the Tweet bot to use the Twitter authentication.
- Clone down the repo
- $
install pip - $
pip3 install pipenv - $
pipenv install - $
pipenv install virtualenv - $
virtualenv env - $
source env/bin/activate - $
python3 manage.py runserver - Obtain an API Key from (https://www.propublica.org/datastore/apis)
- Add a
.envfile to the root directory & add your API key as shown below.
export APP_SETTINGS="config.DevelopmentConfig"
export DATABASE_URL="postgresql://localhost/oversite"
PROP_API= <API KEY HERE>
https://oversite-api.herokuapp.com/
- "/"
Response:
Welcome to the OverSite API
Params: State(ex: CO,TX,FL,CA)
- "/members_by_state/<state_>"
{
"results": [
{
"senate": [
{
"first_name": "Dianne",
"id": "F000062",
"image": "https://theunitedstates.io/images/congress/original/F000062.jpg",
"last_name": "Feinstein",
"party": "Democrat",
"role": "Senator, 1st Class",
"state": "California"
},
{
"first_name": "Kamala",
"id": "H001075",
"image": "https://theunitedstates.io/images/congress/original/H001075.jpg",
"last_name": "Harris",
"party": "Democrat",
"role": "Senator, 3rd Class",
"state": "California"
}
]
},
{
"house": [
{
"first_name": "Tom",
"id": "M001177",
"image": "https://theunitedstates.io/images/congress/original/M001177.jpg",
"last_name": "McClintock",
"party": "Republican",
"role": "Representative",
"state": "California"
},
{
"first_name": "Ken",
"id": "C000059",
"image": "https://theunitedstates.io/images/congress/original/C000059.jpg",
"last_name": "Calvert",
"party": "Republican",
"role": "Representative",
"state": "California"
},
{
"first_name": "Jim",
"id": "C001059",
"image": "https://theunitedstates.io/images/congress/original/C001059.jpg",
"last_name": "Costa",
"party": "Democrat",
"role": "Representative",
"state": "California"
}...
]
}
]
}
Params: User ID from Database
- "/users_reps/<user_id_>"
{
"results": [
{
"senate": [
{
"first_name": "Cory",
"id": "G000562",
"image": "https://theunitedstates.io/images/congress/original/G000562.jpg",
"last_name": "Gardner",
"party": "Republican",
"role": "Senator, 2nd Class",
"state": "Colorado"
},
{
"first_name": "Michael",
"id": "B001267",
"image": "https://theunitedstates.io/images/congress/original/B001267.jpg",
"last_name": "Bennet",
"party": "Democrat",
"role": "Senator, 3rd Class",
"state": "Colorado"
}
]
},
{
"house": [
{
"first_name": "Ed",
"id": "P000593",
"image": "https://theunitedstates.io/images/congress/original/P000593.jpg",
"last_name": "Perlmutter",
"party": "Democrat",
"role": "Representative",
"state": "Colorado"
}
]
}
]
}
Params: Representative ID
- "/member/<id_>"
{
"results": [
{
"address": "354 Russell Senate Office Building",
"chamber": "Senate",
"contact_form_url": "https://www.gardner.senate.gov/contact-cory/email-cory",
"district": null,
"facebook": "https://www.facebook.com/SenCoryGardner",
"first_name": "Cory",
"id": "G000562",
"image": "https://theunitedstates.io/images/congress/original/G000562.jpg",
"last_name": "Gardner",
"party": "Republican",
"phone": "202-224-5941",
"role": "Senator, 2nd Class",
"state": "Colorado",
"twitter_handle": "SenCoryGardner",
"twitter_url": "https://twitter.com/SenCoryGardner",
"website": "https://www.gardner.senate.gov",
"youtube": null
}
]
}
- GET request given reps handle and message/tweet sent to Express Microservice to tweet given message to representative Params: handle: "", message: ""
- "/tweet"
{
message: "message sent"
}









