Portfolio
← Projects
Web · 2022

Kotaa

A URL shortener you host yourself, serving links from Redis at the edge so redirects skip the database.

SvelteKitRedisSupabaseVercel Edge
Screenshot of Kotaa

Kotaa is an open-source URL shortener you can host yourself. A typical shortener looks up each link in a database before it redirects, and even a fast Postgres query adds 10 to 50 ms. Kotaa reads links from Redis and skips the database, which made redirects 70 to 80% faster than a database-backed shortener.

What it does

  • Short links, with an admin page only you can sign in to.
  • Redirects run at the edge, close to whoever clicked.
  • Self-hosting takes about five minutes. The code is on GitHub.

How it’s built

  • SvelteKit for the app and the API.
  • Upstash Redis for redirect lookups. Its HTTP API was the only Redis client that worked in Vercel’s edge runtime.
  • Supabase Postgres holds the real copy of every link and keeps Redis in sync. Supabase also handles sign-in for the admin page.
  • Vercel Edge Functions run the redirects.