A full-stack MERN application for shortening URLs with user authentication, analytics, and QR code generation.
- User Authentication: Secure login/signup with JWT
- URL Shortening: Generate short URLs with unique IDs or custom aliases
- Analytics: Track click counts and view statistics
- QR Codes: Generate and download QR codes for any URL
- Social Sharing: Share links on multiple platforms
- Responsive Design: Works on all devices
- Frontend: React, Tailwind CSS, Hero UI
- Backend: Node.js, Express
- Database: MongoDB
- Authentication: JWT
- QR Generation: react-qr-code
- Node.js v14+
- MongoDB (Atlas or local)
- npm or yarn
- Clone the repository:
git clone https://github.com/pranjul-dev/Url-Shortener
cd tiny-link- Set up the backend:
cd server
npm install- Create
.envfile inserverdirectory:
MONGO_URI=your_mongodb_connection_string
JWT_SECRET=your_jwt_secret_key
PORT=8080- Set up the frontend:
cd ../client
npm install
npm run buildcd ../server
npm startThe app will be available at http://localhost:8080
| Environment Variable | Description | Required |
|---|---|---|
| MONGO_URI | MongoDB connection string | Yes |
| JWT_SECRET | Secret for JWT tokens | Yes |
| PORT | Server port (default: 8080) | No |
tiny-link/
├── client/ # React frontend
│ ├── public/
│ └── src/
├── server/ # Express backend
│ ├── controllers/
| ├── middlewares/
│ ├── models/
│ ├── routes/
│ └── utils/
└── README.md
Pull requests are welcome. For major changes, please open an issue first.
