/read-your-veggies-web-app

A news app for a balanced media diet.

Primary LanguageJavaScript

Welcome to Read Your Veggies, a news app to help you read outside your bubble!

Read Your Veggies diagnoses a user's political stance using five data points: current city, hometown, browsing habits, reading habits on the site, and responses to an onboarding questionnaire. It then serves news articles that, based on source, will likely contain an opposing political viewpoint to "digest." Users can set weekly health goals and track their reading history. They can also view personality insights into our news outlets, generated from IBM Watson's Personality Insights

Built With

Development

Running the Development App

From within the root directory:

npm install
npm run react-dev
npm run server-dev

Create a .env file with the following variables: FACEBOOK_APP_ID = '' FACEBOOK_APP_SECRET = '' CALLBACK_URL = '' // Facebook USERS_DATABASE_PATH = '' ARTICLES_DATABASE_PATH = '' SOURCES_DATABASE_PATH = ''

Roadmap

  • Client: The front end is rendered in React with redirects handled by React Router.
  • Authentication: Passport JS is used for Facebook OAuth. See server/facebookAuth.js.
  • Server: NodeJS and ExpressJS handle server-side routing and incoming client requests in server/index.js
  • Querying: Client queries the server with Apollo Client, and queries are handled server-side with GraphQL. See db/graphql.js, db/resolvers.js and db/typeDefs.js.
  • Database: MongoDB is used to persist data on articles, sources, and users in three separate respective databases. See db/schemas.js for the schemas used.
  • Data Services: Two separate services (repos included within this organization) are used to scrape and store articles and generate personality insights from IBM Watson.

Deployment

We used AWS EC2 to deploy this code.

To deploy your own version:

  • Set up MongoDB instances - we used mLab
  • Set up data services (repos included in this organization) - we used AWS Lambda
  • Configure the .env files (you will need API keys for News API and Watson)

Authors

License

This project is licensed under the MIT License.