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.
- ⚡ 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.
| 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. |
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 devCreate 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=3600If you want to build the backend image yourself:
cd backend
docker build -t my-url-shortner .Run the container using your local .env file:
docker run -p 6000:6000 --env-file .env my-url-shortnerYou 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| 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