Watch
1
0
Fork
You've already forked sink-base
0
mirror of https://github.com/miantiao-me/Sink.git synced 2026-11-17 01:14:50 +00:00
⚡ A Simple, Speedy, Secure, and Serverless Link Shortener with Analytics, Running Entirely on Cloudflare. https://Sink.Cool
  • TypeScript 51.1%
  • Vue 47%
  • JavaScript 1.4%
  • CSS 0.5%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-10-27 13:00:10 +08:00
.github refactor: consolidate issue workflows into single assistant 2026-02-11 19:27:09 +08:00
.vscode feat: Add internationalization (i18n) support 2025-03-03 11:21:39 +08:00
app refactor(proxy): simplify proxy mode and use public runtime config 2026-09-26 19:18:39 +08:00
docs feat: add configurable expired link cleanup 2026-10-27 13:00:10 +08:00
drizzle fix: add missing newline at end of 0004_snapshot.json 2026-09-26 19:40:30 +08:00
i18n refactor: harden proxy and align API contracts 2026-09-26 11:17:23 +08:00
public feat: update world map generation and add GeoJSON output 2026-07-15 12:35:26 +08:00
scripts refactor: extract link counters and import composables, improve accessibility, and remove legacy query support 2026-07-18 17:41:07 +08:00
server feat: add configurable expired link cleanup 2026-10-27 13:00:10 +08:00
shared feat(mcp): add check_links and get_analytics_heatmap tools 2026-09-26 20:45:12 +08:00
skills/sink refactor: harden proxy and align API contracts 2026-09-26 11:17:23 +08:00
tests feat: add configurable expired link cleanup 2026-10-27 13:00:10 +08:00
.editorconfig feat: init 2024-05-25 08:09:30 +08:00
.env.example feat: add configurable expired link cleanup 2026-10-27 13:00:10 +08:00
.gitignore feat: implement D1 migration for link storage 2026-07-13 21:07:58 +08:00
.mcp.json refactor: Refactor by Opus 2026-01-09 20:15:19 +08:00
.node-version feat: upgrade Node.js requirement to version 24 and update relevant documentation 2026-09-15 19:43:50 +08:00
AGENTS.md feat: upgrade Node.js requirement to version 24 and update relevant documentation 2026-09-15 19:43:50 +08:00
CLAUDE.md chore: remove AGENT.md and update references to AGENTS.md 2025-11-15 15:21:20 +08:00
CODE_OF_CONDUCT.md feat: add Contributor Covenant Code of Conduct 2024-10-18 12:04:06 +08:00
components.json feat(ui): add message and popover components 2026-07-12 19:32:34 +08:00
DESIGN.md feat: enhance dashboard UX with skeleton loading, search improvements, and success color theme 2026-07-18 11:26:12 +08:00
drizzle.config.ts feat: implement link migration functionality with D1 integration 2026-07-12 00:33:32 +08:00
eslint.config.mjs feat: add automatic daily KV backup to R2 storage 2026-01-18 16:52:06 +08:00
LICENSE feat: init 2024-05-25 08:09:30 +08:00
nuxt.config.ts feat: add configurable expired link cleanup 2026-10-27 13:00:10 +08:00
package.json 0.3.1 2026-09-27 12:05:44 +08:00
pnpm-lock.yaml refactor(mcp): collapse routes and rely on the SDK stateless fallback 2026-09-22 13:45:47 +08:00
pnpm-workspace.yaml chore: Code optimization 2026-07-13 19:35:50 +08:00
README.md refactor(mcp): upgrade to the split v2 SDK packages 2026-09-22 13:14:04 +08:00
renovate.json feat: init 2024-05-25 08:09:30 +08:00
skills-lock.json feat: Update .gitignore to include skills directory and modify nuxt.config.ts for Cloudflare Pages compatibility 2026-07-13 19:13:25 +08:00
tsconfig.json refactor: move type definitions to schema files 2026-02-03 12:14:15 +08:00
vitest.config.ts feat: implement link migration functionality with D1 integration 2026-07-12 00:33:32 +08:00
worker-configuration.d.ts refactor(proxy): simplify proxy mode and use public runtime config 2026-09-26 19:18:39 +08:00
wrangler.jsonc feat: update world map generation and add GeoJSON output 2026-07-15 12:35:26 +08:00

⚡ Sink

A Simple, Speedy, Secure, and Serverless Link Shortener with Analytics, Running Entirely on Cloudflare.

Website · Documentation · API Reference

miantiao-me/Sink | Trendshift Featured on Hacker News Featured|HelloGitHub Uneed Badge

DeepWiki Cloudflare Nuxt Tailwind CSS shadcn/ui License

Hero


✨ Features

  • 🔗 URL Shortening: Compress your URLs to their minimal length.
  • 📈 Analytics: Monitor link analytics and gather insightful statistics.
  • ☁️ Serverless: Deploy without the need for traditional servers.
  • 🎨 Customizable Slug: Support personalized slugs, UTM parameters, and optional case-sensitive slug matching through configuration.
  • 🪄 AI Assistance: Optionally use Cloudflare Workers AI to generate slugs and OpenGraph metadata from page content.
  • ⏰ Link Control: Set expirations, passwords, and unsafe-link warning pages.
  • 📱 Smart Routing: Redirect visitors by device or country.
  • 🖼️ Social Preview: Customize social previews with titles, descriptions, and images.
  • 📊 Near-real-time Analytics: Display a live 3D globe and event logs using 10-second analytics polling and client-side replay, not SSE or WebSocket.
  • 🔲 QR Code: Generate QR codes for your short links.
  • 📦 Import/Export: Transfer links via JSON and export access analytics via CSV.
  • 🌍 Multi-language: Full i18n support for dashboard and redirect pages.

Tip

Who is Sink for?

Sink focuses on individuals and small teams who want a simple, self-hosted shortener on Cloudflare.

For professional / business needs (managed service, multi-user, SLA, and more), use S.EE.

🪧 Demo

Experience the demo at Sink.Cool. Log in using the Site Token below:

Site Token: SinkCool
Screenshots Analytics Links Link Analytics

🔀 Sibling versions

Sink and Slite are sibling versions of the same link-management and analytics project. Sink runs on Cloudflare's serverless platform, while Slite runs as a local Node.js 24+/Docker process. They keep features, API contracts, and file organization compatible with each other wherever practical. Neither version is a legacy branch, and Slite is not a fork replacement for Sink.

🧱 Technologies Used

🚗 Roadmap [WIP]

We welcome your contributions and PRs.

  • Browser Extension - Sink Tool
  • Chrome Extension - Sink Quick Shorten
  • Raycast Extension - Raycast-Sink
  • Apple Shortcuts - Sink Shortcuts
  • iOS App - Sink
  • Enhanced Link Management (with Cloudflare D1)
  • Analytics Enhancements (Multi-link filtering)
  • Dashboard Performance Optimization (Infinite loading)
  • API, migration, backup, and redirect tests

🏗️ Deployment

Video tutorial: Watch here

We currently support deployment to Cloudflare Workers (recommended) and Cloudflare Pages (deprecated).

⚒️ Configuration

Configuration Docs

🔌 API

API Docs · Live Scalar Reference for the public demo instance

🤖 AI Skills

Install Sink AI Skills for enhanced coding assistance:

npx skills add miantiao-me/sink

🧰 MCP

Sink serves a built-in MCP endpoint at POST /api/mcp, using the official @modelcontextprotocol/server SDK v2, serving modern clients over the per-request transport and 2025-era clients over a stateless fallback with JSON responses.

Replace the domain below with your own instance, and use the NUXT_SITE_TOKEN from your instance's environment variables as the bearer token.

claude mcp add --transport http sink https://sink.cool/api/mcp --header "Authorization: Bearer SinkCool"

Any client that supports an HTTP transport with custom headers can connect the same way:

{
  "mcpServers": {
    "sink": {
      "type": "http",
      "url": "https://sink.cool/api/mcp",
      "headers": {
        "Authorization": "Bearer SinkCool"
      }
    }
  }
}

It exposes tools for managing links (list, search, read, count, tag, create, update, upsert, delete) and for reading analytics (counters, views over time, and top values per dimension). See the integrations documentation for the full list.

🙋🏻 FAQs

FAQs

💖 Credits

  1. Cloudflare
  2. NuxtHub
  3. Astroship
  4. Tailark

📄 License

AGPL-3.0-only © miantiao-me

☕ Sponsor

  1. Follow Me on X (Twitter).
  2. Become a sponsor on GitHub.