YHL · Agent Growth OS
Build Spec · Architecture · Wireframes · for YHL Foods

The Agent Growth OS.

Not an affiliate plugin — a super-app that turns every agent into a mini-marketer: AI content, one-tap WhatsApp selling, self-serve ads, and milestones to climb.

Commerce Shopify (headless) Channel WhatsApp social commerce Build custom agent dashboard + orchestration Growth content · ads · gamification
00 The decision

Build it. GoAffPro can't be the answer.

GoAffPro is a passive affiliate tool — a link, a code, a commission table. It doesn't touch WhatsApp social commerce, it can't generate content, agents can't run ads from it, and there's nothing to climb. Your ask is a different product class: an agent super-app where selling, content, ads, and status all live in one cockpit.

What GoAffPro gives

A passive affiliate layer

Agent link + coupon, a commission dashboard, payout. That's the floor — good enough for Week 1, but it stops exactly where your growth ambition starts.

What you actually want

An agent Growth OS

Manage orders + payout + AI content generation + one-tap WhatsApp selling + self-serve ads + a milestone ladder — a system that makes agents sell more, not just track what they sold.

The architecture in one line

Shopify stays the commerce engine (catalog, checkout, inventory, orders). WhatsApp is the social-commerce channel (share, sell, reorder). You build the Agent Growth OS on top — a thin, headless app that reads/writes Shopify, drives WhatsApp, mints ads, generates content, and runs the commission + milestone engines. You don't rebuild commerce; you build the agent's cockpit and its growth loops.

💬 Sell on WhatsApp

One-tap share of a deal card to their group/status; orders attributed by code + link.

🤖 AI content

Generate on-brand posts, images & captions for the live drop in seconds.

📣 Run their own ads

Boost a post into a Meta ad with co-op or own budget — attributed to them.

🏆 Climb milestones

Sales unlock higher commission, more ad budget, and status — a reason to keep going.

01 System architecture

Five layers. You build the orange one.

People use surfaces; surfaces call the Agent Growth OS; the OS orchestrates the platform services (Shopify, WhatsApp, Meta, payments, the Zennith creative engine); everything writes one attribution-complete data layer.

People
🛒 Customer buys in the WA group 🧑‍🤝‍🧑 Agent (团长) sells + grows 🧭 Admin / Brand you
Surfaces
Customer buy-flow Click-to-WA · web PDP Agent Growth OS app mobile PWA Admin console web
Agent Growth OS — the build
Drop Engine deal · MOQ · zones · cut-off Attribution agent_id ⇄ ad_id ⇄ order Commission Ledger accrue · hold · clawback Payout PayNow/DuitNow/Stripe Milestone / Gamification tiers · perks · leaderboard Content Studio AI post/image/caption Ad Booster 1-tap boost · co-op budget Notifications WA + push
Platform services (integrations)
Shopify catalog · checkout · inventory · orders WhatsApp / WABA Chatwoot BSP · broadcast · CTWA Meta Marketing API ads · CAPI Stripe Connect · HitPay split · PayNow Zennith Creative Engine gpt-image-2 · copywriter · god-audit
Data layer
Postgres agent · drop · order · commission · milestone Attribution ledger agent_id ↔ ad_id ↔ order → ROAS Object store generated content assets (S3/DO)
↕ Shopify webhooks (order created/paid/fulfilled/refunded → commission) ↕ WABA API (share, broadcast, order-confirm, reorder) ↕ Meta API (boost post → ad_id → attribute to agent_id) ↕ Payment webhooks (paid → accrue · refund → clawback)
The unification that makes it a Zennith system

An agent-driven sale and an ad-driven sale hit the same ledger: agent_id and ad_id are both stamped on the order. When an agent boosts a post, the ad's ad_id is minted under their agent_id — so their ad-driven sales attribute to them and feed the existing ad_id → order → CAPI → ROAS chain. One dashboard, one truth, agents are just another attribution source.

02 The agent super-app

Eight screens. Mobile-first — agents live on their phones.

Low-fidelity wireframes of the agent cockpit. Everything an agent needs to sell, create, boost, get paid, and climb — in one PWA they open like WhatsApp.

Old Hoi's · Agent🔔 ☰
This month · earnings
$1,240 · $380 pending
Live drop · CNY Prawncloses 4h
3 more to unlock the run
+ Share deal
🤖 Generate
Milestone · Silver → Gold
$760 more = 10% + $50 ad credit
🏠 Home+ Sell📦 Orders💰 Pay🏆
1 · Home / Overview
Sell & Share🔗
Live drop
deal card preview
$159 set8% youzones: E/NE
↗ Share to my WhatsApp group
Status
IG
FB
My link & code
SARAH10QRcopy
🏠+ Sell📦💰🏆
2 · Sell & Share
AI Content Studio
Product
Template
Deal cardReelRecipeStory
Generated
on-brand image
↗ Share
📣 Boost
🏠+ Sell📦💰🏆
3 · AI Content Studio
My Orders⧗ filter
Live drop · 12paid 9unpaid 3
Mrs Lee · 2kg+2paid
Ah Beng · 1kg+1unpaid
↗ nudge to pay
Siti · combopaid
+ Add order for a customer
🏠📦 Orders💰🏆
4 · Orders (+ order-on-behalf)
Commission & Payout
Available to withdraw
$860
Withdraw → PayNow
Pending (in freshness window)$380
Statements
🏠📦💰 Pay🏆
5 · Commission & Payout
Boost an Ad📣
Boost this post
creative preview
Budget
$20 co-op free+$15 mine
Audience (brand-locked)
SG · EastSeafoodCNY
🚀 Launch boost
est. reach 4–7k · ad_id auto-linked to you
🏠+ Sell📦💰🏆
6 · Ad Booster
Climb🏆
You · Silver
$760 to Gold → 10% + $50 ad credit + gift-box perk
Tier perks
Leaderboard · this drop
1 · Jenny$2.1k
4 · You$1.2k
🏠📦💰🏆 Climb
7 · Milestones / Leaderboard
My Customers🔍
Mrs Lee · East
6 orders · $410 LTV
VIP
Ah Beng · NE
2 orders · last 40d ago
re-engage
↗ Broadcast next drop to all
🏠📦💰🏆
8 · Customers (mini-CRM)
03 The admin console — you

Set the rules; watch the network run.

  admin.oldhois — Create a Drop
DashboardDropsAgentsCommissionContentAds co-opMilestones
Drop name · products
Prawn 2kgGrouper ×2双喜临门 $159
Commission
8% · premium 10%
Cut-off
Thu 6pm
Zones + MOQ
East 10 · NE 8 · West 10
Run date
Sat AM
Publish drop →
  admin.oldhois — Agents & Commission
DashboardDropsAgentsCommissionContentAds co-opMilestones
Sarah · Silver · East
set rate
base 8%grouper 10%$1.2k MTD
Jenny · Gold · West
set rate
base 10%$2.1k MTD
Payout run · this month
Approve payouts →
Admin owns the guardrails

Per-agent + per-product commission · drop config (zones/MOQ/cut-off) · content templates + brand-lock (agents generate only on-brand assets, auto-audited by god-mode ≥9.5) · ad co-op budget + locked audiences (agents can't mis-target or break claims) · milestone/tier rules · payout approval. Agents get freedom inside rails you set once.

04 The growth-hack engine

The flywheel that makes agents sell more.

Each agent becomes a mini-marketer. The four growth features aren't separate tabs — they're a loop that compounds: create → share → boost → sell → climb → create again, with each turn cheaper and bigger.

1 · Create

AI content

Tap "Generate" → the Zennith engine makes an on-brand deal card / reel / recipe + caption for the live drop. God-audited, brand-locked.

2 · Share

To WhatsApp

One tap posts it to their group + status (and IG/FB). Carries their link + code, so every resulting order is theirs.

3 · Boost

Their own ad

Optional: turn the post into a Meta ad with co-op + own budget. An ad_id is minted under their agent_id.

4 · Sell

Commission accrues

Customers order via code/link → attributed → commission accrues (held to delivery). Real-time MOQ bar drives urgency.

5 · Climb

Unlock more

Sales raise the milestone bar → higher commission + more co-op ad budget + status perks → motivates the next Create.

↺ and the higher tier makes turn N+1 cheaper & bigger — the flywheel compounds
Why this is a moat, not a feature list

An affiliate plugin gives an agent a link and hopes they post. This gives them the content to post, the channel to post it, the ad budget to amplify it, and a status ladder that rewards doing it again — with every action attributed and fed back into commission + ROAS. The incumbent WhatsApp-chat operators can't see any of it; you compound on all of it.

05 The data model

The entities behind it (ERD).

Core objects in orange. agent_id and ad_id both hang off order — that's the attribution join that unifies agent commission with the ROAS chain.

agent
id (PK)name · phone · zonetier_id (FK)commission_base %paynow · status
drop
id (PK)title · sku_ids[]price · commission%zones[] · moq_by_zonecut_off · run_date
order
id (PK)agent_id · drop_idcustomer_id · ad_id?shopify_order_idzone · status · total
commission_ledger
id (PK)order_id · agent_idamount · ratestate (pending→paid)payout_id (FK)
customer
id (PK)agent_id (owner)name · phone · zoneltv · last_order_at
payout
id (PK)agent_idamount · methodstatus · statement_url
tier / milestone
id (PK)name (Bronze…Gold)threshold · commission%ad_credit · perks[]
content_asset
id (PK)agent_id · drop_idtype · urlgod_score · brand_ok
ad_campaign
id (PK) = ad_idagent_id · drop_idcontent_asset_idbudget · spend · reachmeta_campaign_id
product (Shopify)
shopify_idtitle · variantsprice · inventory↔ synced
Relationships:
agent 1—∞ customer  ·  agent 1—∞ order  ·  drop 1—∞ order  ·  order 1—1 commission_ledger
agent ∞—1 tier  ·  agent 1—∞ content_asset 1—0..1 ad_campaign  ·  commission_ledger ∞—1 payout
The join: order.agent_id + order.ad_id → the one ledger where agent commission and ad ROAS meet.
06 Key flows

How a sale actually moves through the system.

The sell → attribute → accrue → fulfil → settle sequence, and where each integration fires.

Admin
Publish drop → Drop Engine creates it; pushes deal card + assets to all agents
Agent app
Generate content (Zennith engine) → share to WA group with ?ref=agent_id + code SARAH10
Agent app
(optional) Boost → Meta API mints ad_id under agent_id; co-op budget debited
Customer
Orders via link/code/host-entry → checkout on Shopify; order tagged agent_id · drop_id · zone · ad_id?
Shopify webhook
order/paid → Commission Ledger accrues (pending) · Attribution writes the join · MOQ tally ++
Drop Engine
Cut-off timer fires → MOQ met? confirm zone : roll/refund → generate cold-chain pick-lists per zone
Fulfilment
Pack on ice → Lalamove refrigerated run per zone → agent pickup handoff · DOA claim window opens
Settlement
Delivery confirmed + window closed → commission pending→approved→Payout (PayNow) · Milestone bar ++ · ROAS updated
07 Tech stack

Buy the commodity, build the thin layer.

Frontend

Agent PWA + Admin

Next.js (React) PWA — installable, push-capable, WhatsApp-share-native. Admin = same app, role-gated. Reuse the Zennith dashboard component library.

Backend

The Growth OS services

A thin API (FastAPI/Node) over Postgres holding agent/drop/order/commission/milestone; the Drop, Commission, Milestone, Content & Ad engines; webhook workers. Sits beside the Zennith sidecar.

Commerce

Shopify (headless)

Source of truth for catalog, checkout, inventory, orders, payments. Storefront + Admin API + order webhooks. Draft Orders API for host order-on-behalf.

Channel

WhatsApp / WABA

Your existing Chatwoot + WABA. Cloud API for broadcast, deal cards, CTWA, order-confirm, reorder. Dual-pixel CAPI as already wired.

AI content

Zennith Creative Engine

gpt-image-2 (fal) for visuals + the copywriter for captions, gated by god-mode-audit ≥9.5 and brand-lock — the exact stack that generated the brand key-visuals.

Ads & pay

Meta API + Stripe/HitPay

Meta Marketing API for agent boosts (ad_id minted per agent). Stripe Connect for commission split + payouts; HitPay/PayNow for SG collection, DuitNow for MY.

What you reuse vs build-new

Reuse (already yours): Shopify, WhatsApp/Chatwoot/WABA, the ad_id→order→ROAS attribution chain, the gpt-image-2 + copy + god-audit creative engine, DO Spaces. Build-new (the actual project): the agent PWA + admin, the Drop/Commission/Milestone engines, the agent↔ad_id attribution join, and the content/ads self-serve wrappers. It's a focused build on a stack you already run — not a greenfield platform.

08 The build plan

Four milestones to the full Growth OS.

Each milestone ships something an agent can use — no big-bang. (Per your call, agent onboarding is deferred; this is the platform build order.)

M1 · Core
~3–4 wks

Sell + get paid

  • Agent PWA shell + auth; admin console
  • Drop Engine (create/publish, zones, MOQ, cut-off)
  • Shopify order webhooks → Attribution + Commission Ledger
  • Coupon-code + link attribution; order-on-behalf (Draft Orders)
  • Payout (manual approve → PayNow)
M2 · Content
~2–3 wks

AI Content Studio

  • Generate deal card / reel / caption from a drop (Zennith engine)
  • Brand-lock + god-audit gate; template library
  • One-tap WhatsApp / IG / FB share with ref + code
  • Content asset store + reuse
M3 · Ads
~2–3 wks

Self-serve Ad Booster

  • Boost a post → Meta Marketing API; ad_id under agent_id
  • Co-op budget pool + per-agent budget; locked audiences/claims
  • Ad → order → ROAS attribution folded into the ledger
  • Agent ad performance view
M4 · Growth
~2 wks

Milestones + CRM

  • Tier engine (thresholds → commission + ad credit + perks)
  • Leaderboard + progress + notifications
  • Per-agent mini-CRM + re-engage broadcast
  • Subscribe-and-save / reorder loops
Sequencing logic

M1 makes money flow correctly (the hard, boring, must-be-right part). M2 gives agents something to post. M3 lets them amplify. M4 makes them come back. You could ship M1 as GoAffPro-assisted to buy 3 weeks, but since the end-state needs the native ledger + WhatsApp + ads + gamification anyway, building M1 native avoids a throwaway migration.