ENGINEERING ★ 135 upvotes 2022

How I Built LoginWithHN

Retrospective Overview & Key Insights

Distilled analysis of the business dynamics, operational challenges, and strategic takeaways:

In this technical retrospective (2022), @hardwaresofton shares practical architectural lessons learned from running, scaling, or migrating production software under lean constraints.

Core Principles for Independent Builders:
1
Defaulting to simpler architectures (such as monolithic frameworks, SQLite, or managed VPS) prevents early engineering bankruptcy.
2
Evaluating true compute and egress costs reveals that high cloud bills can often be slashed by 80%+ through judicious re-platforming.
3
Code you write at 2 AM as a solo engineer must be easy to debug six months later without complex microservice dependencies.
Community Debate Themes:

HN engineers debated the tradeoffs between cloud convenience and raw server economics, database indexing strategies, and resisting premature architectural complexity.

Community Discussions & Critical Reviews

High-signal perspectives, counter-arguments, and peer founder insights debated on Hacker News (58 total discussions):

ZE @zeroxfe Peer Contributor

I sidestepped a whole bunch of user/password management/verification complexity by restricting my toy app (https://pitchy.ninja) to "login via email" where you get sent a code anytime you need to log in.

I wasn't sure about how well it would work when I first launched it, but now, about a year and a half later, I'm really happy with it.

The biggest advantages are: I'm not tied to an SSO provider, I don't have deal with password management/security/reset/etc., and I have a super simple UX (identical flows for signup and login.)

GA @gavinray Peer Contributor

``` > this.ongoingPolls.set(hnUsername, displayToken);

``` Instead of creating a timer + poll loop per user on your server, why not use one single scheduled job and an array of usernames?

Seems like debugging +10,000 interval timers could get hairy

CA @capableweb Peer Contributor

It's a bit unclear what details you get as an application developer when using LoginWithHN. Is it just to verify that a user is also a user of HN? Or do I get the news.ycombinator.com token so I can build HN clients that are able to post comments as the user?

AA @Aachen Peer Contributor

How it logs me in via HN without having to submit my HN password to a party other than HN (the one thing I was interested in, buried somewhere in the middle of the post) is this good old hack:

Provide[s] a unique code or phrase to put in their HN profile
AD @adrianwaj Peer Contributor

Could you also setup an HN cryptocurrency (or token) and grant units according to karma and account age please (or whatever other factors you deem important)?

- let's see what happens then to all the crypto skeptics around here. An about-face?

HISTORICAL ERA Pandemic Bubble (2020–2022)
COMMUNITY SCORE ★ 135 points
TOTAL DISCUSSIONS 58 comments
TOPICS & TECH STACK: