← Back to Projects

HN Offline

RemixSolidJSTypeScriptService WorkersLocalStorageHacker News

HN Offline is a lightweight web app for reading Hacker News with a focus on the comment experience. It stores visited stories and comment threads locally so you can keep reading even when you’re disconnected.

Interface

HN Offline desktop screenshotHN Offline mobile screenshot

How it works

HN Offline is built as a SolidJS/Remix app with an “offline-first” approach:

  • Data sources:
    • Uses the official Hacker News Firebase API to load story and comment details.
    • Uses Algolia’s Hacker News search to fetch the top “day” and “week” story lists.
  • Offline storage:
    • A service worker + local storage are used to keep previously loaded stories and comment threads available offline.
    • Visited stories are stored locally so the UI can grey them out (and optionally hide already-read items).
  • Background refresh:
    • The server periodically refreshes lists (front page more frequently) and only reloads a story’s comments when enough time has passed, avoiding unnecessary re-fetching.
  • Comment-focused UX:
    • Threads are collapsible; collapse state is persisted locally so you can leave and come back without losing your place.
    • HN links inside comments are detected and loaded in-app so you can keep navigating comment threads.
    • Authors get consistent colors, with logic to reduce collisions within a thread.

Highlights

  • Mobile-friendly comment reading (including nicer rendering for code blocks)
  • “Subway-style” connectors to clarify reply structure
  • No login, posting, or analytics—just reading