Why it feels fast
Cold data in MongoDB, hot paths in Redis.
Repeated redirects skip the database whenever the short code is already cached, reducing latency where it matters.
TypeScript • Express • MongoDB • Redis
Paste a long URL, generate a compact link, and redirect fast with Redis-backed lookups. Built as a clean service with layered architecture and dependency injection.
Why it feels fast
Repeated redirects skip the database whenever the short code is already cached, reducing latency where it matters.
Architecture
The service is split into clear layers, which keeps the HTTP surface small and the business logic isolated from storage details.
Operational basics
Use /health for uptime monitoring while the main root endpoint stays focused on
shortening links.
Minimal API
Create a new short code from a valid long URL.
Resolve the short code and redirect to the original destination.
Return a simple status payload for monitoring and deployment checks.
curl -X POST / \
-H "Content-Type: application/json" \
-d '{"longUrl":"https://example.com"}'