Marketing · App Starter
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.
01 · 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.
| table | what it holds |
|---|---|
partners | The people and companies promoting you — contact details, status, agreed commission terms, and their lifetime performance rolled up. |
referral_links | Tracked URLs per partner and campaign, with click counts — the attribution edge between a partner's audience and your signup flow. |
referrals | Individual referred visitors and signups, tied to the link that brought them, awaiting the conversion event that makes them worth money. |
conversions | Referred signups that became revenue — order or subscription value, conversion date, and an approval status you control. |
commissions | The amount owed per approved conversion, computed by rules in your code — flat, percentage, or tiered — and held until payout. |
payouts | Batched commission payments per partner per period, with status and an export trail your bookkeeper can reconcile. |
02 · Screens
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.
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.
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.
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
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.
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.
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
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.
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.
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.
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
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.
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
An affiliate program that understands subscriptions — recurring commissions, churn clawbacks, MRR reporting — in code you own.
A referral program built around orders — coupon attribution, refund handling, creator payouts — generated into code your store owns.
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.
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.
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.
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.
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.
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.
Dual7 App Starters
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.