01 — Context
A media company commissioned a short-form vertical drama streaming app, with episodes unlocked through subscriptions, rentals, a free preview and an in-app coin economy. The backend was inherited as a clone of an earlier streaming platform.
02 — Challenge
Monetisation is complex: paid and reward coins, reward-first spending, expiring credits, daily check-ins, watch-time and referral rewards, and anti-cheat rules. All of it had to be specified precisely on top of code built for a different product.
03 — Approach
Requirements first
One canonical source-of-truth document merged from business inputs, and about 20 capability specs (wallet, rewards, rental, paywall, free preview, ads, entitlement and more), with a script in CI that checks every trace and ownership rule.
Inherited code as evidence only
A defect register and build order treat the inherited code only as evidence of what exists, never of what the new product should do.
A clear wallet boundary
A wallet boundary in the backend keeps every app-specific coin rule out of a shared, generic credit ledger. A fake ledger stands in wherever the real one is not configured.
Shared logic across platforms
A Kotlin Multiplatform mobile client shares logic between Android and iOS, with a separate payment and entitlement service.
04 — Outcome
The full product and monetisation model is specified, and the coin integration has passed its conformance suite against the live ledger in staging.

