Skip to content

A full-stack URL shortener application that allows users to shorten long URLs and manage their shortened links. The app provides user authentication, secure password management, and a clean user interface.

Notifications You must be signed in to change notification settings

faizanr27/Shortsy

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

71 Commits
 
 
 
 
 
 

Repository files navigation

URL Shortener App

A full-stack URL shortener application that allows users to shorten long URLs and manage their shortened links. The app provides user authentication, secure password management, and a clean user interface.

Features

  • User authentication (signup/signin) using JWT (JSON Web Token)
  • Password hashing with bcrypt for secure storage
  • URL shortening and redirection
  • Store multiple URLs for each user
  • Protected routes for URL management
  • Responsive and modern UI with Shadcn UI

Tech Stack

Frontend

  • React: JavaScript library for building user interfaces
  • Tailwind CSS: Utility-first CSS framework for styling
  • Shadcn UI: Customizable component library for React

Backend

  • Node.js: JavaScript runtime environment
  • Express.js: Fast, unopinionated web framework for Node.js
  • Mongoose: MongoDB object modeling tool designed to work in an asynchronous environment
  • MongoDB Atlas: Cloud-based MongoDB database
  • JWT: Secure token-based user authentication
  • bcrypt: Password hashing for security

Project Structure

├── backend
│   ├── db          
│   ├── middleware  
│   ├── models      
│   ├── routes     
│   └── server.js   
├── frontend
│   ├── components  
│   ├── pages       
│   ├── App.js     
│   └── index.js    
└── README.md

Installation and Setup

Prerequisites

  • Node.js installed on your machine
  • MongoDB Atlas account

Backend Setup

  1. Clone the repository:
git clone https://github.com/faizanr27/url-shortner.git
cd url-shortner/backend
  1. Install dependencies for both frontend and backend:
cd backend
npm install
cd ../frontend
npm install
  1. Create a .env file in the backend folder with the following environment variables:
MONGO_URI=mongodb+srv://<username>:<password>@cluster.mongodb.net/<dbname>
JWT_SECRET=your_jwt_secret
PORT=5000
  1. Start the backend server:
cd backend
node server.js
  1. Start the frontend application:
cd frontend
npm run dev

Usage

  • Create an account by signing up
  • Log in to access your dashboard
  • Shorten URLs and manage your shortened links
  • Access protected routes like the URL dashboard only after logging in

Future Enhancements

  • Add analytics for shortened URLs
  • Implement custom URL slugs
  • Add email notifications for account-related activities

About

A full-stack URL shortener application that allows users to shorten long URLs and manage their shortened links. The app provides user authentication, secure password management, and a clean user interface.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published