Claude Templates / B-tier · Situational
Growth & SEO
The Affiliate Program Playbook
Referral tracking, commission ledger, payouts — the standalone pattern.
AFFILIATE-PROGRAM-PLAYBOOK.md · 13 sections · 2,118 words · 17 KB · markdown
A self-hosted affiliate system modeled on what Rewardful, PartnerStack, and FirstPromoter actually do. Click attribution, a commission ledger, an affiliate dashboard, payout thresholds, and the deliberate choice to keep each app's program standalone rather than federated.
What's inside
- //Click attribution with a cookie + server-side fallback
- //A commission ledger with pending / payable / paid states
- //An affiliate-facing dashboard: clicks, signups, attributed MRR
- //Payout threshold logic and the payout run
- //Fraud guards (self-referral, refund clawback)
When to use it
Post-launch. You need users before you need affiliates.
Build these first
Straight from the file
Canonical pattern drawn from Rewardful / PartnerStack / Tolt / FirstPromoter. BKE itself does not implement a full affiliate system yet; this playbook is the reference for any new app in the operator's portfolio (Kompozy, Cold Email Engine, Cold SMS, Cold DM, Cold WA/Telegram, Giveaway, Lead Scraper, AI Cold Caller) that adds one.
Table of contents
- 0. Use this spec
- 1. Architecture
- 2. Schema
- 3. Code generation
- 4. Click capture
- 5. Attribution
- 6. Commission calculation
- 7. Payouts
- 8. Affiliate dashboard
- 9. Creative asset library
- 10. Fraud detection
- 11. Common pitfalls
- 12. Kickoff prompt
How to run it
Drop AFFILIATE-PROGRAM-PLAYBOOK.md into your repo, then tell Claude Code: “Read AFFILIATE-PROGRAM-PLAYBOOK.md and implement it in this codebase.” It's written for an agent to execute end to end. Search the file for angle-bracket placeholders and swap in your own project names, domains, and keys before the first run.
More growth & seo playbooks
Topical Authority
The 5-layer model that turns a marketing site into 250-350 pages that actually rank.
Read + download →A-tierCustomer Analytics
First-party event tracking that outlives cookie blockers — and costs nothing per event.
Read + download →A-tierSEO/GEO Engine
The autonomous layer — trend discovery, LLM classification, auto-authored pages, tracking.
Read + download →