Pygocen.

02 · The offer · a worked example

Referra

A referral and ambassador programme built on top of an app that already existed. It runs in production for Shikan, and it was built to be lifted onto any app that runs on Firebase. Built for ourselves first.

What it does

Ambassadors apply or are invited and get a discount code. Their followers redeem it in the app. A Cloud Function attributes each conversion, works out the commission, and releases the payout once a refund-hold window has passed. Ambassadors see their own numbers in a self-service dashboard; the business sees everything in an admin console: users, funnel, trends, conversions, code requests, payouts, tickets.

Why it is a service, not a product

Nothing in it is specific to meditation. It is a layer of Firestore collections, Cloud Functions and a Next.js console that sits beside whatever app you already run, and it comes with a port checklist we wrote when we built it to be moved. That is the shape of most of our work: a custom solution on top of something that exists, delivered whole, with the documentation to run it without us.

How it was built

Next.js and TypeScript for the admin console and the partner dashboards. Firestore for ambassadors, codes, conversions, payouts and activation tokens. Cloud Functions for attribution, commission and payouts. Transactional email through a queue to Amazon SES. Multi-currency snapshots on every conversion, so a payout is worth what it was when it was earned.