Giter VIP home page Giter VIP logo

ccbikai / sink Goto Github PK

View Code? Open in Web Editor NEW
2.2K 9.0 883.0 2.01 MB

⚡ A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.

Home Page: https://sink.cool

License: GNU Affero General Public License v3.0

Vue 78.17% JavaScript 1.28% TypeScript 19.74% CSS 0.81%
cloudflare link-shortener url-shortener analytics nuxt nuxthub shadcn-ui tailwindcss web-analytics bitly-alternative

sink's Introduction

⚡ Sink

A Simple / Speedy / Secure Link Shortener with Analytics, 100% run on Cloudflare.

ccbikai/Sink | Trendshift Featured on Hacker News

Cloudflare Nuxt Tailwind CSS shadcn/ui

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 for personalized slugs.
  • 🪄 AI Slug: Leverage AI to generate slugs.
  • Link Expiration: Set expiration dates for your links.

🪧 Demo

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

Site Token: SinkCool
Screenshots Analytics Links Link Analytics

🧱 Technologies Used

🚗 Roadmap [WIP]

We welcome your contributions and PRs.

  • Browser Extension
  • Raycast Extension
  • Apple Shortcuts
  • Enhanced Link Management (with Cloudflare D1)
  • Analytics Enhancements (Support for merging filter conditions)
  • Dashboard Performance Optimization (Infinite loading)
  • Units Test
  • Support for Other Deployment Platforms

🏗️ Deployment

  1. Fork the repository to your GitHub account.

  2. Create a Cloudflare Pages project.

  3. Select the Sink repository and the Nuxt.js preset.

  4. Configure environment variables.

    1. NUXT_SITE_TOKEN length must exceed 8.
    2. NUXT_CF_ACCOUNT_ID find your account ID.
    3. NUXT_CF_API_TOKEN Create a Cloudflare API token. This token requires Account.Account Analytics permissions at the very least. Reference..
  5. Save and deploy.

  6. Cancel the deployment, navigate to Settings -> Functions.

    1. KV namespace bindings. Bind the variable name KV to a KV namespace.
    2. Workers AI Bindings. Bind the variable name AI to the Workers AI Catalog. Optional
    3. Analytics Engine bindings. Bind the variable name ANALYTICS to the sink dataset, and enable Cloudflare Analytics Engine beta for your account.
  7. Redeploy.

⚒️ Configuration

Configuration Docs

🔌 API

API Docs

🙋🏻 FAQs

FAQs

💖 Credits

  1. Cloudflare
  2. NuxtHub
  3. Astroship

☕ Sponsor

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

sink's People

Contributors

bradbot1 avatar ccbikai avatar dr-data avatar fqd511 avatar quentinhsu avatar tomcollis avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

sink's Issues

New Approach: Password Manager

Since CF can be used for free and indefinitely, as well as stored, and can also be used to store APIs through reverse git, such a great resource expert can change it into a password manager, encrypt and store passwords, and never lose them for a lifetime. It's much better than setting up a paid one and forgetting to renew it one day, and worrying about poisoning and leakage when storing it locally. Haha, I hope the expert can consider it

4 digits slug via API?

I have been using this project with my domain and it works perfect, it allows me to create shortened links and it's great, just one question, in cloudflare configure the slug to be 4 digits maximum, when using it via UI it works and generates the 4 digits slug, but via API is not like that, is there a way to specify via API that I want the slug to be 4 digits?

Long url constraint in 2048 characters only

I use some hacking in url, make it soooo long and use shortening app to make it shorter to remember.

Example: in smol site, all data of the webpage contain in url only

But your constaint in 2048 characters make it impossible to use this hacking

import

Consider adding an import feature? From Shlink for example.

Thanks!

cant open analitycs

I cannot open Analytics.
The error says "too many requests."
What might be missing?

Duplicate links

Should duplicate links and the same settings be limited to one link, and all future links should be directed to the same short link?

image

[REQUEST] pass params to the target

Hello,

Your project is definitly the best thing that i found on github, amazing performance and very easy to use,

In some cases, I need the shortlink to pass params to the target page for example :

original link :
https://example.com/xxxx/yyyyy/dynamicParam
or
https://example.com/xxxx/yyyyy?param=dynamicParam

Generate shortlink can only redirect to the same static link
if would be great if we can pass a param in the shortlink, something like this :

https://mySinkInstance.com/mySlug/dynamicParam1/dynamicParam2/dynamicParam3

the dynamic params format get preserved as they are and added to the target link

https://targetlink.com/xxxx/yyyyy/dynamicParam1/dynamicParam2/dynamicParam3

I think the easiest way to integrate this, is to extract whatever is written after the slug, and add it to the target URL

traffic surge

After setting this up to test, I got a huge traffic surge to the site. 209,476 requests in a couple hours. So much that I've exceeded the Cloudflare "workers and pages" free plan. The traffic is all from the US, but I can't tell any more about the traffic or what's happening. Could there be a exploit here?

New Approach: Password Manager

Since CF can be used for free and indefinitely, as well as stored, and can also be used to store APIs through reverse git, such a great resource expert can change it into a password manager, encrypt and store passwords, and never lose them for a lifetime. It's much better than setting up a paid one and forgetting to renew it one day, and worrying about poisoning and leakage when storing it locally. Haha, I hope the expert can consider it

[Future request] Dynamic redirect for Android and iOS

Hello, thanks for the great project. To improve it further, I would like to suggest a feature that I think will not take a long time to develop, but will contribute a lot.

Ability to specify separate links for Android, iOS and web. Thus, the user can be directed to different links depending on the device the user entered through a single link.

Good day!

API

not support the api ?
example :
a url request the api then return a shorturl .

【BUG】:No Next.js version could be detected in your project

The latest version of the deployment reports errors. I have used the Nuxt.js as the preset.

this is the error logs:


> [email protected] postinstall /opt/buildhome/repo
--
23:31:18.182 | ▲  > npm run build:map && nuxt prepare
23:31:18.590 | ▲  > [email protected] build:map
23:31:18.590 | ▲  > node scripts/build-map.js
23:31:20.566 | ▲  [info] [nuxt:tailwindcss] Using Tailwind CSS from ~/assets/css/tailwind.css
23:31:21.409 | ▲  [success] Types generated in .nuxt
23:31:21.454 | ▲  Done in 7.3s
23:31:21.508 | ▲  Warning: Could not identify Next.js version, ensure it is defined as a project dependency.
23:31:21.512 | ▲  Error: No Next.js version could be detected in your project. Make sure `"next"` is installed in "dependencies" or "devDependencies"
23:31:21.596 |  
23:31:21.596 | ⚡️ The Vercel build (`npx vercel build`) command failed. For more details see the Vercel logs above.
23:31:21.596 | ⚡️ If you need help solving the issue, refer to the Vercel or Next.js documentation or their repositories.
23:31:21.597 |  
23:31:21.630 | Failed: Error while executing user command. Exited with error code: 1
23:31:21.644 | Failed: build command exited with code: 1
23:31:26.165 | Failed: error occurred while running build command

Documentation "for dummies"?

I think you need to detail more the steps of the implementation in cloudflare, I tried to deploy by myself it seemed that everything worked but it does not work to create the short links, I think I did something wrong, several steps did not come in the documentation.

I think it would be great a “For Dummies” documentation, explaining every little step and detail, even a step by step video how to deploy from scratch.

Analytics

image Is Analytics updated in real time

save link not working

Screenshot from 2024-05-31 14-26-47
I have everything setup and am able to login and see the entire system. But when trying to create a link, on the empty link page, I see a "spinning" icon, and when I try to create the first link, the save button doesn't seem to work.

Login failed, please try again.

如题。我根据 readme 中的内容部署后,第一次登录出现了错误:

image

我检查了所有的配置,没有发现异常。求大佬解惑。

too many request

Hi, I spent all day today installing sink.

I tried to install it on cloudflare but when I get to the dashboard page it throws too many requests, so I reached my cloudflare daily request limit.

I tried to install it on my server, I'm trying to get a build with nuxt but 4gb ram is not enough for that.

When I installed it on my computer it was running fast with npm run dev but when I ran it on my server with npm run dev it was very slow, I had to get a build.

When I was trying to get a build on my Windows computer, I kept getting errors because of nuxthub, so I uninstalled nuxthub.

Note: nuxthub saves the build to dist folder, not .output.

I managed to get the build!!! but again too many requests are thrown in the dashboard, so I'm back to square one.

Note: I've been using react and next.js for 2 years but I've never had as much difficulty as with nuxt, it's very slow and it's a bit hard to resolve bugs.

Ekran görüntüsü 2024-08-09 203307

I tried ubuntu, windows and macos. I will post here if I can solve the too many request problem.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.