short.link
A URL shortener where the backend was the hard part. Rotating refresh tokens, a guest-to-account claim flow that shaped the relational schema, local geo/UA click parsing off the hot path, and a VPS deploy that rolls itself back when its post-deploy check fails.
- react 19
- express
- postgresql + drizzle
- redis
- docker + traefik
POST /api/linkscustom alias + QR SVG export
Guest session bannerunclaimed links held pre-signup
Click analytics viewcountry, OS, browser, referrer
Zod schema gaterejects malformed payloads at edge
Redis rate limiterblocks bursts before PostgreSQL
POST /api/auth/claimmigrates guest links on signup
GET /:slug → RedisO(1) cache hit → 302 redirect
PostgreSQL + Drizzleusers · sessions · links · clicks
geoip-lite + ua-parserzero external API calls per click
Vercel CDN (/client)static SPA rewrite to VPS API
ARM64 VPS + Traefikautomatic Let’s Encrypt TLS
Post-deploy health gateauto-rollback on failed probe