← Back to Articles
2026-09-19 • 5 min read

Designing Linky: A URL Shortener Built Around Security

A URL shortener sounds like a weekend project. The redirect part is. What makes it interesting is everything around it: who can see a link, who can change it, and how you stop people from abusing it.

The stack

Features

The part I'm proudest of: the tests

Linky has 70 integration tests. Writing them turned up 8 real security bugs before launch, and each one now has its own regression test:

  1. One endpoint exposed other users' URL data.
  2. You could read or edit someone else's link by changing its ID (an IDOR bug).
  3. The same IDOR problem existed in analytics.
  4. Private links weren't properly checked on redirect.
  5. API keys were stored in plain text.
  6. Refresh tokens weren't revoked when they should have been.
  7. The admin hard-delete of soft-deleted URLs didn't behave correctly.
  8. URL updates skipped validation.

None of these would show up in a demo. All of them would matter the day real users arrived. That's the main lesson I took from Linky: the happy path is easy, and the tests that try to break your own permissions are worth the most.

Try it at [linky.ajinkyadhotre.com](https://linky.ajinkyadhotre.com).