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
- React - Used to render the client application
- React Router - Used to generate distinct views at virtual endpoints
- ReactD3 - Used to generate dynamic charts
- Apollo Client - GraphQL client for React
- GraphQL - Query schema
- Node.js - Server environment
- Express - Framework leveraged to create and run server
- Axios - Used for HTTP requests in back-end data services
- Passport JS - Authentication middleware
- Passport Facebook - Configuration used with Passport to authenticate with Facebook
- Mongoose - Used to configure and query MongoDB database
- IBM Watson Personality Insights - Used to generate personality profiles of news sources.
- AWS Lambda - Runs two data services and cron jobs
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 = ''
- 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
anddb/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.
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)
- Phil Gonzalez: p-gonzo
- Ian Schmidt: ianschmidt83
- Scott McCreary: scottmccreary
This project is licensed under the MIT License.