MCPcopy
hub / github.com/dubinc/dub

github.com/dubinc/dub @main sqlite

repository ↗ · DeepWiki ↗
6,071 symbols 28,561 edges 4,068 files 29 documented · 0%
README

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

Dub

The open-source link attribution platform.



<a href="https://dub.co"><strong>Learn more »</strong></a>






<a href="#introduction"><strong>Introduction</strong></a> ·
<a href="#tech-stack"><strong>Tech Stack</strong></a> ·
<a href="#self-hosting"><strong>Self-hosting</strong></a> ·
<a href="#contributing"><strong>Contributing</strong></a>

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:

Recommended Versions

Package Version
node v23.11.0
pnpm 9.15.9

Common Local Development Issues

  • The table <table-name> does not exist in the current database. - Run pnpm prisma:push push the state of the Prisma schema file to the database without using migrations files.
  • The project is not building correctly locally - verify your versions of node and pnpm match the recommended versions above. Delete all node_modules, .next, and .turbo directories in the apps and packages directory. You may now reinstall node_modules by running pnpm install and attempt to rebuild the project with pnpm build.

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.

Extension points exported contracts — how you extend this code

PostbackEventTransformer (Interface)
(no doc) [1 implementers]
apps/web/lib/postback/postback-event-transformers.ts
SWRError (Interface)
(no doc)
packages/utils/src/functions/text-fetcher.ts
ResendEmailOptions (Interface)
(no doc)
packages/email/src/resend/types.ts
Window (Interface)
(no doc)
packages/embeds/core/src/embed.ts
DubConfig (Interface)
(no doc)
packages/cli/src/types/index.ts
MultiValueInputRef (Interface)
(no doc)
packages/ui/src/multi-value-input.tsx
Token (Interface)
(no doc)
packages/stripe-app/src/utils/types.ts
PostbackEventEnricher (Interface)
(no doc) [1 implementers]
apps/web/lib/postback/postback-event-enrichers.ts

Core symbols most depended-on inside this repo

cn
called by 1538
packages/utils/src/functions/cn.ts
useWorkspace
called by 511
apps/web/lib/swr/use-workspace.ts
get
called by 478
apps/web/tests/utils/http.ts
logAndRespond
called by 317
apps/web/app/(ee)/api/cron/utils.ts
setValue
called by 312
apps/web/lib/hooks/use-synced-local-storage.ts
currencyFormatter
called by 298
packages/utils/src/functions/currency-formatter.ts
withWorkspace
called by 251
apps/web/lib/auth/workspace.ts
nFormatter
called by 239
packages/utils/src/functions/nformatter.ts

Shape

Function 5,361
Interface 374
Method 237
Class 97
Enum 2

Languages

TypeScript100%

Modules by API surface

apps/web/lib/qr/codegen.ts50 symbols
apps/web/lib/types.ts22 symbols
packages/utils/src/functions/urls.ts17 symbols
apps/web/lib/storage.ts17 symbols
apps/web/lib/integrations/intercom/client.ts17 symbols
apps/web/app/app.dub.co/(dashboard)/[slug]/(ee)/program/groups/[groupSlug]/settings/group-move-rules.tsx17 symbols
apps/web/ui/partners/rewards/add-edit-reward-sheet.tsx16 symbols
apps/web/ui/modals/qr-code-design-fields.tsx16 symbols
apps/web/ui/activity-logs/activity-entry-chips.tsx15 symbols
apps/web/lib/qr/utils.tsx15 symbols
apps/web/lib/bounty/api/create-bounty-submission.ts15 symbols
apps/web/ui/program-marketplace/utils/urls.ts14 symbols

Used by 2 indexed graphs manifest dependencies, hub-wide

Dependencies from manifests, versioned

@ai-sdk/anthropic3.0.1 · 1×
@ai-sdk/react3.0.3 · 1×
@ai-sdk/rsc2.0.3 · 1×
@axiomhq/js1.3.1 · 1×
@axiomhq/logging0.1.5 · 1×
@axiomhq/nextjs0.1.6 · 1×
@badgateway/oauth2-client2.4.2 · 1×
@better-fetch/fetch1.1.21 · 1×
@boxyhq/saml-jackson1.52.1 · 1×
@chronark/zod-bird1.0.0 · 1×
@date-fns/tz1.4.1 · 1×
@dub/analytics0.0.32 · 1×

Datastores touched

(mysql)Database · 1 repos

For agents

$ claude mcp add dub \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact