Skip to content

rudraksh-sharma-1/URL-Shortner

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

13 Commits
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ”— URL Shortener - MERN Stack Project

A full-stack URL shortener application built using the MERN stack (MongoDB, Express.js, React, Node.js) with authentication, stats tracking, and a responsive UI.

πŸš€ Deployed Frontend: https://rudraksh-url-shortner.vercel.app
πŸ› οΈ Deployed Backend: https://url-shortner-xclh.onrender.com


πŸ“Œ Overview

This is a full-featured URL shortening application where users can:

  • Shorten long URLs into compact ones
  • View analytics such as number of clicks and creation date
  • Register and log in securely
  • See their own history of shortened URLs
  • Access public stats for any short URL code

✨ Key Functionalities

πŸ” Authentication

  • User registration and login
  • JWT-based protected routes
  • Auth context for frontend auth flow

πŸ”— URL Shortening

  • Authenticated users can generate short links
  • Automatically generates a unique short code
  • Links are saved with user reference and analytics

πŸ“ˆ Stats Viewer

  • Check original URL, click count, and creation date using the short code

πŸ•“ URL History

  • Paginated history of URLs shortened by the logged-in user
  • Includes click count, original & short URLs, and timestamps

🎨 Responsive UI

  • Built with Tailwind CSS and React
  • Mobile-first, clean design with proper word-breaking for long URLs

πŸ›  Tech Stack

Layer Tech
Frontend React, Vite, Tailwind CSS
Backend Node.js, Express.js
Database MongoDB Atlas
Auth JWT + bcryptjs
Deployment Vercel (Frontend), Render (Backend)

βš™οΈ Project Setup Guide

🧩 Prerequisites

  • Node.js v18+
  • MongoDB Atlas account
  • Vercel + Render accounts (for deployment)

πŸ“ Backend Setup

Clone the repo:

git clone https://github.com/your-username/url-shortener.git
cd url-shortener/server
npm install

Create a .env file:
PORT=5000
BASE_URL=https://url-shortner-xclh.onrender.com
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret

npm run dev
cd ../client
npm install
npm run dev



About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published