/shortcut-exercise

Technical exercise for Shortcut company.

Primary LanguageJavaScript

The Shortcut Coding Challenge

This project is technical exercise for Shortcut company. Project covers challenge named Streaming Twitter Tweets.

The Challenge:

Streaming Twitter Tweets

A client wants to build a web-based application (and relevant infrastructure) to stream Twitter tweets to end-users in real-time.

How to run project

In the project directory first run command: yarn install. This will install all dependencies of this project.

To test project please run command: yarn test. This command launches test runner and tests whether project passes tests.

Before running project you need to paste API_KEY, API_SECRET_KEY, ACCESS_TOKEN and ACCESS_TOKEN_SECRET values into .env file. You can also place those values right into process.env. To obtain those values please visit Twitter Developer website.

To run project please run command: yarn develop. This command launches server and client of the project. Open http://localhost:4000 to view project in the browser.

Scope of exercise

This project connects to Twitter stream API and retrieves tweets in realtime.

User can view unfiltered stream by accessing http://localhost:4000/stream, or use search to view stream for keyword. There is also available list of streams based on popular keywords.

On serverside there is used Express and Http to initialize server. To build connection between server and client there is used Websocket dependency WS. For streaming tweets there is used Twit dependency.

On clientside there is used React through Create-react-app CLI to serve app for user. Routes are managed by react-router-dom. Data from backend is served through browsers native Websocket. Styles are created through SCSS and they are processed by node-sass.

Testing is done through Jest test runner.

Summary

Hope you will enjoy using this app as much as I enjoyed building it.