Skip to content

csendin/url-shortener

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

8 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

๐Ÿ”— URL Shortener API

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.

๐Ÿš€ Features

  • 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

๐Ÿ› ๏ธ Tech Stack

  • 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)

About

Simple, fast, and easy-to-use URL shortener project.

Topics

Resources

Stars

Watchers

Forks