A free, open-source, no-login URL shortener with QR code generation. Built with Next.js + TypeScript on the frontend, Express + TypeScript on the backend, and MongoDB for data storage.
- 🔒 No authentication required
- 🧠 Avoids duplicate entries: already-shortened URLs are reused
- 🔁 Prevents shortening an already-shortened URL (loop protection)
- ⚙️ Domain can be changed easily via
.env(no code changes needed) - 🖼️ Extracts Open Graph metadata from original URL
- 📦 Fully open-source and ready for deployment
git clone https://github.com/matheusleiner/url-shortener.git
cd url-shortener# Install frontend and backend dependencies
cd frontend && npm install
cd ../backend && npm installCreate a .env file in both frontend/ and backend/ folders:
PORT=3001
MONGODB_URI=your_mongodb_connection_string
FRONTEND_URL=https://yourdomain.comNEXT_PUBLIC_API_URL=https://api.yourdomain.com# In two terminals:
cd backend && npm run dev
cd frontend && npm run devPull requests are welcome! Feel free to open issues or suggest features.
This project is licensed under the MIT License.
