Skip to content

DefNotArham/shorten-url-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🔗 URL Shortener API

A fast and simple URL shortening API built with Node.js, Express, TypeScript, and MongoDB.

Create shortened links, redirect users to the original URL, and track the number of clicks.


🚀 Features

  • 🔗 Create shortened URLs
  • ⚡ Fast redirects
  • 🧬 Unique short code generation using NanoID
  • ✅ URL validation
  • 📊 Click tracking
  • 🗄️ MongoDB database storage
  • 🔒 Prevent duplicate short codes
  • ⏱️ Automatic timestamps

🛠️ Tech Stack

TypeScript Node.js Express MongoDB Mongoose


⚙️ How It Works

  1. User sends a URL to the API
  2. API validates the URL
  3. A unique short code is generated
  4. The URL is stored in MongoDB
  5. User receives a shortened URL
  6. Visiting the shortened URL redirects to the original website
  7. Each visit increments the click counter

2026-06-28.20-10-54.mov

About

I created shroten url api

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors