{"id":13526004,"url":"https://github.com/kristoferbaxter/preact-hn","last_synced_at":"2025-04-10T02:24:12.480Z","repository":{"id":66007775,"uuid":"84757332","full_name":"kristoferbaxter/preact-hn","owner":"kristoferbaxter","description":"Demonstration of Preact used to build Hacker News as a PWA.","archived":false,"fork":false,"pushed_at":"2018-04-16T16:48:15.000Z","size":399,"stargazers_count":296,"open_issues_count":9,"forks_count":27,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-04-03T00:05:32.761Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kristoferbaxter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-03-12T21:05:15.000Z","updated_at":"2024-11-27T04:42:36.000Z","dependencies_parsed_at":null,"dependency_job_id":"3ca2fefd-613d-47ea-8f70-222c28b527e2","html_url":"https://github.com/kristoferbaxter/preact-hn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristoferbaxter%2Fpreact-hn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristoferbaxter%2Fpreact-hn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristoferbaxter%2Fpreact-hn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kristoferbaxter%2Fpreact-hn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kristoferbaxter","download_url":"https://codeload.github.com/kristoferbaxter/preact-hn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248143484,"owners_count":21054790,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-08-01T06:01:24.240Z","updated_at":"2025-04-10T02:24:12.456Z","avatar_url":"https://github.com/kristoferbaxter.png","language":"TypeScript","funding_links":[],"categories":["TypeScript","Uncategorized"],"sub_categories":["Uncategorized"],"readme":"## Preact Hacker News Example\n\nSee this application live at: https://hn.kristoferbaxter.com\n\nThis is an example of a PWA built using Preact, Webpack, and some small opinions.\n*Please do not think of this as the way to build your application*. \nInstead, view this as an example of some concepts used in modern web applications (sw, h2, h2push).\n\nMade with _kindness_ in California. 🏄\n\n## Installation\n\n1. Install yarn\n    * https://yarnpkg.com/en/docs/install\n2. Install h2o Proxy (to allow for local h2 and h2 push)\n    * Depends on your OS. Tend to use 'brew' on MacOS -- 'brew update; brew install h2o'\n3. Install Brotli and Zopfli CLI\n    * Again, depends on your OS. Typically just use 'brew', 'brew update; brew install brotli; brew install zopfli'\n    * https://github.com/google/brotli\n    * https://github.com/google/zopfli\n4. Install Yarn Dependencies\n    * yarn install\n5. Run Locally\n    * yarn start (chrome only)\n    * yarn bundle:prod; yarn run start (all browsers)\n6. Access using your favorite browser\n    * https://localhost:5443\n\n## Details\n\nI'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.\n\nIn the future there are plenty of things to do:\n1. Write a Webpack plugin to allow for split css files based on packages.\n2. Internationalization/Localization, including RTL layout.\n3. Support AppCache (even though it's kind of a jerk)\n4. Allow for posting comments!\n5. FIX LOTS OF BUGS! ZOMG SO MANY BUGS!\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristoferbaxter%2Fpreact-hn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkristoferbaxter%2Fpreact-hn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkristoferbaxter%2Fpreact-hn/lists"}