ALL WORK

1.1 Case study

Fortune Cookie. A promotion that hands out real rewards.

client
Billionaire Gaming
role
Design, build, deployment
stack
React · Supabase · Vercel
status
Shipped

How it works. Three steps for the player.

1.2 Flow →

  1. 01

    Enter your details

    A participant registers once.

  2. 02

    Open the cookie

    A virtual fortune cookie cracks open.

  3. 03

    Reward or hard luck

    The result is assigned at random.

Built for campaigns with hundreds of participants, where every reward handed out has to be counted.

What I built. Front to back.

1.3 Scope →

Entries
Registration, submission and duplicate-entry handling.
Rewards
Random distribution with configurable quantities and odds.
Admin
A dashboard for managing participants and rewards.
Hosting
Deployment, domain setup and a backend that can move hosts.

Two bugs. Neither was where I first looked.

1.4 Debugging →

bug-01.md

bug
The admin dashboard could not load participant records, although the data was in the database.
first guess
The frontend queries. They were not the cause.
cause
Each response carried base64-encoded reward images, so large requests timed out.
fix
Separated image data from participant records and tightened the queries.

bug-02.md

bug
A repeat entry showed the newly typed name instead of the participant's saved one.
cause
A database function was not returning the original participant name.
fix
Corrected the function and the application logic that reads it.

The lesson: check the whole stack before blaming the frontend.

Have a system that needs untangling?