A modern URL shortener with QR code generation built with Bun. Features real-time analytics, management dashboard, and persistent storage.
- 🔗 URL shortening with random code generation
- 📷 Automatic QR code generation for shortened URLs
- 📊 Visit tracking and analytics
- 🗑️ One-click deletion of entries
- 📱 Responsive web interface
- 💾 SQLite database persistence
- ⚡ Lightning-fast Bun runtime
Use this docker-compose
services:
qurl:
container_name: QURL
ports:
- 3000:3000 # Host Port : Container Port
image: ghcr.io/its4nik/qurl
docker compose up -d
Or if you prefer docker run commands:
docker run -d -p 3000:3000 --name qurl ghcr.io/its4nik/qurl
- Install Bun
curl -fsSL https://bun.sh/install | bash
- Clone the repository:
git clone https://github.com/its4nik/qurl.git
cd qurl
- Install dependencies:
bun install
- Create public directory for QR codes:
mkdir -p public/qr
Start the server:
bun start
The web interface will be available at http://localhost:3000
API Example:
curl -X POST -d "url=https://example.com" http://localhost:3000/shorten
Endpoint | Method | Description |
---|---|---|
/ |
GET |
Web interface dashboard |
/shorten |
POST |
Create new short URL |
/qr/{code}.png |
GET |
Get QR code image |
/delete/{code} |
DELETE |
Delete short URL and QR code |
/{code} |
GET |
Redirect to original URL |
- Real-time list of all shortened URLs
- QR code previews with download links
- Visit counter tracking
- Responsive design that works on mobile devices
- One-click deletion with confirmation
- Form validation for URL input
ToDo:
- Add custom alias support
- Add expiration dates for links
Contributions are welcome! Please open an issue first to discuss what you'd like to change.
MIT © [Its4Nik]