SMF·BITLY
Can a prompt replace Bitly?
Analytics — link shortening + click analytics
Exhibit tracking slip
Verdict
A slug, a lookup, a redirect, and a row in a table — the whole job runs comfortably on a free-tier edge platform, and QR codes are one library call. The thing actually being bought is that bit.ly resolves links created in 2012 and will presumably still resolve them in 2032, which is an institutional promise, not a technical one. That promise is worth something on packaging or in print; it is worth nothing in this week's newsletter.
Exhibit A — The prompt
Received on30.07.2026Build a link shortener with click analytics and QR codes: a redirect endpoint that looks up a short slug, redirects to its destination, and logs the click (timestamp, rough location, device type, referer) without slowing the redirect down — the lookup and the log write should never block each other. Slugs default to a short random string, but support a custom back-half, and creating one that already exists should fail loudly rather than silently overwrite it. Generate a QR code for any link, cached rather than regenerated on every request. Support an optional expiry date or click cap per link, after which it redirects to a fallback URL instead of erroring. Build a small password-protected admin view listing links with their click counts, plus a rough breakdown by country and device. An edge platform with a key-value store for the slug lookup and a small database for the click log is a clean fit for this and runs comfortably on a free tier — but the specific stack matters less than keeping the redirect itself fast and never dependent on the analytics write completing first.
Do not build landing pages, campaign grouping, or an SLA — the actual thing a link shortener sells isn't a technical feature, it's the operator's intent to keep the domain and the redirect working for years. Be explicit in the README that these links only outlive the domain they're hosted on: letting that domain lapse breaks every link it ever issued, at once.
Opening prefills the prompt — press enter to run it.
Exhibit B — What you lose
Exhibit C — Why people still pay: link permanence
Bitly's actual product is a promise about the future: that a link printed on a box in 2019 still resolves today. No amount of code buys that, only an institution that intends to keep existing. Teams also pay for shared workspaces and an audit trail, and marketing departments pay because the alternative is asking engineering for a redirect and waiting two weeks.
Questions
Can I import my existing Bitly links?
Bitly can export your links via their API, and that maps directly onto a slug-to-destination table like this one. What doesn't come across is click history before the migration — new clicks start logging from day one on your own infrastructure.
Will it work on my phone?
The admin view for checking link stats renders fine on a phone browser. Creating and sharing links works the same way on any device, since it's just a URL.
What does it cost to run?
Close to nothing on a free tier for personal-scale traffic, plus whatever a domain already costs — genuinely one of the cheapest entries here to actually run.
What's the one thing that doesn't survive the rebuild?
The institutional promise. Bitly's real product is the expectation that a link printed on packaging in 2019 still resolves today; a self-hosted shortener only keeps that promise for as long as you personally keep renewing the domain and keeping the lights on.
Related tools
Receipt