01 / The Problem
Problem
Long URLs are hard to share and track, while basic URL shorteners run into code collisions under concurrent requests and slow database queries on frequent redirects.
Linklyst is a URL shortening and link management app built with Next.js App Router, Prisma ORM, and PostgreSQL.
01 / The Problem
Long URLs are hard to share and track, while basic URL shorteners run into code collisions under concurrent requests and slow database queries on frequent redirects.
02 / The Solution
Built a Base62 short-code generator backed by PostgreSQL unique constraints and bounded retries, an in-memory redirect cache, IP rate limiting, QR code exports, and click tracking.
03 / Architecture & Features
Generates compact short codes backed by PostgreSQL unique constraints and bounded retry logic to avoid collisions.
Caches frequently accessed short codes in memory so GET /[shortCode] redirects resolve without waiting on a database round-trip.
Protects link creation routes with IP rate limiting and Zod URL schema validation.
Tracks click events (/api/analytics), manages user links with NextAuth, exports QR codes, and runs automated tests with Vitest.
04 / Features
05 / Challenges