Giter VIP home page Giter VIP logo

hacker-news-redesigned's Introduction

Hacker News Redesigned

A Hacker News clone designed with better reading experience, performance, and accessibility in mind.

See the live demo »

Overview

The project is written with React and React Apollo, using custom server-side rendering.

Stack

API

The API for the client is a Node-based GraphQL wrapper over Hacker News Firebase API, implemented with Apollo Server. For more details see the API repository.

Build Process

Webpack 4 is used to bundle the project, with Babel 7 beta taking care of transpilation. 4 separate configs are used for compiling server and client builds for both development and production.

CSS

The styling of the project is implemented with SCSS modules: (ITCSS)-like architecture is used for global styling and tools (mixins, variables, functions). One local .scss file is used per component. The CSS output is extracted with mini-css-extract-plugin during the production build, and because of being fairly small (4KB gzipped) is directly embedded into HTML files with Express.

Running locally

  1. Clone the repository: git clone [email protected]:tigranpetrossian/hacker-news-redesigned.git
  2. Run: yarn install
  3. Start in development mode: yarn start
  4. Run production mode locally: yarn start:prod:local

Note: you will need to have the API running locally as well. See the API repository for details.

Upcoming Improvements

Design and usability

  • Subtle navigation transitions
  • Route change announcement with screen readers
  • Collapsing comments
  • Subtle notifications on feed updates

Code

  • Code splitting
  • Client-side cache invalidation: heavily caching the data on the client, and invalidating by listening to API updates

hacker-news-redesigned's People

Contributors

tigranpetrossian avatar

Watchers

James Cloos 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.