Back to all projects

Community / App case study

Loyalty Scan

A staff-first loyalty system for private QR IDs, fixed visit points, reward redemption, role controls, idempotent operations, row-level security, and an append-only audit ledger.

Staff-first loyalty application

01 / Overview

What it’s built for.

Connect private QR membership cards to accountable visit points and reward redemption with clear staff and owner controls.

Who it serves

Store owners and staff enrolling customers and recording visits and rewards.

02 / Features

Inside the app.

Enrollment and cards

Create customer profiles and share, print, download, or replace private QR loyalty IDs.

Visits and rewards

Scan with the camera or use manual lookup, award fixed points, and redeem rewards through server-enforced operations.

Owner operations

Bootstrap the first store, manage staff and program settings, and inspect activity and audit history.

03 / Workflow

From task to outcome.

  1. An owner initializes the store and grants staff access.

  2. Staff enroll a customer and issue their private QR card.

  3. Scan or look up the customer to record a visit or redeem a reward.

  4. Review balances and attributable ledger activity.

04 / Technical layers

How the pieces work.

Interface

Next.js · React · TypeScript · Tailwind

Mobile-friendly scanning, customer, owner, and settings screens share a PWA shell.

Application operations

Restricted database RPCs

Server-authoritative points, cooldowns, card replacement, and idempotency protect visit/reward actions.

Database and identity

Supabase Auth · PostgreSQL · RLS

Store membership scopes access, while an append-only point ledger and audit events retain history.

Demo mode

Browser-local persistence

Seeded demo customers remain separate from a configured Supabase store.

05 / Limitations

What to keep in mind.

  • Without Supabase configuration the app runs in browser-local demo mode.
  • Staff invitations require the documented server-only configuration and Auth email templates.
  • A public demo link alone does not establish a live store’s configuration or acceptance.

06 / Evidence

Follow the source.

These descriptions were reviewed against the linked source snapshot on October 12, 2026. Repository code and documentation may evolve after this review.