Giter VIP home page Giter VIP logo

reader's Introduction

Reader

The Reader system is a client/server pair that allows a user to read top stories from UK sites. It can potentially do more, but for now it is specialized to do only that.

Reader-app

The front-end server delivers a Gatsby react single-page app as static files for speed. The app contains an Apollo graphql client that gets content information by making queries to the back end server. The app is not particularly responsive, and may look a bit weird when rendered in odd sizes. Also, as development was a quick effort, the server is not production quality. As gatsby development is extremely interactive there was no need to generate an extensive set of tests for regression analysis, or a message queue to a back-end error log.

Reader-gql

The back-end server is an Apollo GraphQL Server that hits endpoints on the newsapi.com site to resolve queries from the front-end. Corners were cut here too, as there are few tests, and the logging is sub-par. However, it works and did not take too long to build.

Monorepo

Both servers were developed in a Lerna monorepo to keep the graphql interfaces synchronized.

Setup

The target machine for setup should have GIT, Docker, Node, and Yarn installed globally. Presumably, the reviewer's machines will be set up with these packages already. If not, then install them. Also, these instructions assume a linux/unix machine. The software will run on a Windows machine but the "use" instructions will be different and some of the scripts will have to be re-written.

Use

Clone the repo to begin.

$ git clone https://github.com/tdsfugal/reader.git
$ cd reader

Install the dependencies with Lerna

$ lerna bootstrap

Start the back-end server first. Navigate into the reader-gql folder and use the start script with a newsApi AppKey (provided). This starts the service in a docker container that listens on port 4000. Once it is started you can make queries with GraphiQL by bringing up "localhost:4000" in a browser.

$ cd packages/reader-gql
$ source start.sh <newsapi AppKey>

Navigate up and over to the reader-app folder, then build and start the app server. Alternately, you can start it in develop mode with "yarn dev", however this is not quite as solid an experience.

$ cd ../reader-app
$ yarn build
$ yarn serve

Next, open "localhost:9000" (or "localhost:8000" if in dev mode) in a browser. Enjoy!

reader's People

Contributors

tdsfugal avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.