Skip to content

Adityamkumar/Url_Shortner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 

Repository files navigation

Shortify Banner

Docker TypeScript Node.js Redis MongoDB

🚀 Shortify: A High-Performance, Dockerized URL Shortener

Shortify is a professional-grade URL shortening service built for speed, scalability, and elegance. Transform long, cluttered links into clean, trackable aliases with sub-millisecond redirection thanks to Upstash Redis.

✨ View Portfolio🔗 Github🚀 Setup


✨ Features

  • Lightning Fast: Redirects optimized with Upstash Redis caching for near-zero latency.
  • 🏷️ Custom Aliases: Create branded, memorable links instead of random strings.
  • 📊 Real-time Analytics: Detailed tracking of visit counts and link performance.
  • 🛡️ Intelligent Rate Limiting: Built-in protection to prevent API abuse.
  • 🐳 Docker Support: Fully containerized for seamless deployment.
  • 🎨 Premium UI: Modern dark-themed interface built with React 19 and Tailwind CSS 4.0.

🛠️ Tech Stack

Layer Technology Purpose
Frontend React 19 + TypeScript Type-safe, interactive user interface.
Backend Node.js + Express Scalable asynchronous API engine.
Database MongoDB + Mongoose Persistent storage for URL metadata.
Caching Upstash Redis High-speed global cache for redirections.
Styling Tailwind CSS 4.0 Next-gen utility-first CSS styling.
Container Docker Consistent environment and deployment.

🚀 Setup Instructions

1️⃣ Local Development Setup

To run this project locally, clone the repository and install dependencies for both the frontend and backend.

# Clone the repository
git clone https://github.com/Adityamkumar/Url_Shortner.git
cd Url_Shortner

# Setup Backend
cd backend
npm install
npm run dev

# Setup Frontend (in a new terminal)
cd frontend
npm install
npm run dev

2️⃣ Environment Variables

Create a .env file in the backend/ directory and configure the following:

PORT=6000
NODE_ENV=development
CLIENT_URL=http://localhost:5173
MONGODB_URI=your_mongodb_connection_string
UPSTASH_REDIS_REST_URL=your_upstash_redis_url
UPSTASH_REDIS_REST_TOKEN=your_upstash_redis_token
REDIS_TTL=3600

🐳 Docker Support

Build Image Locally

If you want to build the backend image yourself:

cd backend
docker build -t my-url-shortner .

Run Container Locally

Run the container using your local .env file:

docker run -p 6000:6000 --env-file .env my-url-shortner

Pull from Docker Hub

You can pull and run the official pre-built image directly:

# Pull the latest image
docker pull adityakumar91/url-shortner:latest

# Run the container
docker run -p 6000:6000 --env-file .env adityakumar91/url-shortner:latest

🌐 API Endpoints

Method Endpoint Description
POST /api/v1/shortId Generate a shortened URL (supports custom aliases)
GET /api/v1/analytics/:shortId Fetch visit count and analytics
GET /:shortId Redirect to the original long URL

Developed with ❤️ by Aditya

About

Shortify is designed for those who value speed and aesthetics. Every detail—from the glassmorphic sidebar to the spring-physics animations—is crafted to provide an elite user experience.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages