Repolode
dubinc

dubinc/dub

Open-source link attribution platform for short links, conversion tracking, and affiliate programs, built with Next.js and TypeScript.

Open-source alternative to:BitlyRebrandly

Stars
24,915
Forks
3,333
Open issues
113
Last commit
10 hours ago

What is it?

Dub is a link attribution platform for marketing teams. It combines short links with click and conversion tracking, so teams can see which links drive signups or sales. It also includes an affiliate program module for managing partners and their referral links.

The project is built with Next.js, TypeScript, and Tailwind CSS. Data is stored in MySQL through Prisma, with Upstash Redis for caching and Tinybird for analytics. Authentication uses NextAuth.js, payments use Stripe, and email is sent through Resend.

The core is licensed under AGPLv3, and enterprise features in the /ee directory fall under a commercial license. The repository includes a self-hosting guide and a local development setup with a seed script.

Key features

  • 01Creates short links and tracks clicks and conversions.
  • 02Provides an affiliate program module for managing partners and referral links.
  • 03Stores data in MySQL via Prisma ORM.
  • 04Uses Upstash Redis for caching and Tinybird for analytics.
  • 05Can be self-hosted, with a guide in the project docs.

Use cases

  • Tracking which marketing campaign links lead to signups or purchases.
  • Running an affiliate or partner program with referral links.
  • Self-hosting a link management platform to keep data under your control.

Quick start

  1. 1

    Follow the local development guide to set up your environment

  2. 2

    Use the recommended Node v23.11.0 and pnpm 9.15.9

  3. 3

    Install dependencies

    pnpm install
  4. 4

    Build the project

    pnpm build

Things to know

  • The license is mixed: the core is AGPLv3, while the /ee enterprise directory requires a commercial license.
  • It depends on many external services such as PlanetScale, Upstash, Tinybird, Stripe and Resend, so self-hosting takes setup effort.
  • The README's local setup relies on linking to an external development guide rather than giving full steps inline.

Topics

FAQ

What is dub?
Open-source link attribution platform for short links, conversion tracking, and affiliate programs, built with Next.js and TypeScript. Dub is a link attribution platform for marketing teams. It combines short links with click and conversion tracking, so teams can see which links drive signups or sales. It also includes an affiliate program module for managing partners and their referral links.
Is dub free to use? What license does it have?
dub is open source under the Other license. Check the license terms before using it in commercial products.
Is dub still maintained?
Actively maintained. The last commit to dub was on Oct 19, 2026.
What can I use dub for?
Tracking which marketing campaign links lead to signups or purchases. Running an affiliate or partner program with referral links. Self-hosting a link management platform to keep data under your control.
How do I install dub?
Follow the local development guide to set up your environment Use the recommended Node v23.11.0 and pnpm 9.15.9 Install dependencies: pnpm install Build the project: pnpm build
Where can I get dub?
The source code and installation instructions are on GitHub: https://github.com/dubinc/dub

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects