RefKit Docs

RefKit Docs

Unified documentation for growth teams, end users, and integration engineers.

Choose Your Track

RefKit has three primary audiences and one shared architecture layer.

  • Business operators: configure funding, rewards, referral settings, events, and API keys.
  • Users and ambassadors: manage referral links, see reward status, and claim payouts.
  • Developers: integrate event and referral ingestion using API keys and SDK endpoints.
  • Platform engineers: monitor queue-backed ingestion and blockchain payout flows.

Platform Scope

This documentation is aligned to the current implementation in:

  • apps/api (Express API and business logic)
  • apps/worker (BullMQ ingestion worker)
  • packages/db/prisma/schema.prisma (data model)
  • apps/web/public/refkit.js and apps/api/public/cdn/refkit.min.js (browser SDK distribution)

High-Level Runtime

  1. External systems call /track or /sdk/* with x-refkit-api-key or x-api-key.
  2. API validates input, chooses synchronous or asynchronous processing.
  3. Queue-backed jobs run in refkit-ingestion with retry/backoff.
  4. Terminal worker failures are copied to refkit-dead-letter.
  5. Rewards move through statuses from PENDING to CLAIMED.

Continue with Getting Started to bring a local environment up quickly.

On this page