Sink is an open-source link shortener with built-in analytics, designed to run entirely on Cloudflare's serverless platform using Nuxt 4.
What is Sink?
Sink is a self-hostable URL shortener that takes long URLs and produces short, trackable links, with a full dashboard for managing links and viewing analytics. It is built with Nuxt 4, styled with Tailwind CSS and shadcn-vue, and runs 100% on Cloudflare: Workers or Pages for the app, D1 as the authoritative database, Workers KV as a read cache, Workers Analytics Engine for event data, and optional R2 for JSON snapshots. The project is maintained on GitHub by miantiao-me and is featured on Hacker News, Trendshift, and HelloGitHub.
Key Features
- URL shortener — Compress URLs to minimal length, with support for personalized slugs, UTM parameters, and optional case-sensitive slug matching.
- Near-real-time analytics — Monitor link traffic on a live 3D globe with event logs, refreshed by 10-second polling and client-side replay (no SSE or WebSocket).
- Link control — Set link expiration dates, passwords, and unsafe-link warning pages to control who can access your links.
- Smart routing — Redirect visitors by device type or country using conditional rules.
- AI assistance — Optionally use Cloudflare Workers AI to auto-generate slugs and OpenGraph metadata from page content.
- QR codes — Generate QR codes for any short link directly from the dashboard.
- Import and export — Transfer links via JSON files and export access analytics as CSV.
- Multi-language — Full i18n support for both the dashboard and redirect pages.
Who is it for?
Sink is designed for individuals and small teams who want a simple, self-hosted link shortener on Cloudflare without managing traditional servers. Developers who are already using Cloudflare can deploy Sink quickly and rely on its API, OpenAPI spec, and MCP support to integrate link shortening into their workflows. Marketers and content creators can use Sink's analytics and QR codes to track campaign performance and printed materials.
What can you do with Sink?
- Indie hackers and developers: Deploy a serverless link shortener on Cloudflare Workers and use the REST API to create and manage short links programmatically, including via the built-in MCP integration.
- Content creators: Shorten links for social media or bio pages, customize slugs for branding, and generate QR codes for offline or printed content.
- Product managers: Use link-level analytics to understand click-through behavior, filter multi-link reports, and export the data as CSV for further analysis.
- Small marketing teams: Route visitors by country or device to different campaigns, and use AI-generated slugs and OpenGraph metadata to speed up link creation.
FAQ
Is Sink free to use?
Sink is open-source and free to self-host; you only pay for the Cloudflare resources you consume (Workers, D1, KV, Analytics Engine). The live demo at Sink.Cool is publicly accessible — log in with the site token "SinkCool".
Does Sink run on Cloudflare Workers?
Yes. Sink is built on Nuxt 4 and deploys to Cloudflare Workers (recommended) or Cloudflare Pages (now deprecated). It uses Cloudflare D1 as the authoritative link store and Workers KV as a write-through read cache.
What analytics does Sink provide?
Sink gives near-real-time link analytics, including a live 3D globe and event logs. Data is refreshed using 10-second polling and client-side replay rather than SSE or WebSocket, and access analytics can be exported to CSV.
Does Sink support custom slugs and passwords?
Yes. You can set personalized slugs, turn on case-sensitive slug matching, append UTM parameters, and set expiration dates, passwords, and warning pages for unsafe links.
Can I generate QR codes with Sink?
Yes, Sink generates QR codes for your short links. It can also use Cloudflare Workers AI to automatically generate slugs and OpenGraph metadata from the page content.
Pros and cons
- Pros: 100% serverless on Cloudflare so there is no infrastructure to maintain; open-source and self-hostable; includes analytics, QR code generation, AI slug suggestion, and multi-language support; has a public demo and extensive docs.
- Cons: Tied to the Cloudflare ecosystem (requires Workers, D1, KV); the Pages deployment route is deprecated in favor of Workers; analytics are near-real-time, updated every 10 seconds rather than instant.
Alternatives
- Bitly — a commercial link-shortening and analytics platform that offers a managed service with its own branding and bulk link management.
- S.EE — a professional managed version of Sink mentioned in the project readme, aimed at businesses needing multi-user support, SLA, and managed hosting.
