Dub
Open-source short links, conversion tracking and affiliate payouts
Dub is a link attribution platform: branded short links with QR codes, geo and device targeting, A/B tests, deep links and custom domains, joined to real-time analytics that follow a click through to a sale. On top of that sits Dub Partners, an affiliate and referral program manager with commission rules, global payouts and embeddable partner dashboards. The core is open source under AGPLv3 (24.4k stars, Next.js + TypeScript + Tailwind + Prisma), with a REST API and first-party SDKs for TypeScript, Python, Go, PHP and Ruby. It is marketing infrastructure, not a design resource — its value to a designer is as a reference Next.js codebase and a referral-flow backend.
npm i dubReach for Dub when a product needs referral or affiliate attribution wired end to end, not merely a URL shortener — Bitly and a homegrown /r/[code] route are cheaper if all you want is a short link. Integrate with the `dub` npm SDK plus the conversion-tracking endpoints (lead and sale events) rather than only creating links, or you get vanity metrics and no attribution. Two cautions: the self-host path is AGPLv3, which is a real obligation for a closed product, and the hosted plans start at $90/mo, so do not propose it for a side project.
Why it is here. A rare open-source SaaS whose Next.js/Tailwind/Prisma monorepo is worth reading as a production reference, quite apart from the product.
- AGPLv3 open-source core, 24.4k stars
- Click-to-sale conversion attribution
- Affiliate payouts and partner dashboards
- SDKs for TS, Python, Go, PHP, Ruby
- Reference-grade Next.js monorepo
Verified 2026-08-15. HTTP 200. https://dub.co/, https://dub.co/pricing, https://dub.co/docs/api-reference/introduction, https://github.com/dubinc/dub








