About

A minimal Hacker News reader built with Nuxt 3. Front-page feed, item pages with comments, and on-the-fly previews of linked articles extracted server-side.

Stack

  • Nuxt 3 (Vite, Nitro), Vue 3, TypeScript on the server
  • Tailwind 3 + SCSS
  • VueUse for IntersectionObserver-driven infinite scroll
  • @mozilla/readability + linkedom + sanitize-html + Turndown for the article-extraction pipeline

What it shows

  • SSR-friendly data fetching with useFetch and reactive route params
  • Nitro server routes under server/api/hn/* with shared auto-imported utils
  • Layered caching via defineCachedEventHandler and defineCachedFunction
  • Mixed SSR + client-only fetches on a single page (header SSR, slow article fetch client-side)
  • Infinite scroll with useIntersectionObserver + keepalive page meta
  • Native :visited styling, anchor permalinks for comments
  • CSS-token-based theming with system dark mode (prefers-color-scheme)
  • Custom error.vue with clearError

Source

Code on GitHub. See the front page for the live feed.