跳到正文

Sink

维护中
miantiao-me/Sink

简单、快速、安全并带有访问统计的短链接服务,100% 运行在 Cloudflare 上。

在 GitHub 查看
星标
6892
Fork
4850
关注
6892
未关闭 Issue
20

该介绍目前仅提供英文版本。

Sink

Sink is a modern, serverless URL shortener built entirely on Cloudflare’s infrastructure. It provides fast, secure link shortening with built-in analytics capabilities.

Core Features

  • URL Shortening: Create short, memorable links
  • Analytics Dashboard: Track link performance and visitor data
  • Custom Slugs: Create personalized short URLs
  • AI-Powered: Generate smart slugs using AI
  • Link Expiration: Set expiration dates for temporary links
  • Serverless Architecture: 100% Cloudflare-based
  • Real-time Analytics: Monitor link performance in real-time
  • Secure: Built-in security features and HTTPS support
  • Customizable: Tailor the service to your needs
  • Multi-language Support: Internationalization ready

Quick Start

  1. Access the Platform: Visit Sink.Cool

  2. Demo Access:

    • Use Site Token: SinkCool
    • Explore the analytics dashboard
    • Test link creation

Key Benefits

  • Speed: Lightning-fast link redirection
  • Security: Built on Cloudflare’s secure infrastructure
  • Analytics: Comprehensive link performance tracking
  • Serverless: No server maintenance required
  • Scalable: Handles high traffic with ease
  • Free: Open source with no hidden costs

Technical Stack

  • Framework: Nuxt.js
  • Database: Cloudflare Workers KV
  • Analytics: Cloudflare Workers Analytics Engine
  • UI Components: shadcn-vue
  • Styling: Tailwind CSS
  • Deployment: Cloudflare Pages
  • AI Integration: Cloudflare Workers AI

Usage Guide

  1. Link Creation:

    # Create a new short link
    POST /api/links
    {
      "url": "https://example.com",
      "slug": "optional-custom-slug"
    }
  2. Analytics Access:

    # View link analytics
    GET /api/analytics/{slug}
  3. Link Management:

    # Update link settings
    PUT /api/links/{slug}
    {
      "expiresAt": "2024-12-31"
    }

Development

  1. Requirements:

    # Node.js environment
    # Cloudflare account
    # pnpm package manager
  2. Installation:

    git clone https://github.com/ccbikai/Sink.git
    cd Sink
    pnpm install
  3. Configuration:

    # Copy environment variables
    cp .env.example .env
    # Configure your settings
  4. Development Server:

    pnpm dev

Deployment

  1. Cloudflare Setup:

    • Create a Cloudflare Pages project
    • Configure environment variables
    • Set up KV namespace
    • Enable Analytics Engine
    • Configure Workers AI (optional)
  2. Environment Variables:

    NUXT_SITE_TOKEN=your-secure-token
    NUXT_CF_ACCOUNT_ID=your-account-id
    NUXT_CF_API_TOKEN=your-api-token

Contributing

We welcome contributions in various forms:

  • Feature development
  • Bug fixes
  • Documentation improvements
  • UI/UX enhancements
  • Performance optimization

Please read our Contributing Guide before submitting changes.

Support

  • Documentation: Official Docs
  • Issues: Report on GitHub
  • Community: Join our discussions

License

This project is licensed under the AGPL-3.0 License - see the LICENSE file for details.


Made with ❤️ by ccbikai

按共同分类和标签排序的同类开源项目。

全部工具项目 →