Skip to content

Demonstration of Preact used to build Hacker News as a PWA.

License

Notifications You must be signed in to change notification settings

zouhir/preact-hn

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

73 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Preact Hacker News Example

See this application live at: https://hn.kristoferbaxter.com

This is an example of a PWA built using Preact, Webpack, and some small opinions. Please do not think of this as the way to build your application. Instead, view this as an example of some concepts used in modern web applications (sw, h2, h2push).

Made with kindness in California. 🏄

Installation

  1. Install yarn
  2. Install Brotli and Zopfli CLI
  3. Install Yarn Dependencies
    • yarn install
  4. Run Locally
    • yarn run start (chrome only)
    • yarn run start:prod (all browsers)
  5. Access using your favorite browser

Details

I've focused mostly on first initial load performance, with the small caveat of using Webpack instead of Rollup. I'd like the route based code splitting to provide a extensible model for keeping initial view rendering costs low.

In the future there are plenty of things to do:

  1. Move away from needlessly spamming the Firebase API (see src/restify/storage/*) and instead leverage the firebase client in the node server.
  2. Write a Webpack plugin to allow for split css files based on packages.
  3. Internationalization/Localization, including RTL layout.
  4. Support AppCache (even though it's kind of a jerk)
  5. Allow for posting comments!
  6. FIX LOTS OF BUGS! ZOMG SO MANY BUGS!

About

Demonstration of Preact used to build Hacker News as a PWA.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • JavaScript 92.4%
  • CSS 7.6%