A fast, full-stack URL shortener with click analytics, OTP-based authentication, a Redis-backed redirect engine, and dynamic QR Code generation.
- Frontend App: app.shrtn.fun (Vercel)
- API & Short Links: shrtn.fun (Render)
This repository is organized as a monorepo:
- client/: React 19 + Vite frontend. Features clean modern dashboard styling with Tailwind CSS v4, Framer Motion page transitions, Recharts analytics, and dynamic QR Code actions. See the Client README for details.
- server/: Java 25 + Spring Boot 4 REST API. Backed by PostgreSQL (Supabase), Upstash Redis caching, and the Resend API for transactional email verification. See the Server README for details.
- Redirect Path: Public requests to
shrtn.fun/{shortCode}bypass the React application, querying Upstash Redis first (24h cache) and falling back to Supabase PostgreSQL on misses. Clicks are logged with browser and OS analytics (usingua-parser), and the client is 302-redirected. - QR Code Resolution: Append
?format=qrto any valid short URL to dynamically resolve, render, and download its QR code image directly from the backend. - Caches: Employs separate Redis caches for the redirect hot-path, user URL listings, and click analytics, with active invalidation strategies on writes.
Ensure you have Java 25, Bun (or Node.js), and a local/cloud database config.
cd server
cp .env.example .env # configure environment variables
./gradlew bootRun # runs on http://localhost:8080cd client
bun install # or npm install
bun run dev # runs on http://localhost:5173 (proxied to :8080)MIT — see LICENSE.