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
这是什么东西?一个开源的短链接归属平台,支持短链接、转化跟踪和联盟推广计划。每月为 Twilio、Buffer、Framer、Perplexity 等团队处理超过 1 亿次点击和 200 万条链接。
它是注册就能用的托管服务,还是需要我自己部署运行?两者都有。既有面向营销团队的托管平台,如果你想对自己的数据和设计有更大的控制权,也可以自行托管同一套代码——README 里附有自托管指南的链接。
我在本地怎么把它跑起来做开发?克隆这个 Turborepo monorepo,先运行 pnpm install,再运行 pnpm dev。请使用推荐的版本:node v23.11.0 和 pnpm 9.15.9。
它依赖哪些外部服务?它基于 Next.js + TypeScript 构建,通过 Prisma 使用 PlanetScale(MySQL),此外还用到 Upstash Redis、Tinybird 数据分析、NextAuth.js 身份验证、BoxyHQ SAML/SSO、Stripe 支付、Resend 邮件,以及 Vercel 部署。
搭建本地开发环境时通常会遇到什么问题?文档里记录了两个常见的坑:一是缺少数据表,运行 pnpm prisma:push 即可解决;二是 node/pnpm 版本不匹配导致构建失败——请使用推荐的版本,删除 node_modules、.next 和 .turbo,然后重新安装并构建。
它是真的免费使用,还是有一部分要付费?它采用 open core 模式:99% 的代码基于 AGPLv3 免费开放,剩下 1%——也就是 /ee 企业版(Enterprise Edition)——需要商业授权,包含由 Dub 的全职核心团队开发的企业级功能。
我怎样才能把测试数据导入本地实例?有一个开发用的 seed 脚本可以向数据库填充开发数据。直接 seed 只会添加数据、不删除任何东西;加上 --truncate 参数运行则会先清空数据库——删除前它会要求确认。
我们公司的人能用 SAML SSO 登录吗?身份验证通过 NextAuth.js 实现,技术栈中包含用于 SAML/SSO 的 BoxyHQ,因此企业级的单点登录本身就是平台认证层的一部分。
这个项目提供 CLI 吗?提供——这个 monorepo 包含一个发布到 npm 的 @dub/cli 包;publish-cli 脚本会用 turbo 构建它并推送到 registry。
Creator
dubinc
Size
92.2 MB
Stars
24.9K
Updated
CommitOct 16
Age
4y
Commits · 90 Days