01
Scan
The guest opens /join/{slug} from the counter QR.
Architecture
Alder is a multi-tenant loyalty workspace. Each merchant owns a program, locations, guests, rewards, and a ledger. Platform admin sees tenants and plans, not the cashier.
The browser keeps the workspace in local storage. Prisma describes the same tables so a database can replace the store without changing the product shape.
Super Admin
Merchants, plans, platform activity. No guest editor.
Merchant
One business. Program, team, rewards, offers, analytics.
Staff
Same business, counter only. No billing or program edits.
Customer
One card at one café. Redeem and read offers.
01
The guest opens /join/{slug} from the counter QR.
02
A customer record is created inside that merchant only.
03
Staff posts spend. The rule engine adds points or a stamp, plus any live offer.
04
If the balance covers an active reward, the ledger deducts the cost.
Write
Enroll, visit, redeem, and settings call the in-memory store, then persist JSON locally.
Scope
Every guest, reward, and transaction carries a merchant id. Queries filter on it.
Read
Dashboards derive totals from the same ledger. Nothing is fetched from a network API.
If the merchant is paused, or the guest is paused, the visit is rejected.
Points model: floor(spend × points per dollar) + points per visit.
Stamp model: one stamp per visit, regardless of spend.
Each live campaign whose dates include today adds its bonus points or stamps.
Redemption requires an active reward and a balance at least equal to its cost. The ledger stores a negative line.
Void reverses the line. A posted line cannot be deleted until it is void.