Skip to content

Repository files navigation

⚡ LinkGenius-AI

React Node Database AI

An intelligent URL shortener that leverages Agentic AI to transform how to manage and share links. It includes features like AI Assistant, Realtime Site Preview, Smart Link Preview, Bulk URLs Shortener, Share Via Mail/WhatsApp/X, QR Generation, Click Analytics Visualization, Rate Limiter, Malicious URL Detection etc.

🖼 Project Preview

Demo of Normal Flow (Without AI Assistant)

without-ai-assistant.mp4

Demo of AI Assistant

ai-assistant.mp4

🏠 Home Page

GHBanner

🔍 Features Preview

👁️ Preview and AI Analyze 🔗 Search & Link Card
GHBanner GHBanner

📥 Bulk Import & Export 📥 Bulk Links Shortener Preview
GHBanner GHBanner

🔗 Share Link 🌐 Realtime Site Preview 📱QR Code
GHBanner GHBanner GHBanner

📊 Click Analytics Visualization 🤖 AI Assistant Click Trend
GHBanner GHBanner

📊 AI Assistant Quick Suggestions 📊 AI Assistant Traffic Insights
GHBanner GHBanner

🤖 AI Assistant Chat 🌐 My Page
GHBanner GHBanner

🚀 Key Features

  • 🧠 AI-Powered Link Analysis: When you paste a URL, the AI automatically analyzes the content to generate a concise summary, extract the page title, and categorize the link (e.g., Tech, News, Social).
  • 🌐 Live Website Preview: Hover over any link card to see a real-time screenshot preview of that site. Implements a two-layer caching mechanism (in-memory + localStorage with 24h TTL) so screenshots are never re-fetched unnecessarily.
  • 📥 Bulk URLs Shortener (Import & Export): Upload a file containing many URLs and shorten them all in batch. Export all your links to CSV with full metadata included.
  • 🔗 Share Link: Share any shortened link instantly via WhatsApp, Twitter/X, Email, or the native device share sheet.
  • 🔎 Search & Sort Links: Search links by URL, title, alias, or category. Sort by newest, oldest, most clicked, least clicked, or expiring soon — available in both the main UI and the AI assistant chat.
  • 🌍 Link-in-Bio Page: A public /me page that showcases your top links as a clean, shareable landing page — your own personal Linktree-style profile, hosted on your own domain.
  • 💎 QR Code: Generate QR codes for every shortened link for easy offline sharing.
  • ✨ Smart Alias Suggestions: Instead of random strings, the AI suggests clever, context-aware aliases based on the destination content.
  • 💬 Interactive AI Assistant: A built-in chat interface where you can ask LinkGenius to summarize links, find top or worst performers, view traffic insights, export data, search links, and more. Streaming support and quick-action suggestions are built in.
  • 📊 Real-time Analytics: Track click counts per link with line graph and heatmap visualizations showing when and how often links are clicked.
  • 🎨 Rate Limiter: Built-in rate limiting preventing abuse (50 requests / 15 minutes for shortening, 200 requests / 15 minutes globally).
  • 🔐 Malicious URL Detection: Detects and blocks phishing or malicious URLs using Google Safe Browsing before shortening.
  • ⚡ Full-Stack Performance: Powered by an Express backend and SQLite with performance indexes for reliable URL redirection and data persistence.

🏗 Architecture Overview

Image

Diagram source
flowchart-elk LR

User --> Frontend
Frontend[React Frontend]

Frontend --> API

API[Express Backend]

API --> Single
API --> Bulk
API --> Share
API --> Live
API --> Preview
API --> SearchSort
API --> BioPage
API --> AI
API --> Assistant
API --> Analytics
API --> QR
API --> Security
API --> Rate

Assistant --> Quick
Assistant --> Shorten
Assistant --> Summarize
Assistant --> Search

Quick --> Topics

Preview[Smart Link Preview]
AI[AI Content Analysis]
Share[Share Via 
      Email, Whatsapp & X]
Live[Realtime Site Preview 
    #40;With SS Caching#41;]
Single[Single URL Shortener]
Bulk[Bulk URLs Shortener
     #40;Import & Export#41;]
SearchSort[Search & Sort Links]
Analytics[Click Tracking Analytics]
QR[QR Generation]
Rate[Rate Limiter]
Security[Malicious URL Detection]
Assistant[AI Assistant Panel]
BioPage[Link-in-Bio Page /me]
Quick[Quick Actions]
Summarize[AI Summarization
With Smart Analysis]
Shorten[AI Link Shortener]
Topics[
• Click Trend
• Traffic Insights
• Top Links
• Bottom Links
• Deletion of Expired Links
• Export Links to CSV]
Search[Smart Search Links]

API ---> DB[(SQLite Database)]
DB --> URLs
DB --> ClickEvents
Loading

🛠 Technical Details

  • Frontend: React 19 with Tailwind CSS 4 and Framer Motion.
  • Backend: Express.js custom server with better-sqlite3 for high-performance data storage.
  • AI Engine: Gemini 3 Flash for lightning-fast URL analysis and conversational capabilities.
  • Icons: Lucide-React for a consistent and clean visual language.
  • Implementation: A combined effort using Google AI Studio, ChatGPT and Gemini with self implemented extensions

⚙ Run Locally

  1. Clone the repository
  2. Install dependencies: npm install
  3. Set the GEMINI_API_KEY, SHORT_DOMAIN and GOOGLE_SAFE_BROWSING_KEY in .env.local
  4. Start dev server: npm run dev
  5. Open http://0.0.0.0:3000/

☁️ Deploy on Railway (Free)

For now, each person should deploy their own instance to keep links, data, and API keys fully private and isolated.

  1. Fork this repository to your GitHub account
  2. Create a free account on Railway and start a new project
  3. Select Deploy from GitHub repo and connect your fork
  4. Go to Variables and add the following environment variables:
Variable Description Required
GEMINI_API_KEY Your Gemini API key from Google AI Studio ✅ Yes
SHORT_DOMAIN Your Railway public URL e.g. https://yourapp.up.railway.app ✅ Not Required (Automatic)
GOOGLE_SAFE_BROWSING_KEY API key for malicious URL detection from Google Cloud Console ⬜ Optional
  1. Railway will auto-detect the Express server and deploy — no extra config needed
  2. Go to settings for that project after the deployment done. Scroll down to Networking → click Generate Domain.
  3. Railway will give you a free .up.railway.app URL. It will automatically used for the shortened link as well.
  4. Done — your private instance is live

Note 1: The SQLite database is created automatically on first run and persists on Railway's volume storage.

Note 2: VERY IMPORTANT - the railway free trial will be valid for 30 days only. Later you will need credit to continue. Or you can use other providers for deployment as you wish.

🔮 Future Improvements

  • A/B traffic routing for links
  • Geo-based analytics
  • Browser extension for quick link shortening
  • Link expiry renewal (one-click extend)
  • AI link health check and dead link detection

About

An intelligent URL shortener that leverages Agentic AI to transform how to manage and share links (includes features like AI Assistant, Realtime Site Preview, Bulk URLs Shortener, Share via Mail/WhatsApp/X or native device share sheet, QR Generation, Click Analytics Visualization, Rate Limiter, Malicious URL Detection etc)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages