Case study · ed-tech platform · built & shipped end to end · client name withheld

A referral programme that lives in WhatsApp

Education institutes in India win most of their students through word of mouth — but the people doing the recommending will never install an app or visit a portal. So this platform gives referrers no screen at all: they message an institute's WhatsApp number, get one permanent link, and get paid. Everything else happens in two dashboards behind the scenes.

3 audiences, 1 platform
referrers: WhatsApp only
funnel: 9 stages, append-only
rewards frozen at earn time
H
Horizon School of Businessreferral assistant
Hi10:02
Hi Rahul, welcome to our referral programme. Recommend any programme to friends: you earn 10% of the course fee when they enrol, and they get a discount on theirs.10:02
Get my link
My earnings
Help & rules
Get my link10:03
Here's your link — it's yours permanently: ref.example.in/r/kQ3vX9aZ. Anyone who taps it is counted as yours.10:03
three weeks later
🎉 Great news — Ananya confirmed enrolment in Online MBA. You've earned ₹24,000.14:41
My earnings14:42
You've earned ₹48,000 from 2 enrolments. 3 more of your leads are on their way. 💪14:42
01

How a tap becomes a payout

Anyone who messages an institute's WhatsApp number becomes a referrer and receives one permanent short link. The link redirects each visitor into the institute's AI admissions chat, carrying attribution. From then on, the admissions chat reports every stage of that student's journey to a webhook — which stores each event append-only, prices the reward the moment enrolment is confirmed, and messages the referrer at milestones.

Nothing is ever recomputed behind anyone's back: the funnel is an event ledger, each reward row freezes the rate and fee it was priced from, and a month's payout report is the same every time it is opened.

WhatsApp

“Hi”

Any message mints a referrer + their permanent link

→
Short link

/r/kQ3vX9aZ

Visitor lands in the institute's admissions chat, attributed

→
Webhook

9-stage funnel

The chat reports each stage; stored append-only, idempotent

→
Ledger

Reward minted

Priced from the rate card at enrolment, then frozen

→
Payout

Monthly CSV

Institute pays referrers; WhatsApp tells them the good news

02

Walk through the institute dashboard

Each institute signs in to its own workspace. Click through the eight screens below — every number you see was produced by replaying real funnel events through the live system, not by mocking the UI.

03

Sixty seconds, end to end

Animated tour of the institute dashboard: products, eligibility, rate card, overview funnel, referrers, referrals, payouts and message editor

Recorded against a locally running instance seeded with fictional data — no real students, referrers or phone numbers appear anywhere on this page. Click any screenshot to enlarge it.

04

Under the hood

1,321
test methods — every feature tested end-to-end over a real PostgreSQL (Testcontainers)
56
Flyway migrations — the schema is owned by versioned SQL, never by the ORM
28
REST controllers across admin, institute and webhook APIs
2
React SPAs, types generated from the OpenAPI spec

Append-only funnel

Stage reports are events with idempotency keys, not mutable state. A duplicate delivery is dropped at intake; history can always be replayed and audited.

Rewards frozen at earn time

Each reward row stores the rate, basis fee and amount as they were the moment enrolment confirmed. Later rate-card changes never rewrite anyone's money.

Fail-closed webhook intake

Deliveries are accepted with 202 into an inbox ledger and processed asynchronously — unknown codes and failures are recorded, never silently lost.

Monthly payouts that never drift

A payout month cuts on when the reward was recorded, so a report re-opened later shows the same figures — no double-pay, no missing rows.

Three security perimeters

Google OAuth (domain-restricted) for platform staff, session-auth per institute workspace, and shared-secret token auth for machine webhooks — each in its own filter chain.

Multi-tenant by design

Institutes are hierarchical tenants with their own WhatsApp number, programmes, rate cards and users; a credential sees its own subtree and nothing else.

Stack · Java 21 · Spring Boot 3 · PostgreSQL 16 · Flyway · Spring Data JPA · Testcontainers · React 18 + TypeScript · Vite · TanStack Query · WhatsApp Business (AiSensy) · Docker on AWS EC2 + RDS · GitHub Actions OIDC