A modern, high-performance single-file URL shortening engine with instant QR generation, smart deep-link routing, and real-time Firebase click analytics.
Chat URL Shorter is an ultra-fast, serverless, single-file URL shortening web application. Built with a sleek Deep Indigo and Slate glassmorphism aesthetic, it turns lengthy, cluttered URLs into clean, compact links (domain.com/:shortCode) with zero server overhead.
Featuring persistent Firebase Realtime Database storage, vector QR code export, platform auto-detection (YouTube, Instagram, Maps, GitHub, etc.), and real-time click tracking, it provides a complete link management suite directly in the browser.
Long URL Input βββΊ Base62 Generator & Collision Check βββΊ Firebase RTDB (Atomic set)
β
Visitor opens /:shortCode βββ SPA Rewrite (vercel.json) ββββββββββββββ
β
ββββΊ 1. Parse pathname cleanly (/:shortCode)
ββββΊ 2. Firebase atomic click increment & timestamp update
ββββΊ 3. Instant browser redirect via window.location.replace()
0-9, a-z, A-Z) and performs a real-time existence check in Firebase before persisting. If a custom alias is requested, it is strictly validated against reserved keywords and sanitized.vercel.json wildcard rewrites (/(.*) -> /index.html), all clean short URL paths load index.html. The client-side router extracts the slug directly from window.location.pathname, bypassing traditional 404 errors.clicks + 1) and logs lastClickedAt asynchronously while instantly executing window.location.replace() to prevent redirect delay and back-button traps.https://shortlink-rosy-chi.vercel.app/my-link) without hash fragments.localStorage so users can manage, disable, or delete only the links they created.| Technology | Purpose |
|---|---|
| HTML5 & CSS3 | Single-file architecture & semantic document structure |
| Tailwind CSS (CDN) | Responsive layout, modern utility styling & glassmorphism |
| JavaScript (ES6+) | Base62 generation, validation, state management, and SPA routing |
| Firebase Realtime Database (v9) | Cloud persistence, atomic transactions, and real-time syncing |
| QRCode.js | Client-side vector QR code rendering and image export |
| Vercel | Edge hosting with single-page application wildcard rewrites |
git clone https://github.com/your-username/chat-url-shorter.git
cd chat-url-shorter
Open index.html and update the firebaseConfig object with your own Firebase project credentials:
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_PROJECT_ID.firebaseapp.com",
databaseURL: "https://YOUR_PROJECT_ID-default-rtdb.firebaseio.com",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_PROJECT_ID.firebasestorage.app",
messagingSenderId: "YOUR_SENDER_ID",
appId: "YOUR_APP_ID"
};
To ensure query performance when indexing links by owner identity, set the following rules in your Firebase Console β Realtime Database β Rules:
{
"rules": {
"links": {
".read": true,
".write": true,
".indexOn": ["ownerId"]
}
}
}
You can serve index.html using any local development server:
# Using Python
python3 -m http.server 3000
# Using Node / npx
npx serve .
Visit http://localhost:3000 in your browser.
This repository includes vercel.json preconfigured for clean path SPA rewrites:
{
"rewrites": [
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}
Simply import the repository into Vercel and click Deploy. Clean URLs like https://your-domain.vercel.app/:shortCode will work out of the box.
Distributed under the MIT License. See LICENSE for more information.
HTML
100.0%
A modern, high-performance single-file URL shortening engine with instant QR generation, smart deep-link routing, and real-time Firebase click analytics.
Chat URL Shorter is an ultra-fast, serverless, single-file URL shortening web application. Built with a sleek Deep Indigo and Slate glassmorphism aesthetic, it turns lengthy, cluttered URLs into clean, compact links (domain.com/:shortCode) with zero server overhead.
Featuring persistent Firebase Realtime Database storage, vector QR code export, platform auto-detection (YouTube, Instagram, Maps, GitHub, etc.), and real-time click tracking, it provides a complete link management suite directly in the browser.
Long URL Input βββΊ Base62 Generator & Collision Check βββΊ Firebase RTDB (Atomic set)
β
Visitor opens /:shortCode βββ SPA Rewrite (vercel.json) ββββββββββββββ
β
ββββΊ 1. Parse pathname cleanly (/:shortCode)
ββββΊ 2. Firebase atomic click increment & timestamp update
ββββΊ 3. Instant browser redirect via window.location.replace()
0-9, a-z, A-Z) and performs a real-time existence check in Firebase before persisting. If a custom alias is requested, it is strictly validated against reserved keywords and sanitized.vercel.json wildcard rewrites (/(.*) -> /index.html), all clean short URL paths load index.html. The client-side router extracts the slug directly from window.location.pathname, bypassing traditional 404 errors.clicks + 1) and logs lastClickedAt asynchronously while instantly executing window.location.replace() to prevent redirect delay and back-button traps.https://shortlink-rosy-chi.vercel.app/my-link) without hash fragments.localStorage so users can manage, disable, or delete only the links they created.| Technology | Purpose |
|---|---|
| HTML5 & CSS3 | Single-file architecture & semantic document structure |
| Tailwind CSS (CDN) | Responsive layout, modern utility styling & glassmorphism |
| JavaScript (ES6+) | Base62 generation, validation, state management, and SPA routing |
| Firebase Realtime Database (v9) | Cloud persistence, atomic transactions, and real-time syncing |
| QRCode.js | Client-side vector QR code rendering and image export |
| Vercel | Edge hosting with single-page application wildcard rewrites |
git clone https://github.com/your-username/chat-url-shorter.git
cd chat-url-shorter
Open index.html and update the firebaseConfig object with your own Firebase project credentials:
const firebaseConfig = {
apiKey: "YOUR_API_KEY",
authDomain: "YOUR_PROJECT_ID.firebaseapp.com",
databaseURL: "https://YOUR_PROJECT_ID-default-rtdb.firebaseio.com",
projectId: "YOUR_PROJECT_ID",
storageBucket: "YOUR_PROJECT_ID.firebasestorage.app",
messagingSenderId: "YOUR_SENDER_ID",
appId: "YOUR_APP_ID"
};
To ensure query performance when indexing links by owner identity, set the following rules in your Firebase Console β Realtime Database β Rules:
{
"rules": {
"links": {
".read": true,
".write": true,
".indexOn": ["ownerId"]
}
}
}
You can serve index.html using any local development server:
# Using Python
python3 -m http.server 3000
# Using Node / npx
npx serve .
Visit http://localhost:3000 in your browser.
This repository includes vercel.json preconfigured for clean path SPA rewrites:
{
"rewrites": [
{
"source": "/(.*)",
"destination": "/index.html"
}
]
}
Simply import the repository into Vercel and click Deploy. Clean URLs like https://your-domain.vercel.app/:shortCode will work out of the box.
Distributed under the MIT License. See LICENSE for more information.
HTML
100.0%