Skip to content

Marketing · App Starter

Affiliate Program Template

A complete affiliate program — partner portal, tracked links, commission ledger, payouts — generated into a codebase you own.

Affiliate networks take a cut of every conversion and keep your partner relationships inside their platform. This starter generates the whole program as your own app: partners sign up in your portal, links resolve on your domain, and the commission math is code you can read. When the program grows, nothing scales against you.

  • 6 core entities
  • Partner portal
  • Code you own
  • Vibe + Governed modes

01 · Data model

What's inside: the data model

An affiliate program is an accounting system wearing a marketing hat. These six tables carry it: who your partners are, which links they share, what converted, what you owe, and what you've paid — every screen below is a view of them.

tablewhat it holds
partnersThe people and companies promoting you — contact details, status, agreed commission terms, and their lifetime performance rolled up.
referral_linksTracked URLs per partner and campaign, with click counts — the attribution edge between a partner's audience and your signup flow.
referralsIndividual referred visitors and signups, tied to the link that brought them, awaiting the conversion event that makes them worth money.
conversionsReferred signups that became revenue — order or subscription value, conversion date, and an approval status you control.
commissionsThe amount owed per approved conversion, computed by rules in your code — flat, percentage, or tiered — and held until payout.
payoutsBatched commission payments per partner per period, with status and an export trail your bookkeeper can reconcile.

02 · Screens

Signature modules

Partner portal

01

Partners log in to grab their links, watch clicks and conversions accrue, and see exactly what they've earned and when it pays. A portal that answers those questions kills the where's-my-money email thread — the biggest hidden cost of running a program by spreadsheet.

Conversion approvals

02

New conversions land in a review queue instead of auto-paying. Approve the clean ones, reject the refunds and self-referrals, and the commission only exists once you've said so — fraud control as a workflow, not a support ticket to a network.

Commission ledger

03

Every approved conversion produces a ledger entry with the rule that computed it. The ledger answers what you owe each partner right now and what the program cost last quarter — one query, because it's one table in your database.

Payout batches

04

Close a period and the ledger rolls into per-partner payout batches with amounts and statuses. Export the batch to your payment rail of choice; mark it paid and every included commission settles with it.

03 · Process

How it works

  1. 1You

    Describe your program

    Tell Dual7 how your program works — who partners are, what counts as a conversion, how commission is computed, when payouts run. The starter supplies the tables and screens around your answers.

  2. 2Vibe mode

    Tune it in Vibe mode

    Adjust conversationally: add a tiered commission rule, a minimum payout threshold, a cookie window. Each change is a readable edit to your own code, not a setting buried in someone's dashboard.

  3. 3Governed mode

    Deploy through the governed pipeline

    Ship it to your infrastructure with approval gates and an audit trail. Partner data and commission history live in your database from day one — there is no platform to export them from later.

04 · Fit

Who the Affiliate Program starter is for

SaaS teams leaving the networks

Network fees are a percentage of the revenue your partners generate — a tax that grows with success. Owning the program flips that: the software cost is fixed, the partner relationships are yours, and the terms are whatever you write into the commission rules.

Stores formalizing word of mouth

You already have customers who send you customers. This starter turns that into a program with real links, real attribution, and a monthly payout — without gluing a referral widget onto your checkout and hoping the numbers reconcile.

Marketplaces and apps with revenue-share deals

When every partner negotiates different terms, off-the-shelf tools force the deals into their pricing model. Here the commission rules are code — a 20% first-year deal and a flat-fee deal can coexist because you wrote both.

Finance teams who have to sign off

Commissions are a liability on someone's books. A ledger with an approval trail, computed by rules the team can read, is auditable in a way a network's monthly invoice never is.

05 · Yours

Customize it, own it

Make it yours

The starter's commission logic is deliberately simple so yours can replace it. Add tiers that step up with volume, a recurring commission on subscription renewals, a clawback when a referred customer refunds, or a two-sided reward that credits the referred customer too — each is a rule in your codebase, edited conversationally in Vibe mode.

Attribution is equally yours to shape. Lengthen the referral window, add coupon-code attribution alongside links for partners who work in podcasts and print, or wire conversion events straight from your billing system so approvals start from real revenue. The generated app is a standard full-stack codebase, so your team can also make any of these changes directly.

Why a starter, not a subscription

An affiliate network sits between you and your partners: it holds the relationship, sets the fee, and meters your access to your own conversion data. This starter removes the intermediary. The program is an application you run — partners sign agreements with you, attribution happens on your domain, and the margin you'd pay in network fees stays in the commission budget where it attracts better partners.

The honest trade is that you operate it: approvals are your queue, payouts are your export, disputes are your call. Dual7's governed pipeline keeps that manageable — changes go through approval gates with an audit trail, and structural changes are regenerations rather than midnight schema surgery.

06 · Industries

Industry versions

Affiliate Program template — frequently asked questions

What does the affiliate program template include out of the box?

A working program: partner signup and portal, tracked referral links, a conversion approval queue, a commission ledger with the computation rules in readable code, and per-period payout batches. All of it generated as a full-stack app in your repository, running on your infrastructure.

How does link tracking and attribution work?

Each partner gets tracked URLs that resolve on your domain and record the click before forwarding to your site. When a referred visitor converts, the conversion ties back to the link and partner. Because attribution runs in your code, the referral window and matching rules are yours to change.

Can I set different commission rates for different partners?

Yes — commission terms live on the partner record and the computation is a rule in your codebase. Flat fees, percentages, tiers by volume, recurring commission on renewals, or a bespoke deal for one strategic partner all coexist because you own the logic.

Does it send the actual payout money?

It computes and batches what you owe; the money moves on whatever rail you already use. Export a payout batch to your bank or payment provider, mark it paid, and the ledger settles. Wiring a payment API directly into the batch step is a normal integration against your own schema.

How is this different from joining an affiliate network?

A network brings a marketplace of affiliates but takes a percentage of tracked revenue and owns the partner relationships. This starter is the opposite trade: you recruit your own partners and keep the whole margin, and the program's data and terms live in code you control.

Can it handle two-sided referral rewards?

The base models one-sided commission, and the schema extends cleanly: add a reward field on the referral and a credit step on approval, and the referred customer gets their discount while the partner earns their commission. In Vibe mode that's a conversational change.

Related

Shankar Prabhu, Founder & CEO of Dual7
Published by Shankar Prabhu, Founder & CEO

Dual7 App Starters

Build your Affiliate Program on your terms

A complete affiliate program — partner portal, tracked links, commission ledger, payouts — generated into a codebase you own. Describe your version to start — the output is a project you own.