The end of fake news.
- Node + Express
- PostgreSQL
- React + Redux
- D3
- AWS EC2
- Travis CI
See: https://github.com/pax-atlantica/pax-ci
Upon cloning the forked repo, npm install on root directory in command line. Once installed, execute ‘npm run start-dev’ on the same directory. Open the app on a web browser by accessing 127.0.0.1:3000. Make sure to add remote upstream if you plan to contribute/ update app.
First rebase your local repo through ‘git –rebase upstream master.’ Commit all changed you’ve made, then ‘git push origin master’. Now you can make a pull request through your local forked copy of the project! The request will be checked by one of the members before it gets merged.
METHOD | URL | REQUEST.BODY | EXAMPLE |
---|---|---|---|
GET | /api/getUser | ||
GET | /api/logoutUser | ||
POST | /api/analyze | JSON | { data: article } |
POST | /api/extract | JSON | { data: link } |
GET | api/vote:id | ||
POST | /api/vote | JSON | { article_id: articleId, upvote: isUpvote } |
GET | /api/user/upvoteAverages | ||
GET | /api/user/allArticles |
METHOD | URL | SUCCESS TYPE | SUCCESS CONTENT | FAIL TYPE | FAIL CONTENT |
---|---|---|---|---|---|
GET | /api/getUser | string | username | null | null |
POST | /api/logoutUser | null | null | null | null |
POST | /api/analyze | object | analysis | null | null |
POST | /api/extract | object | analysis | null | null |
POST | api/vote:id | object | votes | null | null |
POST | /api/vote | object | votes | null | null |
POST | /api/user/upvoteAverages | object | tone averages | null | null |
POST | /api/user/allArticles | array | all user articles | null | null |
USER | USERNAME | PASSWORD | |
---|---|---|---|
id | String | String | String |
SEARCH | USERS | TEXT | ISLINK | RESULT | POLARITY | POLARITY SCORE |
---|---|---|---|---|---|---|
id | Foreign Key | VarChar | Boolean | Number | String | Number |
–>
ANGER | DISGUST | FEAR | JOY | SADNESS | ANALYTICAL | CONFIDENT | TENTATIVE |
---|---|---|---|---|---|---|---|
Number | Number | Number | Number | Number | Number | Number | Number |
–>
OPENNESS | CONSCIENTIOUSNESS | EXTRAVERSION | AGREEABLENESS | EMOTIONAL RANGE |
---|---|---|---|---|
Number | Number | Number | Number | Number |
VOTE | VOTED | UPVOTE | DOWNVOTE | USER | ARTICLE |
---|---|---|---|---|---|
id | Boolean | Boolean | Boolean | Foreign Key | Foreign Key |
** ANALYZER analyzeUrl: true, 			<- toggle view to URL input analyzeText: false, 			<- toggle view to direct text input error: null, 			<- hold error messages height: 400, 			<- set height of emotion chart bar graph id: null, 			<- hold user id when they log in score: null, 			<- hold score of most recently analyzed article sentiment: null, 			<- hold sentiment of mose recently analyzed article success: false, 			<- toggle on success or failure of analysis summary: null, 			<- hold the summary of analyzed article title: null, 			<- hold the title of the analyzed article or ‘Your input’ tone: null, 			<- hold the tone of the most recently analyzed article waiting: false, 			<- toggle the waiting view while analysis is happening width: 800, 			<- set width of emotion chart bar graph init: true 			<- ???
** USER login: false, 			<- toggle when user is logged in
upvoteAverages: { 			<- tone averages of all articles analyzed by single user anger: 0, disgust: 0, fear: 0, joy: 0, sadness: 0, analytical: 0, confident: 0, tentative: 0, openness: 0, conscientiousness: 0, extraversion: 0, agreeableness: 0, emotional_range: 0, }, loginView: false, 			<- ??? dashboardView: false, 			<- show dashboard component inputView: true, 			<- show input component resultView: false, 			<- show result component waitingView: false, 			<- show waiting component aboutView: false, 			<- show about component
** DASHBOARD articles: ”, 			<- hold an array of articles analyzed by a user visible: false, 			<- ??? defaultInternalView: true, 			<- ??? errorInternalView: false, 			<- ??? showArticlesView : false, 			<- ???
** VOTES downVote: false, 			<- toggle user vote downVoteCount: 0, 			<- hold all downvotes upVote: false,			<- toggle user vote upVoteCount: 0, 			<- hold all upvotes
Requires node >= 8.8.1 and nodemon
- Fork and clone
- Run npm install
- .env file:
LOCAL=1
LOCAL_DB_PASSWORD={YOUR PASSWORD} LOCAL_DB_USER={YOUR USER} LOCAL_DB_HOST={YOUR HOST} LOCAL_DB_NAME={YOUR NAME}
GOOGLE_CLIENT_ID={YOUR CLIENT ID} GOOGLE_CLIENT_SECRET={YOUR CLIENT SECRET} GOOGLE_LOCAL_DIRECT={ex: http://127.0.0.1:3000/auth/google/callback}
AYLIEN_APP_ID={YOUR API ID} AYLIEN_APP_KEY={YOUR API KEY} WATSON_USERNAME={YOUR USERNAME} WATSON_PASSWORD={YOUR PASSWORD}