A minimal and functional URL shortener built with Fastify, Prisma, Zod, and NanoID.
It allows clients to shorten URLs (optionally with custom aliases) and handles redirection.
- Shorten long URLs with optional custom slugs
- Auto-generates 8-character slugs if none provided
- URL expiration after 5 minutes
- Redirects users from short URL to original
- Schema validation with Zod
- Uses Prisma ORM for data persistence
- Fastify โ Fast and low-overhead web framework
- Zod โ Type-safe validation
- NanoID โ Secure and URL-friendly ID generator
- Prisma โ Modern database toolkit
- PostgreSQL โ Database (configured via Prisma)