Sink is a serverless link shortener that compresses long URLs into clean, custom slugs while providing real-time analytics and smart redirection features — all running entirely on Cloudflare’s edge network. It’s designed for developers, marketers, and content creators who need to track link performance without managing servers or paying for infrastructure.
Built with Nuxt, Tailwind CSS, and shadcn-vue, Sink leverages Cloudflare Workers for routing, Workers KV for storage, and Analytics Engine for real-time data. It supports deployment via Cloudflare Workers or Pages, offers a full REST API, and integrates with browser extensions and mobile apps for seamless link creation on the go.
What You Get
- 🔗 URL Shortening - Generate compact, custom slugs for any URL with support for case-sensitive and personalized paths.
- 📈 Real-time Analytics - Track clicks, referrers, and geographic data using Cloudflare Analytics Engine with live 3D globe visualizations.
- ☁️ Serverless Architecture - No servers to manage; everything runs on Cloudflare Workers with automatic scaling and global edge delivery.
- 🪄 AI Slug Generation - Automatically generate optimized slugs and OpenGraph metadata from page content using integrated AI tools.
- ⏰ Link Control - Set expiration dates, password protection, and unsafe-link warnings for enhanced security and compliance.
- 📱 Smart Routing - Redirect users based on device type (mobile/desktop) or geographic location with built-in geo-targeting.
- 🖼️ Social Preview Customization - Define custom titles, descriptions, and images for social media shares via OpenGraph tags.
- 🔲 QR Code Generation - Automatically generate QR codes for every short link to enable offline sharing and scanning.
- 📦 Import/Export - Bulk import links via JSON and export analytics data as CSV for reporting and migration.
- 🌍 Multi-language Support - Full i18n for both dashboard and redirect pages, supporting multiple languages out of the box.
- 📱 Mobile & Browser Extensions - Use official Chrome, iOS, and Raycast extensions to shorten links directly from your browser or phone.
- 🔄 API & Migration Tools - Full REST API for programmatic link management, with built-in backup, restore, and migration endpoints.
Common Use Cases
- Running a marketing campaign - A digital marketer uses Sink to shorten campaign URLs, track click-through rates by region, and set up geo-targeted redirects to localized landing pages.
- Sharing research links in academic papers - A researcher generates custom, memorable short links for references, embeds QR codes in printed materials, and tracks how often each link is accessed.
- Managing affiliate links - An affiliate marketer uses Sink to shorten and anonymize long affiliate URLs, apply password protection to sensitive links, and monitor performance via real-time analytics.
- Building a personal brand with content - A tech blogger uses Sink to create branded short links for blog posts, customizes social previews, and monitors which links drive the most traffic from Twitter and LinkedIn.
Under The Hood
Architecture
- The codebase exhibits a clear separation of concerns, organizing functionality into distinct directories for components, utilities, composables, and configuration.
- A modular design is evident, particularly within the UI component structure, promoting reusability and maintainability.
- Component wrappers are extensively used to adapt and extend existing UI libraries, adding custom functionality and styling.
- The use of composables suggests a reactive and modular approach to state management.
Tech Stack
- Built on a modern web stack with Vue.js, Next.js, and TypeScript.
- Leverages a component-focused approach with a clear adoption of UI libraries.
- Employs pnpm for package management and Vite for fast development builds.
- Comprehensive testing strategy utilizing Vitest, with a dedicated pool worker configuration for Cloudflare environments.
Code Quality
- Demonstrates a generally well-structured codebase with a strong emphasis on testing and API robustness.
- Comprehensive testing strategy covering unit, integration, and end-to-end tests with a focus on edge cases and error handling.
- Utilizes Zod for schema definition and data validation, promoting type safety.
- Reusable helper functions are provided for API interaction during testing.
What Makes It Unique
- The project’s core innovation lies in its complete reliance on Cloudflare for both functionality and hosting.
- This results in a highly performant and secure link shortening service optimized for serverless environments and edge computing.
- Creative solutions are implemented in components, such as responsive modals and dynamic chart legends.
- Efficient patterns like
useMediaQuery and reactiveOmit are used to enhance the user experience and code maintainability.