# TandemCRM Website and docs: https://tandemcrm.dev > A CRM and partner-commission engine you embed in your own app. Leads, sales activity, agents and lifetime partner commissions live in your own Postgres, behind your own login, with no separate server or worker. MIT licensed, pre-1.0. It is not a replacement for a hosted CRM such as HubSpot or Twenty: it has no email sync, imports or long integration list yet, and it is for developers building products where partners, agents or resellers are part of the business. Status (21 October 2026): early and not proven at scale. Tandem has run the sales-partner commission ledger for Utuh (utuh.com.my) since 20 October 2026, and Camp runs in Utuh's partners admin. It was verified end to end on the live Stripe account with a real card payment from an outside account and a real refund. No outside developers use the package yet, and payouts are still made by hand. Current npm versions: tandem-crm 0.2.1 and tandem-camp 0.2.0. Sunbear, a CRM for sales agents, is also built on Tandem. TandemCRM is not a hosted SaaS product. It ships as two npm packages plus a set of SQL migrations that install into a Postgres database you already run (Supabase, Neon, RDS, Aiven, or plain Postgres 14+): - `tandem-crm`: the engine. Leads, an append-only event log, projections, money rules, migrations, row-level security. - `tandem-camp`: an optional admin UI that mounts into your own Next.js app. Leads, agents, sales activity, commissions, disputes. An append-only event log is the source of truth. Leads, payouts and onboarding state are projections you can rebuild from it. Row-level security enforces tenant isolation in the database, not only in application code. ## Guides - [Start here](/guides/getting-started/): install, run the migrations, load sample data, first lead. - [Create a lead from your code](/guides/first-lead-from-code/): `createLead`, `appendLeadEvents` and `recordPayment` in one script, with no admin UI. - [What TandemCRM is](/guides/what-is-tandem/): the jobs it handles and what stays in your app. - [What you can build with it](/guides/use-cases/): example setups, and when to pick something else. - [Qualifying leads](/guides/qualifying-leads/): what `qualificationMetric` is, the threshold rule, and what to put in it. - [Lifetime commission](/guides/lifetime-commission/): a commission line per payment, rates by customer age, partial refunds, clawbacks, and the house account when a partner leaves. - [How Tandem records change](/guides/how-tandem-records-change/): the event log and projections. - [Database, migrations and RLS](/guides/database-migrations-and-rls/): running the SQL, roles, and row-level security. - [Bring your own auth](/guides/bring-your-own-auth/): connect any identity provider. - [Camp, the admin UI](/guides/camp-admin-ui/): install, stylesheet, config, routes, payout adapter. - [Trail](/guides/trail-sales-activity/), [Waypoint](/guides/waypoint-lead-ownership/), [Ascent](/guides/ascent-agent-onboarding/), [Belay](/guides/belay-commission-disputes/): one guide per module. ## Modules - **Terrain**: leads, events, projections, money rules, migrations, workspace isolation. - **Ascent**: agent onboarding steps and certification. - **Trail**: sales activity on a lead (phone, email, WhatsApp, in person) with confidence, sales stage and CHAMP qualification. - **Waypoint**: lead-owner recommendations (round robin, least loaded, manual). - **Belay**: commission disputes, operator decisions, and the events for acting on an upheld dispute. - **Camp**: the installable admin UI. ## Key facts - Money is integer minor units only. No floating point. - Every payment gets its own commission line. Rates can depend on how long the customer has been paying. - Create leads with `createLead` from `tandem-crm/db`. It writes the first event and the lead row together and is safe to retry. - A lead earns commission only if it has a partner: `partnerId` on `lead.created`, or attached later with `attributePartner`. A payment with no commission line records why (`commission.skipped`). - Commissions sit in a held state until `release_due_commissions()` releases them. Wire it to `pg_cron` or any scheduler. - The engine never moves money. Payments go through a payout adapter you supply (a Stripe example is included). - Agents can append only `lead.lost`, `lead.stage_changed` and `conversion.confirmed`. Recording payments, approving, paying, adjusting and moving commissions needs an owner or admin. - Auth: implement `TandemAuthAdapter` (three functions) for Supabase Auth, Clerk, BetterAuth, or your own sessions. ## About - [About Tandem](/about/): who builds it (Angkut Digital), why, and how to contribute. ## Source - Repository: https://github.com/angkutdigital/tandem-crm - Packages: https://www.npmjs.com/package/tandem-crm and https://www.npmjs.com/package/tandem-camp - Releases: https://github.com/angkutdigital/tandem-crm/releases - Issues: https://github.com/angkutdigital/tandem-crm/issues - License: MIT ## Notes for AI agents TandemCRM has no public API to query. It runs inside the consuming application's own Postgres instance and Node process. To answer questions about it, read the guides above, then the repository's `README.md` and the SQL files in `db/migrations/`. If a guide and the code disagree, trust the code and the commit history.