URL Shortener
Completed

URL Shortener

A backend-focused application for shortening URLs with secure authentication and authorization using JWT and bcrypt. Includes a well-structured MongoDB schema and multiple RESTful API endpoints built with a modular Node.js architecture.

Project Documentation

šŸ”— URL Shortener & Analytics Platform

URL Shortener & Analytics is a full-stack web application that allows users to convert long URLs into short, easy-to-share links while tracking detailed analytics about their links.

It provides an efficient way to create, manage, share, and monitor shortened URLs from a single platform.


šŸ’” Problem Statement

Long URLs can be difficult to share, remember, and manage. Additionally, users often do not know how their shared links are performing, such as how many people clicked them.

URL Shortener & Analytics solves this problem by converting long URLs into short links and providing analytics to help users monitor link performance.


✨ Key Features

  • šŸ”— Shorten Long URLs into simple and unique links
  • ⚔ Fast Redirection to the original URL
  • šŸŽ² Unique Short Code Generation
  • šŸ“Š URL Analytics and Click Tracking
  • šŸ“ˆ Track Link Performance
  • šŸ‘† Monitor Total Clicks
  • šŸ“‹ Easy Link Sharing and Copying
  • šŸ” Secure User Authentication
  • šŸ—‚ļø Manage Created URLs
  • šŸ“± Responsive User Interface

šŸ“Š Analytics

The platform provides analytics for shortened URLs, helping users understand how their links are being used.

Users can monitor:

  • šŸ“ˆ Total number of clicks
  • šŸ”— Performance of individual shortened URLs
  • šŸ“Š Link usage and engagement
  • šŸ“… Click activity over time

šŸ› ļø Tech Stack

Frontend

  • React.js
  • Tailwind CSS
  • TanStack Query

Backend

  • Node.js
  • Express.js

Database

  • MongoDB

āš™ļø How It Works

  1. Users securely sign up or log in to the platform.
  2. Users enter a long URL they want to shorten.
  3. The application validates the original URL.
  4. A unique short code is generated.
  5. The original URL and short code are stored in the database.
  6. A shortened URL is generated and displayed to the user.
  7. When someone visits the shortened URL, they are redirected to the original destination.
  8. Each visit is tracked and stored for analytics.
  9. Users can view the performance and click analytics of their shortened URLs.

ā–¶ļø Run Locally

Clone the Repository

git clone https://github.com/irfan-ansari303/url-shortner.git
cd url-shortner

Setup and Run Backend

cd backend
npm install
npm run dev

Setup and Run Frontend

Open a new terminal and run:

cd frontend
npm install
npm run dev

šŸ“‚ Project Structure

url-shortner/
ā”œā”€ā”€ frontend/          # React.js frontend application
ā”œā”€ā”€ backend/           # Node.js and Express.js backend
ā”œā”€ā”€ README.md
└── .gitignore

šŸŽÆ Project Objective

The objective of URL Shortener & Analytics is to provide a simple and efficient platform where users can shorten long URLs and gain valuable insights into their link performance through analytics and click tracking.

šŸ”— Shorten • šŸ“¤ Share • šŸ“Š Track • šŸ“ˆ Analyze


šŸ‘Øā€šŸ’» Author

Irfan Ansari Full Stack Developer

⭐ If you like this project, consider giving it a star!