100% Serverless on Cloudflare

GreenShort (GS)

Self-hosted URL shortener & link-hub manager. No servers, no external databases, and zero maintenance overhead.

Analytics Dashboard Preview

What is GreenShort?

GreenShort is a comprehensive URL shortener featuring a complete admin dashboard, built to be deployed in minutes entirely within your Cloudflare account. It lets you create short links, design link-in-bio style hubs, monitor detailed click analytics, and protect access via passwords or custom captchasโ€”all without relying on third-party services or paying monthly subscriptions.

What does it use?

Cloudflare Pages Static frontend & Edge global hosting
Cloudflare D1 Serverless native SQL database
Workers AI Contextual slug suggestions (Kimi K2.5)
Analytics Engine Real-time click telemetry & traffic tracking

How does it work?

1

Catch-All Edge Worker

Runs as a single Cloudflare Pages project where a catch-all Worker intercepts every incoming HTTP request.

2

D1 Database Lookup & Rule Verification

The Worker checks D1 to match the slug. If found, it validates configured rules: password verification, HMAC-signed captcha, expiration checks, and splat path handling.

3

Instant Redirection & Analytics

Visitors are redirected seamlessly while interaction metadata (country, user agent, referrer, IP, timestamp) is logged asynchronously via Analytics Engine.

4

Static Fallback

If the path does not match any short link, reserved routes serve static assets and UI files without intercepting traffic (/gs for the dashboard, /gs-files for assets).

Links Dashboard Preview

Key Features

๐Ÿค– AI-Generated Slugs

Uses Workers AI to inspect the target page title and metadata to recommend concise, descriptive, and relevant slugs.

๐ŸŒณ Link Hubs (Link-in-bio)

Craft clean landing pages grouping multiple buttons, bio descriptions, and custom palettes for social media bios.

๐Ÿ›ก๏ธ Built-in HMAC Captcha

Native visual challenges validated via secure cookies, completely independent of Google reCAPTCHA or external trackers.

๐Ÿ”’ Password Protection

Secure confidential destinations with server-side password verification before redirecting visitors.

โณ Scheduled Expiration

Set links to expire after minutes, hours, or days. Once expired, links immediately stop resolving.

๐Ÿ“ฑ QR Code Generation

Instantly generate QR codes for any created short link with just a couple of clicks directly from your panel.

๐ŸŒ Multi-Language Dashboard

Admin interface localized in English, Spanish, Russian, Simplified Chinese, and Traditional Chinese with dark theme.

๐Ÿ“Š Real-Time Analytics

Detailed click stream visualizations and live D1 database storage tracking directly in the header.

Quick Deployment

  1. Fork or clone the repository to a new project in Cloudflare Pages.
  2. Create and bind a D1 database as DB.
  3. Set up an Analytics Engine dataset bound as ANALYTICS.
  4. Bind Workers AI as AI.
  5. Configure the required environment variables: SITE_TOKEN, CF_ACCOUNT_ID, CF_D1_ID, and CF_API_TOKEN.
  6. Deploy: D1 database migrations run automatically on the first request. Visit /gs/dashboard to log in.