Dev Builds Ledger-Based Loyalty Coin System for Waffle Kiosk to Drive Retention
A developer building a loyalty rewards feature for Glazed, a waffle kiosk brand running on Next.js and Supabase, ended up creating a full accounting-style ledger instead of a simple points counter. The core design philosophy centers on loss aversion, framing expiring coins as something customers stand to lose rather than rewards they might gain. Each rupee spent earns one coin redeemable at equal value, with every earn event carrying its own 21-day expiry countdown rather than a shared batch expiry date. The system uses an append-only coin_ledger database table where transactions are never edited or deleted, ensuring a complete and traceable history of every coin earned, redeemed, or expired. This architecture allows support queries to be resolved with a single database lookup, replacing an opaque mutable balance with a fully auditable transaction log.
This is an AI-generated summary. ShortSingh links to the original source for the complete article.
Discussion (0)
Log in to join the discussion and vote.
Log in