explaingit

dubinc/dub

📈 Trending23,558TypeScriptAudience · pm founderComplexity · 4/5ActiveSetup · hard

TLDR

Open-source link management platform that shortens URLs, tracks clicks, and measures conversions for marketing teams and affiliate programs.

Mindmap

mindmap
  root((repo))
    What it does
      Shorten URLs
      Track clicks
      Measure conversions
      Run affiliates
    Use cases
      Marketing campaigns
      Affiliate programs
      Public link sharing
      Conversion tracking
    Tech stack
      TypeScript
      Next.js
      Prisma
      Tinybird
    Deployment
      Self-hosted
      Hosted at dub.co
      Vercel ready

Things people build with this

USE CASE 1

Create branded short links and track how many people click them in real time.

USE CASE 2

Measure which marketing campaigns drive actual customer conversions, not just clicks.

USE CASE 3

Run an affiliate program where partners earn credit for customers they bring in.

USE CASE 4

Self-host a private link management system on your own infrastructure for data control.

Tech stack

TypeScriptNext.jsTailwindPrismaPlanetScaleTinybirdStripeVercel

Getting it running

Difficulty · hard Time to first run · 1day+

Requires PlanetScale MySQL database, Tinybird analytics account, and Stripe integration; multiple external services need configuration.

License could not be detected automatically. Check the repository's LICENSE file before use.

In plain English

Dub is an open-source link management platform, essentially a more powerful version of URL shorteners like Bitly, built for marketing teams. It lets you create short links, track how many people click them, see where those clicks come from, and run affiliate programs where partners earn credit for bringing in customers. The problem it solves is that standard link shorteners give you a short URL but very little data. Dub combines link shortening with detailed analytics and conversion tracking, so a marketing team can see not just how many clicks a link got, but whether those clicks turned into actual customers. It powers over 100 million clicks per month for companies including Twilio, Buffer, and Framer. You would use Dub if you run marketing campaigns, share links publicly, or manage an affiliate program and need to know precisely how your links are performing. The hosted version is available at dub.co, but the code is fully open-source so you can self-host it on your own infrastructure for full control over your data. The tech stack is TypeScript with Next.js as the web framework, Tailwind for styling, Prisma as the database layer, PlanetScale for the database, Tinybird for analytics, Stripe for payments, and Vercel for deployment.

Copy-paste prompts

Prompt 1
How do I set up Dub on my own server instead of using dub.co?
Prompt 2
Show me how to create a short link with Dub and track its click-through rate.
Prompt 3
How can I use Dub to set up an affiliate program where partners earn commissions?
Prompt 4
What analytics does Dub provide to measure if my marketing links convert to customers?
Prompt 5
How do I integrate Dub's link tracking into my Next.js application?
Open on GitHub → Explain another repo

Generated 2026-05-18 · Model: sonnet-4-6 · Verify against the repo before relying on details.