Code Monkey home page Code Monkey logo

dub's Introduction

Dub.co Product Hunt Launch Dub.co is the open-source link management infrastructure for modern marketing teams.

Dub.co

The open-source Bitly successor.
Learn more »

Introduction · Features · Tech Stack · Self-hosting · Contributing

Twitter Hacker News License


Introduction

Dub.co is the open-source link management infrastructure for modern marketing teams.

Features

Tech Stack

Self-Hosting

You can self-host Dub.co for greater control over your data and design. Read this guide to learn more.

Contributing

We love our contributors! Here's how you can contribute:

Repo Activity

Dub.co repo activity – generated by Axiom

License

Inspired by Plausible, Dub is open-source under the GNU Affero General Public License Version 3 (AGPLv3) or any later version. You can find it here.

dub's People

Contributors

aakash2330 avatar ahmod001 avatar anirbanpaulcom avatar chronark avatar crnsh avatar desyed avatar devkiran avatar flornkm avatar fmerian avatar itsmingjie avatar jparkrr avatar matthewstanciu avatar matytyma avatar max-programming avatar msmps avatar snazzah avatar steven-tey avatar styfle avatar tomheaton avatar twilson023 avatar unrenamed avatar usmandev09 avatar vahnag avatar versecafe avatar vinaykulk621 avatar vishalmcf avatar wandersonalwes avatar wdhdev avatar ynbh avatar zlwaterfield 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  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

dub's Issues

Stats page is `undefined` on "My Dub.sh Links" page

Problem

Just noticed that when I hover over the stats button the link has undefined in it.

image

Cause

In this code, the href has slug in it which is only available in Projects and not in normal dub.sh links. That's why there is no stats page for normal links and still it shows
image

Unable to store user session while development.

Hello, I did the local setup and while testing it locally I noticed that I was not able to store the user session

What actually occurred?

  1. I get a magic link like this when I sign up or log in.
  2. Once I get it, I click on it and it redirects me to localhost:3000 where I can access the dashboard.
  3. When I click on it, it takes me to app.dub.sh 🤔
  4. I am again prompted to log in / sign in if I go straight to the app.localhost:3000.

image

image

Copy button in QR Code

It would be nice if there is a copy button in the QR Code modal with the download buttons
image

[feature suggestion] wizard to create multiple links targeting same url

as a marketer, I sometimes want to generate multiple links for a campaign targeting a single page, but across different platform.

Instead of having to use the new link form n times I'd rather select my platforms in a multi select and fill the target url in a second step. That would in turn create n links.

Track languages with Accept-Language header

Not too sure if this is an idea worth exploring, but services like Rebrandly have a field for languages, probably from parsing the Accept-Language header. Would this be a good idea to include in link stats?

Redirection for the root domain

Hey Steven,

I'm switching from another provider and it seems I cannot give a redirect to the root domain I added. Currently it redirects to dub page. I wanted to redirect to another website. Is it possible?

I tried with blank & / but didn't work.

[Feature]: QR code for each link

I don't know why I thought about this but the ability to have like a QR code for each link will help somehow
also, happy to contribute in this if you like idea :D

Sign up isn't sending an email

Hiya, apologies if this isn't the right place for this.

I'm trying to sign up on the app.dub.sh/register page, but I'm not receiving an email despite seeing the "Email sent" message.
image

I've tried to sign up with two different emails, one @outlook.com and one with a custom domain, and neither have worked. I tried this yesterday as well as today, and still not received any email.

[feature suggestion] ability to filter by one of the link params

As a marketer, I may need to build multiple links for the same target.

Would be good to be able to quickly identify all links targeting the same url (and get analytics on this group).

Same applies for a specific campaign or possibly one of the other fields available.

BlurImage is too big + reduce screen real estate for link cards

blur is too big and bugs here and there, as you can see in the second link’s image

CleanShot 2022-10-15 at 20 57 32

also, wouldn’t it be better to add like a dropdown with cats instead of these big buttons? i know those have a confirmation modal, but maybe for a user who has lots of links it’s easier to browse through them by removing that space

h/t to @smonolo for the feedback!

Error during Vercel setup of Dub

[02:38:17.390] Cloning github.com/dillfrescott/dub (Branch: main, Commit: 9f2b61a)
[02:38:17.696] Previous build cache not available
[02:38:18.033] Cloning completed: 643.037ms
[02:38:18.650] Not using Build Cache
[02:38:18.704] Running "vercel build"
[02:38:19.359] Vercel CLI 28.4.14
[02:38:19.815] Installing dependencies...
[02:38:20.249] yarn install v1.22.17
[02:38:20.349] [1/4] Resolving packages...
[02:38:20.805] [2/4] Fetching packages...
[02:39:00.414] warning [email protected]: The engine "pnpm" appears to be invalid.
[02:39:00.420] [3/4] Linking dependencies...
[02:39:00.442] warning " > [email protected]" has unmet peer dependency "prop-types@^15.8.1".
[02:39:00.445] warning "mailing > mjml-react > [email protected]" has incorrect peer dependency "react@^17.0.2".
[02:39:00.448] warning "react-hot-toast > [email protected]" has unmet peer dependency "csstype@^3.0.10".
[02:39:00.449] warning "react-spring > @react-spring/[email protected]" has unmet peer dependency "konva@>=2.6".
[02:39:00.449] warning "react-spring > @react-spring/[email protected]" has unmet peer dependency "react-konva@^16.8.0 || ^17.0.0".
[02:39:00.450] warning "react-spring > @react-spring/[email protected]" has unmet peer dependency "react-native@>=0.58".
[02:39:00.450] warning "react-spring > @react-spring/[email protected]" has unmet peer dependency "@react-three/fiber@>=6.0".
[02:39:00.451] warning "react-spring > @react-spring/[email protected]" has unmet peer dependency "three@>=0.126".
[02:39:00.452] warning "react-spring > @react-spring/[email protected]" has unmet peer dependency "react-zdog@>=1.0".
[02:39:00.452] warning "react-spring > @react-spring/[email protected]" has unmet peer dependency "zdog@>=1.0".
[02:39:00.479] warning Workspaces can only be enabled in private projects.
[02:39:13.571] [4/4] Building fresh packages...
[02:39:23.852] $ prisma generate || true
[02:39:26.293] Prisma schema loaded from prisma/schema.prisma
[02:39:27.806] 
[02:39:27.807] ✔ Generated Prisma Client (4.3.1 | library) to ./node_modules/@prisma/client in 240ms
[02:39:27.807] You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
[02:39:27.807] ```
[02:39:27.807] import { PrismaClient } from '@prisma/client'
[02:39:27.807] const prisma = new PrismaClient()
[02:39:27.807] ```
[02:39:27.903] Done in 67.66s.
[02:39:27.942] Detected Next.js version: 12.3.1
[02:39:27.944] Running "yarn run build"
[02:39:28.295] yarn run v1.22.17
[02:39:28.344] $ prisma generate
[02:39:30.736] Prisma schema loaded from prisma/schema.prisma
[02:39:32.228] 
[02:39:32.228] ✔ Generated Prisma Client (4.3.1 | library) to ./node_modules/@prisma/client in 238ms
[02:39:32.228] You can now start using Prisma Client in your code. Reference: https://pris.ly/d/client
[02:39:32.228] ```
[02:39:32.229] import { PrismaClient } from '@prisma/client'
[02:39:32.229] const prisma = new PrismaClient()
[02:39:32.229] ```
[02:39:32.395] ┌─────────────────────────────────────────────────────────┐
[02:39:32.396] │  Update available 4.3.1 -> 4.5.0                        │
[02:39:32.396] │  Run the following to update                            │
[02:39:32.396] │    yarn add --dev prisma@latest                         │
[02:39:32.396] │    yarn add @prisma/client@latest                       │
[02:39:32.396] └─────────────────────────────────────────────────────────┘
[02:39:32.414] $ next build
[02:39:32.778] info  - Loaded env from /vercel/path0/.env.production
[02:39:32.966] Attention: Next.js now collects completely anonymous telemetry regarding usage.
[02:39:32.967] This information is used to shape Next.js' roadmap and prioritize features.
[02:39:32.967] You can learn more, including how to opt-out if you'd not like to participate in this anonymous program, by visiting the following URL:
[02:39:32.967] https://nextjs.org/telemetry
[02:39:32.967] 
[02:39:33.106] info  - Linting and checking validity of types...
[02:39:47.011] info  - Creating an optimized production build...
[02:39:47.065] warn  - You are using an experimental edge runtime, the API might change.
[02:40:27.885] info  - Compiled successfully
[02:40:27.885] info  - Collecting page data...
[02:40:32.623] info  - Generating static pages (0/17)
[02:40:32.729] info  - Generating static pages (4/17)
[02:40:32.769] info  - Generating static pages (8/17)
[02:40:32.807] info  - Generating static pages (12/17)
[02:40:32.891] 
[02:40:32.892] Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
[02:40:32.892] Error: 
[02:40:32.892] Invalid `prisma.user.count()` invocation:
[02:40:32.892] 
[02:40:32.893] 
[02:40:32.893] The table `(not available)` does not exist in the current database.
[02:40:32.893]     at RequestHandler.handleRequestError (/vercel/path0/node_modules/@prisma/client/runtime/index.js:29909:13)
[02:40:32.893]     at RequestHandler.request (/vercel/path0/node_modules/@prisma/client/runtime/index.js:29892:12)
[02:40:32.893]     at async PrismaClient._request (/vercel/path0/node_modules/@prisma/client/runtime/index.js:30864:16)
[02:40:32.893]     at async getStaticProps (/vercel/path0/.next/server/pages/index.js:2287:23)
[02:40:32.894]     at async renderToHTML (/vercel/path0/node_modules/next/dist/server/render.js:386:20)
[02:40:32.894]     at async /vercel/path0/node_modules/next/dist/export/worker.js:304:36
[02:40:32.894]     at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
[02:40:32.894] info  - Generating static pages (17/17)
[02:40:32.895] 
[02:40:32.895] > Build error occurred
[02:40:32.898] Error: Export encountered errors on following paths:
[02:40:32.898] 	/
[02:40:32.899]     at /vercel/path0/node_modules/next/dist/export/index.js:404:19
[02:40:32.899]     at runMicrotasks (<anonymous>)
[02:40:32.899]     at processTicksAndRejections (node:internal/process/task_queues:96:5)
[02:40:32.900]     at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
[02:40:32.900]     at async /vercel/path0/node_modules/next/dist/build/index.js:1229:21
[02:40:32.900]     at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
[02:40:32.900]     at async /vercel/path0/node_modules/next/dist/build/index.js:1091:17
[02:40:32.901]     at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
[02:40:32.901]     at async Object.build [as default] (/vercel/path0/node_modules/next/dist/build/index.js:65:29)
[02:40:32.960] error Command failed with exit code 1.
[02:40:32.960] info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
[02:40:32.985] Error: Command "yarn run build" exited with 1

Deeplink Functionality

Wish there is a Deeplink functionality. Like if I open this link in Facebook In-App browser or something it should open in the device's default browser or the respective app if it's already installed.

Credits to @mcnaveen for the brilliant idea

OIDC/SAML support

Can we use OIDC or SAML to connect our company's IAM directory to dub?

GDPR compliance

It seems like this project has a custom stats solution.
Is it GDPR compliant by default and if not could it potentially be made compliant?

Also I would suggest adding information about GDPR compliance in the README and/or on dub.sh.

Why there are 2 lock files?

This repo has package-lock.json and yarn.lock,
we recommend you have only one, and I recommend using yarn.lock and removing package-lock.json.

But I don't know if there is any reason behind it.

Issues with short linking twitter profiles/tweets

Good day to you all here,

There seems to be an issue when linking to twitter, it produces a "Too Many Redirects" error when using the non-self-hosted version of Dub.

My "setup" is using a custom domain which uses Cloudflare for DNS/protection

Thing's I've tried:

  • Disable caching in Cloudflare - didn't work
  • Disabling Cloudflare completely - didn't work
  • Change domains in Dub - didn't work
  • Check if twitter can even be short linked using another service(bit.ly) - it works there

padding and cursor issues on modals and tooltips

I feel like the text saying "dub.sh/github" could maybe use some margin/padding? It looks extremely weird, and kind of makes the whole spacing uneven.

image

Furthermore, @steven-tey, on tooltips -- what do you think about making the cursor change to pointer on hover? From what I can see, most tooltips implement this behaviour. It could be more user friendly(?). LMK, I'll be happy to work on a PR for this!

Greetings Never Received

image

hey @steven-tey I was setting dub on my local machine everything worked fine but this isn't whenever I try to Sign Up it gives me this error.
can you please help me with this?

[FEATURE] Export data to CSV

Ability to export all analytics from the links in a specific project in CSV format would be nice for preparing reports or sharing data with other team members.

Laggy website

The website dub.sh is extremely slow and sluggish, I can't scroll well at all and it gives a really unresponsive design. I have tested this on multiple devices and should probably get fixed, whether that means moving to a faster framework such as qwik or not

Dark mode feature

This project is super cool, and I started using it instead of bitly. Honestly, it's faster and has better UX!

It would be great if it has a dark mode feature and a toggle for that.

I would be happy to take that challenge to implement the dark mode feature

Create password-protected links

It would be nice if there was an option to password-protect my link.
As soon as the user clicks on the link, he is redirected to a page where he is asked to enter a password.
Once he confirms the password, he is redirected to the original link.

Error serializing `.stars` returned from `getStaticProps` in "/".

Getting this error after trying to deploy to Vercel.

Error occurred prerendering page "/". Read more: https://nextjs.org/docs/messages/prerender-error
--
19:56:08.857 | Error: Error serializing `.stars` returned from `getStaticProps` in "/".
19:56:08.857 | Reason: `undefined` cannot be serialized as JSON. Please use `null` or omit this value.
19:56:08.857 | at isSerializable (/vercel/path0/node_modules/next/dist/lib/is-serializable-props.js:36:19)
19:56:08.857 | at /vercel/path0/node_modules/next/dist/lib/is-serializable-props.js:43:66
19:56:08.858 | at Array.every (<anonymous>)
19:56:08.858 | at isSerializable (/vercel/path0/node_modules/next/dist/lib/is-serializable-props.js:40:39)
19:56:08.859 | at Object.isSerializableProps (/vercel/path0/node_modules/next/dist/lib/is-serializable-props.js:63:12)
19:56:08.859 | at renderToHTML (/vercel/path0/node_modules/next/dist/server/render.js:441:93)
19:56:08.859 | at processTicksAndRejections (node:internal/process/task_queues:96:5)
19:56:08.859 | at async /vercel/path0/node_modules/next/dist/export/worker.js:304:36
19:56:08.859 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
19:56:08.860 |  
19:56:08.860 | > Build error occurred
19:56:08.860 | info  - Generating static pages (16/16)
19:56:08.863 | Error: Export encountered errors on following paths:
19:56:08.863 | /
19:56:08.863 | at /vercel/path0/node_modules/next/dist/export/index.js:404:19
19:56:08.863 | at runMicrotasks (<anonymous>)
19:56:08.864 | at processTicksAndRejections (node:internal/process/task_queues:96:5)
19:56:08.864 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
19:56:08.864 | at async /vercel/path0/node_modules/next/dist/build/index.js:1229:21
19:56:08.864 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
19:56:08.864 | at async /vercel/path0/node_modules/next/dist/build/index.js:1091:17
19:56:08.865 | at async Span.traceAsyncFn (/vercel/path0/node_modules/next/dist/trace/trace.js:79:20)
19:56:08.865 | at async Object.build [as default] (/vercel/path0/node_modules/next/dist/build/index.js:65:29)
19:56:08.905 | error Command failed with exit code 1.
19:56:08.905 | info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
19:56:08.912 | Error: Command "yarn run build" exited with 1

Add prefix to table name

I have a shared database for many services. I hope there will be an option prefix for table name.

`ERR_INVALID_URL` error when running yarn run build locally. I've setup the .env file with all the values correctly

warn  - You are using an experimental edge runtime, the API might change.
info  - Creating an optimized production build
info  - Compiled successfully
info  - Collecting page data ..TypeError [ERR_INVALID_URL]: Invalid URL
    at new NodeError (node:internal/errors:372:5)
    at URL.onParseError (node:internal/url:553:9)
    at new URL (node:internal/url:629:5)
    at parseUrl (/Users/test/dub.sh/node_modules/next-auth/utils/parse-url.js:17:16)
    at Object.<anonymous> (/Users/dub.sh/node_modules/next-auth/react/index.js:70:34)
    at Module._compile (node:internal/modules/cjs/loader:1105:14)
    at Object.Module._extensions..js (node:internal/modules/cjs/loader:1159:10)
    at Module.load (node:internal/modules/cjs/loader:981:32)
    at Function.Module._load (node:internal/modules/cjs/loader:822:12)
    at Module.require (node:internal/modules/cjs/loader:1005:19) {
  input: '',
  code: 'ERR_INVALID_URL'
}

> Build error occurred
Error: Failed to collect page data for /_auth/[domain]/[key]
    at /Users/test/dub.sh/node_modules/next/dist/build/utils.js:916:15
    at processTicksAndRejections (node:internal/process/task_queues:96:5) {
  type: 'Error'
}
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Popup box disappear when you interact with it

Every time I interact with the project creation and popup, it disappears. (Below is a screen recording of what's happening). The browser I'm using is Arc, however I also run into the same problem using Safari. Please let me know if you want anymore information, and I'd be happy to help! :D

Screen.Recording.2022-10-01.at.10.35.39.mov

[feature suggestion] tags

I'd love to be able to add tags to each link so that I could either filter via tags, and even get analytics at tag level.

Curl Support

It is very convenient to use TinyURL via Curl on the command line:

curl -s tinyurl.com/api-create.php?url=<link>

And it would be great if dub has the similar feature! And here are more examples.

[Feature] API support

One of the most useful things I'd find to have in Dub would be the possibility to CRUD links using an API, this way we could automate the creation using tools like Notion and others.

From my perspective, and I'm willing to implement it, is to have a settings page to create an API key that can be used to control the link managing.

Any thoughts about it?

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.