{"id":20514139,"url":"https://github.com/webreflection/hn","last_synced_at":"2025-04-14T00:10:53.367Z","repository":{"id":65993185,"uuid":"269122593","full_name":"WebReflection/hn","owner":"WebReflection","description":"Isomorphic Hacker News","archived":false,"fork":false,"pushed_at":"2020-12-28T09:27:53.000Z","size":247,"stargazers_count":47,"open_issues_count":0,"forks_count":1,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-12-24T03:11:57.606Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/WebReflection.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,"dei":null}},"created_at":"2020-06-03T15:18:43.000Z","updated_at":"2024-09-02T12:54:19.000Z","dependencies_parsed_at":"2023-05-21T17:00:13.484Z","dependency_job_id":null,"html_url":"https://github.com/WebReflection/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/WebReflection%2Fhn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fhn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fhn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/WebReflection%2Fhn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/WebReflection","download_url":"https://codeload.github.com/WebReflection/hn/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":231999613,"owners_count":18458181,"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-11-15T21:14:57.856Z","updated_at":"2024-12-31T15:10:13.044Z","avatar_url":"https://github.com/WebReflection.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Isomorphic Hacker News\n\n\u003csup\u003e**Social Media Photo by [AbsolutVision](https://unsplash.com/@freegraphictoday) on [Unsplash](https://unsplash.com/)**\u003c/sup\u003e\n\n- - -\n\n### [Live static site](https://webreflection.github.io/hn/top/?1).\n\n- - -\n\nThe goal of this project is to showcase a 100% isomorphic version of the famous [Hacker News PWA](https://hnpwa.com/), through my tiny [µhtml](https://github.com/WebReflection/uhtml#readme) and [µcontent](https://github.com/WebReflection/ucontent#readme) libraries, able to produce a fully static, yet _SSR_ ready, Hacker News reader.\n\n### Achievements Unlocked\n\n  * this _PWA_ works on a 100% static host\n  * this _PWA_ could be pre-rendered via _SSR_ too\n  * the client renders everything incrementally\n  * the server renders everything with, or without, _JS_\n  * both client and server share exactly the [same view](https://github.com/WebReflection/hn/blob/master/client/%40/js/view.js)\n  * both client and server share exactly the [same controller](https://github.com/WebReflection/hn/blob/master/client/%40/js/hn.js)\n  * both client and server logic is route based, meaning each _URL_ can be shared\n  * no bundlers whatsoever are involved, everything is standards based\n  * _Lighthouse_ scores ~100% on a _GitHub_ hosted static site\n\n### Extra Details\n\nAll you need to do, in order to test this project locally, is the following:\n\n```sh\ngit clone https://github.com/WebReflection/hn.git\ncd hn\nnpm i\nnpm test\n# npm run test:ssr # for SSR\n```\n\nThe client side part is within the [client/@/](./client/@/) folder, while the server side part is within the [server/](./server/) folder.\n\nThe reason to choose a `@` as folder prefix, is to have a portable pattern that would never interfere with the name of any other possible folder.\n\nAs example, the _SSR_ part uses those folders indexes to render each page, but the structure is fully compatible with a static host too.\n\nThe client side is served either through [µcdn](https://github.com/WebReflection/ucdn#readme), or pre-built via [µcompress](https://github.com/WebReflection/ucompress#readme), after a npm run build command.\n\nTo keep it simple, I have also targeted the docs folder, instead of public, simply to be able to tell _GitHub_ to publish this Web App via such folder.\n\nI hope this project will inspire new, as well as old, Web developers, as it's definitively something anyone could do without needing to move away from plain Web standards 🎉\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebreflection%2Fhn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebreflection%2Fhn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebreflection%2Fhn/lists"}