Uses IBM Watson AI to analyze Trump Tweets
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
.idea
img
public
scripts
src
.babelrc
.eslintrc
.gitignore
.travis.yml
README.md
bitbucket-pipelines.yml
gulpfile.babel.js
package.json
server.js
webpack.config.babel.js
yarn.lock

README.md

Build Status Online Status

Trump Report

Hobby project I wrote to do some AI analysis of Trump tweets. Also an experiment in building a serverless web app.

  • Live demo at https://tr.david-merrick.com/
  • Completely serverless architecture; static assets are hosted on S3 and Lambda is used to fetch data
  • Uses IBM Watson's Cognitive API for analysis

Architecture

Frontend

The frontend is primarily built with React, Redux, Redux-Saga, and React-Bootstrap, in ES2015 syntax. WebPack and Babel are used for transpiling. Static assets are hosted on S3 and then fronted by the CloudFlare CDN.

Backend

On the backend, this Lambda runs on a 30-minute timer. It fetches Trump's most recent Tweets, filters out retweets, then pushes them to SNS. This Lambda is then triggered by the SNS notification. It checks if there are any new Tweets, and, if there are, runs them through IBM Watson's Natural Language Classifier and Tone Analyzer APIs. It then stores the result in JSON in S3. For the "latest news" widget, a separate Lambda function is fronted by AWS API Gateway and is used to fetch items from News API.

Reference