Show HN: A native macOS client for Hacker News, built with SwiftUI

github.com

258 points by IronsideXXVI 3 days ago


Hey HN! I built a native macOS desktop client for Hacker News and I'm open-sourcing it under the MIT license.

GitHub: https://github.com/IronsideXXVI/Hacker-News

Download (signed & notarized DMG, macOS 14.0+): https://github.com/IronsideXXVI/Hacker-News/releases

Screenshots: https://github.com/IronsideXXVI/Hacker-News#screenshots

I spend a lot of time reading HN — I wanted something that felt like a proper Mac app: a sidebar for browsing stories, an integrated reader for articles, and comment threading — all in one window. Essentially, I wanted HN to feel like a first-class citizen on macOS, not a website I visit.

What it does:

- Split-view layout — stories in a sidebar on the left, articles and comments on the right, using the standard macOS NavigationSplitView pattern.

- Built-in ad blocking — a precompiled WKContentRuleList blocks 14 major ad networks (DoubleClick, Google Syndication, Criteo, Taboola, Outbrain, Amazon ads, etc.) right in the WebKit layer. No extensions needed. Toggleable in settings.

- Pop-up blocking — kills window.open() calls. Also toggleable.

- HN account login — full authentication flow (login, account creation, password reset). Session is stored in the macOS Keychain, and cookies are injected into the WebView so you can upvote, comment, and submit stories while staying logged in.

- Bookmarks — save stories locally for offline access. Persisted with Codable serialization, searchable and filterable independently.

- Search and filtering — powered by the Algolia HN API. Filter by content type (All, Ask, Show, Jobs, Comments), date range (Today, Past Week, Past Month, All Time), and sort by hot or recent.

- Scroll progress indicator — a small orange bar at the top tracks your reading progress via JavaScript-to-native messaging.

- Auto-updates via Sparkle with EdDSA-signed updates served from GitHub Pages.

- Dark mode — respects system appearance with CSS and meta tag injection.

Tech details for the curious:

The whole app is ~2,050 lines of Swift across 16 files. It uses the modern @Observable macro (not the old ObservableObject/Published pattern), structured concurrency with async/await and withThrowingTaskGroup for concurrent batch fetching, and SwiftUI throughout — no UIKit/AppKit bridges except for the WKWebView wrapper via NSViewRepresentable.

Two APIs power the data: the official HN Firebase API for individual item/user fetches, and the Algolia Search API for feeds, filtering, and search. The Algolia API is surprisingly powerful for this — it lets you do date-range filtering, pagination, and full-text search that the Firebase API doesn't support.

CI/CD:

The release pipeline is a single GitHub Actions workflow (467 lines) that handles the full macOS distribution story: build and archive, code sign with Developer ID, notarize with Apple (with a 5-retry staple loop for ticket propagation delays), create a custom DMG with AppleScript-driven icon positioning, sign and notarize the DMG, generate an EdDSA Sparkle signature, create a GitHub Release, and deploy an updated appcast.xml to GitHub Pages.

Getting macOS code signing and notarization working in CI was honestly the hardest part of this project. If anyone is distributing a macOS app outside the App Store via GitHub Actions, I'm happy to answer questions — the workflow is fully open source.

The entire project is MIT licensed. PRs and issues welcome: https://github.com/IronsideXXVI/Hacker-News

I'd love feedback — especially on features you'd want to see. Some ideas I'm considering: keyboard-driven navigation (j/k to move between stories), a reader mode that strips articles down to text, and notification support for replies to your comments.

taude - 3 days ago

Congrats and building and releasing something. I guess for reading things like this, I'm just a browser kind-of guy. But I still appreciate youre building a NATIVE app that's using around 85MB of working memory (according to my Activity Monotor), and not some Electron thing.

I'm probably just a anti-app guy, but I tried it out.

First thing I went to do was CMD-F to search for some strings in the comments section.

Actually, the real first thing I did, was click on the left-side article preview on the text that said "1 hr ago | 63 comments" thinking it'd navigate me to the comments. See, I like my native hyper-links.

iriisatremotely - 3 days ago

Nice work shipping this. The 2k lines of Swift for a fully functional native app is impressive - shows how much SwiftUI has matured. The CI/CD pipeline for macOS code signing is genuinely hard, so thanks for open-sourcing that part. For anyone building side projects: this is the kind of portfolio piece that actually demonstrates real engineering skills. Much more valuable than yet another todo app when you're applying for jobs.

mike31fr - 2 days ago

Side note:

Simon Halvdansson runs "Harmonic", an Android client for Hacker News, I am using it daily for 2+ years and I sincerely recommend it.

I even asked him a feature (mark a story as read), and he implemented it shortly after.

Shout-out to you Simon!

https://github.com/SimonHalvdansson/Harmonic-HN

https://play.google.com/store/apps/details?id=com.simon.harm...

dev-ns8 - 3 days ago

Congrats on shipping!

Two things, does anyone else feel like 2017 was not 9 years ago and rather feels like it was just yesterday? I use a 2017 iMac running MacOS 13.7.8. It appears my hardware will not support any newer version of MacOS. For the most part, I haven't been too discouraged by this as I prefer older MacOS designs over the newer ones.

However, this is the second time in 2 days I've actually hit a wall in the Apple eco-system due to an older OS.

Last night I tried to build Ghostty to hack on a feature... it needs Xcode SDK 26 which isn't supported on Xcode 14 (latest version I'm able to install).

Now today, attempting to try this app out, I can't launch it due to being on too old of an OS.

It's really a shame because this iMac from 2017 is quite the capable machine. Absolutely no reason to upgrade it (from a hardware / performance standpoint).

alsetmusic - 3 days ago

Very nice. Commenting from it right now.

First feature request from me would be to adjust text size. I've start bumping up the default text size on all sites by one or two notches in the past year. Getting old, y'know. But also, as someone pointed out on a design blogpost a decade ago, why not make things easier to read. I didnt need it then, but I appreciate it now.

Really happy that I can run this on MacOS14 cause I've been locked out of some neat things people have built recently. Thanks for targetting older OSes. I'm not upgrading to the crap they've been putting out lately.

I'll be able to read details more later (getting ready for the job). Hope I didn't miss anything and comment about something that was already addressed. Congrats on shipping!

marcelox86 - 2 days ago

Opening the app and getting a new sparkle update dialog everytime is getting very annoying…especially for updates that are relatively minor.

just today its gone from 1.1.3 -> 1.1.4 -> 1.1.5 -> 1.1.6 -> 1.1.7 -> 1.1.8 -> 1.1.9 -> 1.2 -> 1.2.2 (skipped 1.2.1?) in under 5 hours. A lot of these could wait until theyre put in a relatively bigger release!

Aperocky - 3 days ago

Tangential piggy back: If you prefer CLI, here's a free and open source HN browser in terminal:

https://github.com/Aperocky/hnterminal

Install: `pipx install hnterminal`

vb7132 - 3 days ago

This is fantastic. The app is simple, useful and feels de-cluttered.

Two of my feature requests: 1. Allow cmd+f search on the whole app - I wanted to search your post on the app but I couldn't 2. A browser button to open the current page on an external browser.

Side note: I am trying to minimize my HN time via getting push notifications for relevant HN posts, and that's how I discovered your post. Would it be cool if one could write custom agents on top of an app? Maybe?

jovantho - 3 days ago

This is really good and I can definitely see myself using it instead of visiting the website. One thing I think would make it even better is if the comments weren't a web-view/embed but used swiftUI to display them (similar to how some reddit clients look, for instance). Not sure how feasible that is, I can imagine it'd be more involved than the current implementation.

Octoth0rpe - 3 days ago

> Built-in ad blocking — a precompiled WKContentRuleList blocks 14 major ad networks (DoubleClick, Google Syndication, Criteo, Taboola, Outbrain, Amazon ads, etc.) right in the WebKit layer. No extensions needed. Toggleable in settings

This is a good start, but I think a better approach would be to piggyback off of ublock origin's lists. Hopefully less maintenance that way too.

putlake - 3 days ago

Neat! One feature I'd love to see is to follow/block users. Like this Chrome extension: https://chromewebstore.google.com/detail/hn-followblock/dkbn...

Brajeshwar - 3 days ago

No No. Don’t do that, don’t make it better and easy to use. I’m already addicted and spent more time than I should. Now, this app that I can keep it open all day!

Btw, can you allow me to set the font-family, font-size, etc. for the interface? I can’t even do the default `CMD + +` to zoom in.

elcritch - 3 days ago

> Getting macOS code signing and notarization working in CI was honestly the hardest part of this project. If anyone is distributing a macOS app outside the App Store via GitHub Actions, I'm happy to answer questions — the workflow is fully open source.

You're not kidding! That's actually the first thing I looked at in your Github Repo. It's annoying as I made a neovim gui and downloaded it from GH and couldn't run my own app until I dug into some hidden place in the Settings App. Definitely super helpful to see how it's done.

I'm digging the app too! As another commenter said it'd be cool to see the comments as native SwiftUI elements as well. :)

gwbas1c - 3 days ago

If my work PC was a Mac I'd give it a try!

One thing: I really like the colors of Hacker News. It feels weird to me when Hacker News is presented in other colors. If I were to use your app I'd want to change the color pallet back to what it looks like on HN.

> Getting macOS code signing and notarization working in CI was honestly the hardest part of this project. If anyone is distributing a macOS app outside the App Store via GitHub Actions, I'm happy to answer questions — the workflow is fully open source.

Yes, in a past life I shipped a Mac application. This aspect is always a little bit of black magic. I will say that the Windows installer situation was a lot worse, IMO.

rekabis - 2 days ago

About the only possible suggestion I could make is an addition similar to what the HACK iOS app has: at the top of the comments section is a “bank” icon which leads to various Archive.today domains. Don’t know how it works, but if those entries do exist, it is to archived versions of the page in question. Maybe some sort of a lookup API on Archive’s part?

jaequery - 3 days ago

as a stand alone app, i thought there would be at least some kind of an improvement in UI but its like a step back.

navanchauhan - 3 days ago

I have been building a drop in replacement for SwiftUI that can render with different renderers (TUI for now and GTK/Adwaita very soon). This will be such an awesome demo use case for it.

Congratulations on getting this out!

block_dagger - 3 days ago

Could you add comment navigation features? I want to read all top level comments first and be able to down-arrow through them, and right-arrow to expand one level.

marxisttemp - 3 days ago

Why does the comments page look like a web view with some custom CSS? Is it because HN API doesn’t have a way to post comments? You could try using a WebPage[1] to inject the cookies and post comments, and an OutlineGroup to display comments.

[1] https://developer.apple.com/documentation/webkit/webpage

billbrown - 3 days ago

One thing that I _love_ with the browser is this extension:

https://github.com/timkuijsten/BoundedBikeshed

It lets me see the top-level comments with some indication of the thread depth. Totally changed my post scanning.

simonebrunozzi - 2 days ago

Great app. How do you see your previously bookmarked news?

And... is there a way to, ahem, read the 500 tabs I have open on my browser, and re-open them all in the app? Asking for a friend...

mojuba - 3 days ago

I'm a big fan of Swift (and SwiftUI), such a concise and elegant language. Beauty.

Also I appreciate how you made all backend calls just static functions which they always should be. People tend to overcomplicate these things and add a lot of boiler plate and unnecessary bureaucracy.

Going to try your app, thank you!

P.S. tried it, already miss the `threads` tab

vanyle - 3 days ago

Having built crossplatform native app supporting MacOS app, I have never gotten notarization to work as I'm not using xcode a lot.

I'm curious, how much does it cost? Is it per build or a subscription? How do you make it work financially for an open-source project?

lasgawe - 3 days ago

THis is nice. Congrats on the launch!

latchkey - 3 days ago

This is super cool.

In other similar news, I've been working on enhancing the HN ux, but still in the browser as an extension. The current build up on the Chrome store is pretty stable.

https://oj-hn.com

aquir - 3 days ago

It is great! Very native feel and it's quick too. I don't have to keep a Safari window open all the time...the ram usage of this app is around 10% of a Safari window with a single tab.

A font size setting would be nice, I found the font is a bit small.

orsenthil - 2 days ago

Is it possible to add clean reader support so that all articles can be browsed in a similar format?

WhitneyLand - 3 days ago

Nice work.

I think you should remove Claude as a contributor to your repo. It probably weaseled its way in on its own, I think it’s the developers job to talk about the tools they used not the tool company.

NoSalt - 3 days ago

Do we need this? I mean, isn't this what your browser is for?

anthk - 3 days ago

These tools have no sense on a highly chaning API which is the web. Email, Usenet and the like will have a fixed protocol for decades and will still work anywhere.

greedo - 3 days ago

Really nice app! I would love the ability to override dark mode (I use it for my desktop, but sometimes want a specific app in “normal” mode).

IFC_LLC - 3 days ago

Ah, this gives me 2002 vibes where coolest websites started to produce native clients for their websites so their users could read and comment offline.

This is sooo good.

albertonoys - 3 days ago

Great! I was just looking for a replacement for https://www.modernhn.com

morphle - 3 days ago

Nice. I would like a way to export my own comments.

Thank you for the MIT license, I’ll be able to add my own.

It also works on my fork of the old news server.

stalfosknight - 3 days ago

This is really really nice! Great work!

My only nitpick is I wish I could force dark mode on web pages with a light background, but that’s minor.

miloo94 - 3 days ago

Looks really neat! Before I built Hacksy for iOS, I also contemplated building a macOS version for HN news.

ckluis - 3 days ago

I built one and deleted it - suggestion that I found useful

Split-pane the content: original article | comments

stalfosknight - 3 days ago

After playing around with it for a bit, one request I would like to make is being able to open multiple tabs.

whh - 3 days ago

This is so nice. The UX feels very smooth too - I love these kinds of native apps. Thank you!

acquire9395 - 3 days ago

i would love keyboard-driven navigation! espeically for switching between the post and comments :)

rcarmo - 3 days ago

Nice. It is actually very close to the experience I have via RSS on Reeder.

rickknowlton - 3 days ago

crazy you built this thing in less than a week! did you use the claude code from CLI or via the macOS app to help with this? just kind of curious on your workflow!

lysace - 3 days ago

Please make a tvOS client! =) Seriously though.

cadamsdotcom - 3 days ago

Congrats on launching!

How is this superior to an RSS reader?

nullbyte808 - 3 days ago

Commenting from the app. Good job!

numbers - 3 days ago

please add in the keyboard shortcuts to navigate, that's one of my favorite things about native desktop apps

dhruv3006 - 2 days ago

Love this man!

yawniek - 3 days ago

really nice, but if you have high res monitor the fonts are too small. would be nice to zoom the ui

wegoagain_dev - 3 days ago

IOS next and you've nailed it!!

aoyama1chome - 3 days ago

What does your CLAUDE.md look like?

self_awareness - 3 days ago

I mean, what's the point of this app? It looks exactly like the web version, without any improvements over the abysmal HN threading.

manlymuppet - 3 days ago

Some nice to haves: automatic paywall bypass for paid sites, and automatic cookie/pop-up rejection.

genie3io - 3 days ago

[dead]

acheilies - 3 days ago

[dead]

ranger_danger - 3 days ago

Looks nice but I don't have/want a Mac so I can't really use it. Support for other platforms would be nice.