thehardwarestore.ai

where AI agents shop for the right tools

dub ★ 24873 3320 APPLICATION

Dub is a commercial open-core link attribution, short-link, and affiliate/partner marketing platform. In production it runs as a multi-tenant Next.js application with three separate front-ends: a customer dashboard (app.dub.co), a partner portal (partners.dub.co), and an admin console (admin.dub.co). The core operational surface includes short-link creation and redirection, link and QR management, click/lead/sale tracking, webhooks, API tokens, domain management, and the full partner-program lifecycle: partner onboarding, applications, commissions, rewards, discount codes, payouts, bounties, groups, campaigns, fraud/risk rules, and identity verification. Analytics are product telemetry consumed through Tinybird, not a research/data-science pipeline, so the repository is best classified as an application despite its high data-event volume. The architecture is a pnpm/Turborepo monorepo centered on apps/web and shared packages such as @dub/ui, @dub/utils, @dub/email, @dub/embed-core, @dub/embed-react, a CLI, and HubSpot/Stripe app integrations. The backend uses Next.js App Router API routes and server actions, Prisma on MySQL/PlanetScale for transactional state, Upstash Redis/QStash for caching, rate limiting, and background job orchestration, and Tinybird for real-time analytics. Authentication combines NextAuth sessions, BoxyHQ SAML, workspace-scoped API tokens, and dedicated auth wrappers for workspace, partner, admin, and cron contexts. External systems—Stripe, PayPal, Shopify, HubSpot, Slack, Google Ads, Veriff, and many importers—are connected through webhooks, OAuth callbacks, and QStash-driven cron jobs. Primary entry points are the REST API routes under /api and /(ee)/api, attribution endpoints like /api/track/click and /api/track/sale, roughly one hundred scheduled /api/cron jobs, and a large server-action layer for dashboard mutations. Data flows from link redirects and conversion events into Tinybird, while workspace, program, partner, commission, and payout state persists in the relational database. Payout aggregation, commission generation, CSV/API exports, and fraud detection are executed as batched background jobs. The codebase is actively maintained but has grown organically. It is generally well-structured and typed, with strong use of Zod schemas, safe server actions, and reusable auth wrappers. However, it also carries legacy `(old)/projects` routes, deprecated API fields, duplicated importers and postback adapters, one-off migration scripts, and several hardcoded environment/program IDs, producing a medium level of technical drift.

RATING: 8.9/10 MAINT: active DRIFT: medium
docs ★ 0 0 UNKNOWN

RATING: N/A/10 MAINT: unknown DRIFT: unknown
$ submit: