The first shipped surface of the NIX Loyalty Platform — a white-label loyalty/spin
product. This is the merchant config page inside nix-cafe, and it’s an API client of a
separate loyalty backend (its own service, so consumer loyalty traffic never touches the live
POS database). Config persists in the loyalty backend, not in cafe.* tables.
New backend deployed:nix-loyalty-backend (Node + Fastify + Drizzle) live on
Fly.io (Singapore) → nix-loyalty-backend.fly.dev, on a dedicated
Supabase project. nix-cafe reaches it server-to-server with a service token +
X-Tenant-Id (the tenant code).
The page ships six working config sections — Theme (white-label app name,
logo, colors), Promotions & Seasonal banners (R2 image upload),
Popular Menu (pick 4 products), Points (earn rate / sign-up bonus), and
Locations (enrich synced stores) — plus a Sync catalog & stores
action. Orders & Spins + Reward Settings (Phase 2) and Food Delivery (Phase 5) render as
“coming soon”. The Spin sections are gated to spin-enabled tenants (Get Coffee only).
✓ SSO-login lumiere-coffee owner
✓ Page renders + reaches the loyalty backend (no “backend unreachable” banner)
✓ Section tabs switch (promotions, points, locations render)
✓ Theme save round-trips THROUGH the UI to the loyalty backend
(browser save → server action → Fly backend → Supabase, confirmed via the backend’s own /admin/theme API)
Screens
Theme — app name, logo, primary/accent colorsPromotions — home banners + slide timerPoints — earn rate, sign-up bonus, white-list policyLocations — sync stores, then enrich with map coordinatesTheme edited (app name + primary color) before saveSaved — confirmed persisted in the loyalty backend