dub README

The project's README from github.com/dubinc/dub. As one markdown file: README.md.

Dub is the modern, open-source link attribution platform for short links, conversion tracking, and affiliate programs.

Dub

The open-source link attribution platform.
Learn more »

Introduction · Tech Stack · Self-hosting · Contributing

Twitter Hacker News License


Introduction

Dub is the modern, open-source link attribution platform for short links, conversion tracking, and affiliate programs.

Our platform powers 100M+ clicks and 2M+ links monthly, and is used by world-class marketing teams from companies like Twilio, Buffer, Framer, Perplexity, Vercel, Laravel, and more.

Tech Stack

Self-Hosting

You can self-host Dub 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:

Package Version
node v23.11.0
pnpm 9.15.9

Common Local Development Issues

Dev Seed Script

This script seeds the database with development data for testing and development purposes.

Basic seeding (adds data without deleting existing data):

cd apps/web
pnpm run script dev/seed

Truncate database before seeding (deletes all existing data first):

cd apps/web
pnpm run script dev/seed --truncate

When using --truncate, the script will ask for confirmation before deleting any data.

Repo Activity

Dub repo activity – generated by Axiom

License

Dub Technologies, Inc. is a commercial open-source company, which means some parts of this open-source repository require a commercial license. The concept is called "Open Core" where the core technology (99%) is fully open source, licensed under AGPLv3 and the last 1% is covered under a commercial license ("/ee" Enterprise Edition) which we believe is entirely relevant for larger organisations that require enterprise features. Enterprise features are built by the core engineering team of Dub Technologies, Inc., which is hired full-time.

dub (dubinc/dub)

Searching Database…

24.9K ·GitHub
What is this?An open-source link attribution platform for short links, conversion tracking, and affiliate programs. It powers 100M+ clicks and 2M+ links monthly for teams like Twilio, Buffer, Framer, and Perplexity.
Is it a hosted service I sign up for, or something I run myself?Both. There is a hosted platform for marketing teams, and you can self-host the same codebase if you want greater control over your data and design — the README links a self-hosting guide.
How do I get a local copy running for development?Clone the Turborepo monorepo, run pnpm install, then pnpm dev. Stick to the recommended versions: node v23.11.0 and pnpm 9.15.9.
Which external services does it depend on?It runs on Next.js + TypeScript with Prisma over PlanetScale (MySQL), plus Upstash Redis, Tinybird analytics, NextAuth.js auth, BoxyHQ SAML/SSO, Stripe payments, Resend emails, and Vercel deployments.
What usually breaks when setting up a local dev environment?Two documented gotchas: a missing table, fixed by running pnpm prisma:push, and builds failing from mismatched node/pnpm versions — match the recommended versions, delete node_modules, .next and .turbo, then reinstall and rebuild.
Is it actually free to use, or is part of it paywalled?It is open core: 99% of the code is free under AGPLv3, while the remaining 1% — the /ee Enterprise Edition — requires a commercial license and covers enterprise features built by Dub's full-time core team.
How do I get test data into a local instance?A dev seed script fills the database with development data. Plain seeding adds data without deleting anything; run it with --truncate to clear the database first — it asks for confirmation before deleting anything.
Can people at my company log in with SAML SSO?Authentication runs through NextAuth.js, and the stack includes BoxyHQ for SAML/SSO, so enterprise-style single sign-on is part of the platform's auth layer.
Does the project include a CLI?Yes — the monorepo ships a @dub/cli package that is published to npm; a publish-cli script builds it with turbo and pushes it to the registry.
Creator
dubinc
Size
92.2 MB
Stars
24.9K
Updated
CommitOct 16
Age
4y
Commits · 90 Days