{"id":24378599,"url":"https://github.com/mostlyemre/hnn","last_synced_at":"2026-04-04T16:36:04.902Z","repository":{"id":137447895,"uuid":"379741780","full_name":"MostlyEmre/hnn","owner":"MostlyEmre","description":"🤓 React-based, paywall-allergic Hacker News reader.","archived":false,"fork":false,"pushed_at":"2021-10-28T05:27:57.000Z","size":1713,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-04T12:35:17.512Z","etag":null,"topics":["custom-css","firebase","hackernews","portfolio-project","react"],"latest_commit_sha":null,"homepage":"https://hn.emre.ca","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/MostlyEmre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2021-06-23T22:16:46.000Z","updated_at":"2022-05-05T05:45:30.000Z","dependencies_parsed_at":null,"dependency_job_id":"e063215a-a0dd-4ab9-a03e-1c63b533a7b3","html_url":"https://github.com/MostlyEmre/hnn","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/MostlyEmre/hnn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostlyEmre%2Fhnn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostlyEmre%2Fhnn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostlyEmre%2Fhnn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostlyEmre%2Fhnn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/MostlyEmre","download_url":"https://codeload.github.com/MostlyEmre/hnn/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/MostlyEmre%2Fhnn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31405705,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-04T10:20:44.708Z","status":"ssl_error","status_checked_at":"2026-04-04T10:20:06.846Z","response_time":60,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["custom-css","firebase","hackernews","portfolio-project","react"],"created_at":"2025-01-19T06:29:32.309Z","updated_at":"2026-04-04T16:36:04.885Z","avatar_url":"https://github.com/MostlyEmre.png","language":"JavaScript","readme":"Check out HN Paywall Archiver [https://hpa.emre.ca](https://hpa.emre.ca)\n\n- [Information](#information)\n- [Features](#features)\n- [About the Paywall feature and the supporting NodeJS Script](#about-the-paywall-feature-and-the-supporting-nodejs-script)\n  - [The Problem](#the-problem)\n  - [The Solution](#the-solution)\n- [A bug](#a-bug)\n- [Helper functions](#helper-functions)\n- [What did I do? What will I do?](#what-did-i-do-what-will-i-do)\n  - [Some maybes:](#some-maybes)\n\n## Information\n\n[HNN](https://hn.emre.la) is a [Hacker News](https://news.ycombinator.com/) reader that I created in React, to practice React. Accessible at [hn.emre.la](hn.emre.la)\n\nHNN uses 2 different Hacker News APIs, [Algolia HN API](https://hn.algolia.com/api) and [Firebase HN API](https://github.com/HackerNews/API). The reason for this is that one have the data that the other one does not, and the other have some APIs that the other one does not.\n\nFor this project, I applied custom css instead of delving into one of the Component or CSS libraries. I want to try Material UI in my next project and maybe Tailwind CSS after.\n\nHNN doesn't show the children comments. So the comments are only 1 level deep.\n\n## Features\n\n- **All feeds are available:** You can view new posts, the frontpage, Ask HackerNews, Show HackerNews as separate feeds. You'll feel right at home.\n- **Paywall detection:** Detects websites that implement paywalls or similar tactics and provides archive.is and archive.org links for the specific URL/Article both on thumbnail view and detail view.\n- **Persistent favorites:** Users can favorite/unfavorite posts. They can view their favorites on the Favorites page. They can close the browser, or their computer without losing their favorites. No login required.\n- **Detailed User Page:** Unlike `news.ycombinator`, HNN shows user's last 3 submissions on their profile page. Plus more.\n- **Copy submission URL:** No need to copy the URL of the submission by right clicking, there's a button for that.\n- **Pagination:** Easy to use navigation.\n- **Context aware \"Go Back\" button:** You will never get lost, no matter where you click, you can always go back.\n\n## About the Paywall feature and the supporting NodeJS Script\n\nThe paywall feature provides archive.is and archive.org URLs for the relevant article. But there's an issue.\n\n### The Problem\n\nNot every paywalled article is archived on archive.is or archive.or.\n\n### The Solution\n\n[HN Paywall Archiver](https://github.com/EmreYYZ/HN-Paywall-Archiver) is a NodeJS script I created that checks every new HackerNew post, tries to match the URL with the paywall database, and if matched, the script automatically archives the URL on Archive.is.\n\nThis way, 99% of the posts you see on HNN with the paywall warning will have their archived versions ready when you click on the `Read without Paywall` button (Or the buttons on the post page) to read.\n\nThe script is created to assist HNN. But I guess it helps humanity as a side effect by archiving the web.\n\n## A bug\n\nJust wanted to write it down so that I never ever forget it.\n\nThe following typo cost me 1.5 days:\n\n❎ localStorage.getItem(\"favorites\" === null) ? ...\n\n✅ localStorage.getItem(\"favorites\") === null ? ...\n\n## Helper functions\n\n`xAgo(unixTimestamp)` // receives Unix Timestamp, returns `6 minutes ago` type of string.\n\n`calendarTime(unixTimestamp)` // receives Unix Timestamp, returns a calendar date like `20 Dec, 2021` as a string.\n\n`urlDissector(url)` // receives raw URL, returns the URL hostname.\n\n```\nRaw URL:\nhttps://www.google.com/search?q=dissecter\u0026oq=dissecter\u0026aqs=chrome..69i57.370j0j7\u0026sourceid=chrome\u0026ie=UTF-8\n\nReturned URL Hostname:\ngoogle.com\n```\n\n## What did I do? What will I do?\n\nThe list doesn't have everything.\n\n- [x] Automatically hide deleted comments that are still on the API.\n- [x] Favorite posts.\n- [x] User profiles \u0026 user's last submissions.\n- [x] Pagination.\n- [x] Go Back button.\n- [x] Do the `new` page, `askHN` page, `showHN` page\n- [x] List the last 3 submissions of a user.\n\n### Some maybes:\n\n- [x] Save Favorites to localStorage.\n- [ ] Implement search.\n- [ ] ~~Sort the comments either by their children count or karma or something.~~ (API limitations 😢)\n- [x] Detect paywalled news sites and replace their URL with an archive.is one. (It can provide it as an alternative instead of replacing.) ([As requested in a comment on HN](https://news.ycombinator.com/item?id=27722427)) ([A list of popular paywalled sites](https://github.com/iamadamdev/bypass-paywalls-chrome/blob/master/src/js/sites.js))\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostlyemre%2Fhnn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmostlyemre%2Fhnn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmostlyemre%2Fhnn/lists"}