Inspiration

I'm a chef, not a software developer. I run a tea business in New York with an online store on Shopify (you can find me cooking on Instagram). I wanted a simple referral program for the store: give $15, get $15. The referral apps I came across either cost too much or were cumbersome to run. So during Build Week I built my own with Codex. It's called RiffRoff, and my store is its first customer.

What it does

Every customer gets a personal referral link.

  • A friend opens the link and signs in, so RiffRoff can check they've never ordered before.
  • If they're genuinely new, RiffRoff issues a private, single-use code: $15 off a first order of $80 or more. All amounts are merchant-configurable.
  • A Shopify Discount Function re-checks the customer and the order minimum at checkout, so the rules hold even if someone shares the code.
  • When Shopify reports the order as paid, RiffRoff counts the referral.
  • After a hold period, the advocate gets $15 in Shopify store credit.
  • Refunds, cancellations, duplicate identities, and suspicious activity can reverse a reward or send it to the merchant for review instead of paying automatically.

In the Shopify admin, a Home dashboard tracks claims, referred orders, revenue, and return on credit, plus setup to-dos and an activity feed of anything held for review. A customer-account extension gives advocates their link and reward status, and a thank-you-page extension offers each new customer their own link right after checkout.

How I built it

RiffRoff is an embedded Shopify app: React Router, TypeScript, Prisma, PostgreSQL, Shopify Admin GraphQL, webhooks, Shopify Functions, and UI Extensions. A stack Codex chose, not me.

Before the submission window, I had an early prototype: a basic app shell, a first attempt at recording referrals, and unfinished customer-facing screens. During the Build Week, Codex with GPT-5.6 Sol did the bulk of the engineering: the full claim-to-payout pipeline (verified claims, private offers, checkout enforcement, attribution, refund reversal, and the step-by-step rules for when a reward actually gets paid), the merchant review screens, both customer-facing extensions, reporting, tests, and the landing page at riffroff.com.

The repository history separates the prototype from the work done during the official period.

My contribution was the merchant side.Which fraud scenarios actually worry me in a real store, when a reward is safe to pay, what should happen after a refund, and where automation should stop and ask for a human decision.

Those choices led to individual offers instead of reusable codes, eligibility checked at claim time and at checkout, non-transferable store credit, and anything uncertain stopping for review. Without Codex I could not have shipped this.

Technical challenges

The hard part was connecting four moments safely: sharing a link, claiming an offer, Shopify confirming payment, and the store-credit payout. Order notifications can arrive more than once, orders get refunded, people refer themselves, codes get copied, and a payout request can time out after Shopify has already moved the money.

I could only describe these problems the way a shopkeeper would, and Codex turned each worry into code. The other challenge was staying native to Shopify so merchants don't end up running a separate loyalty platform with another login.

Accomplishments

The claim path is verified end-to-end against a development store: new-customer getting a code, the same claim submitted twice doing nothing extra, an existing customer being turned away, a self-referral being blocked, and a friend trying to claim through a second advocate. The repo has automated tests for checkout eligibility, attribution, duplicate order notifications, reversals, payout safety, and payouts that fail and wait for my review.

The app is deployed, has a prepared judging store, and has been submitted to the Shopify App Store. And it has a real first customer: my own business.

What I learned

A referral program isn't really a coupon generator; it has several identities, risks, and payout system.

I also learned that not being able to write code is different from not being able to direct software. I could bring the constraints, test the behavior, break unsafe assumptions, and make the decisions about customers and money. Codex supplied the engineering leverage I did not have.

What's next

RiffRoff is awaiting Shopify App Store review. After Build Week, I'll keep running it in my own store, and respond to Shopify's feedback. If it works for me, I'll make it available to others, it can solve the same problem for other small stores.

The next work is less glamorous than adding another demo feature, Making onboarding clear, checking that the fraud-review rules hold up, and seeing whether merchants understand and trust the referral ledger.

Built With

Share this project:

Updates