HackerNews application SSR Implemented
A minimal example of using a Server Side Rendering (server for API, proxy, & routing) with a [React frontend] This application uses https://hn.algolia.com/api api to load posts from Hacker News
This project is deployed live at https://bit.ly/2ZEQKpY
A combo of two npm projects, the backend server and the frontend UI. So there are two package.json
configs and thereforce two places to run npm
commands:
- Node server:
./package.json
- deployed automatically via heroku/nodejs buildpack
- React UI:
react-ui/package.json
- generated by create-react-app
- deployed via
build
script in the Node server's./package.json
- module cache configured by
cacheDirectories
Includes a minimal Node Cluster implementation to parallelize the single-threaded Node process across the available CPU cores.
Demo deployment: example API call from the React UI is fetched with a relative URL that is served by an Express handler in the Node server.
git clone https://github.com/AnkitVashist11/hackerNewsApp.git
cd hackerNews/
npm install
npm run start
This deployment will automatically:
- detect Node buildpack
- build the app with
npm install
for the Node servernpm run start
for Building using Webpack & Deploying using babel node- customize by adding API, proxy, or route handlers/redirectors 👓 More about deploying to Heroku.
-
Upvote ui is implemented and real time updating realTime Upvote.
-
Hide functionality is correctly implemented.
-
Pagination is working.
-
Ensure Page 2 functionality does not break while refreshing it.
-
App state is maintained using Redux.
-
Component is divided properly and try using Atomic Design principle.
-
Incorporated ESlint check
-
App is deployed on Cloud platform (Google App Engine)
-
Incorporated build pipeline.
-
Once u hide news and refresh it, the hidden news should not appear again.
-
The UI should shrink when you minimize the window
-
Single Page Application with extensive caching, so application loads very fast post the first load.
########## Future Implementation in more time:
- Following best coding practices.
- Implement upvote functionality (add more upvotes don’t restrict on just one; The timeline chart should update real time as and when the upvote is clicked).
- Writing Snapshot & Unit Tests for all components using Jest & Enzyme with >80% functional coverage.
- Working on enhancing the performance.
- Also, setting up CI using Jenkins and Deployment Using Docker.