Case study
Keystone Rewards
Multi-tenant loyalty rewards platform enabling businesses to engage customers with points, rewards, and branded mobile experiences across iOS, Android, and Web.
Mobile + Web App · Loyalty & Rewards · Launching Soon
- 3Platforms
- 20+API Routes
- 4Auth Levels
Get early access
Join the waitlist to be notified when Keystone Rewards launches.

01 —
Project Overview
Keystone is a white-label loyalty rewards platform that enables businesses to launch their own branded rewards programs. Built with Expo Router for true cross-platform support, customers can earn and redeem points on iOS, Android, or web.
The platform uses TRPC for end-to-end type safety from the Supabase database through the API layer to the React Native UI, eliminating entire categories of runtime errors.
Key technical challenges included designing a multi-tenant architecture with complete data isolation, implementing passwordless OTP authentication, and building a real-time points ledger with balance computation.
Platform Capabilities
- Cross-platform (iOS, Android, Web)
- Multi-tenant with complete data isolation
- Passwordless OTP authentication
- Real-time points and rewards tracking
- Admin analytics dashboard
- Custom branding per tenant
- Redemption code fulfillment system
- Role-based access control
02 —
Technology Stack
Built with Expo and TRPC for type-safe, cross-platform development.
Mobile
Expo Router
Native iOS, Android, and WebFrontend
React Native + TypeScript
Type-safe cross-platform UIAPI
TRPC
End-to-end typesafe APIsDatabase
Supabase + PostgreSQL
Multi-tenant data with RLSAuthentication
OTP via Email
Passwordless sign-in flowBranding
Custom Theming
Per-tenant color palettesArchitecture
Multi-Tenant
Complete data isolationPlatform
Universal
iOS, Android, and Web
03 —
Customer Experience
Intuitive mobile-first rewards experience for end users.
Points Dashboard
View current balance with progress tracking toward next available reward.Rewards Catalog
Browse available rewards with one-tap redemption and instant confirmation codes.Transaction History
Complete points ledger with earning, redemption, and adjustment details.Profile Management
Edit personal info, switch businesses, and manage account settings.
04 —
Admin Dashboard
Powerful tools for managing customers, rewards, and analytics.
Analytics Dashboard
Key metrics including total customers, points issued/redeemed, and redemption rates.Customer Management
Search customers, view profiles, and manually adjust points with reason tracking.Rewards Management
Create, edit, and delete rewards with redemption count tracking.Redemption Fulfillment
Look up 8-character codes and mark redemptions as fulfilled.Custom Branding
Configure app name, logo, and choose from 6 preset color themes.Top Rewards Analytics
View most redeemed rewards with rank badges and counts.
05 —
Security Architecture
Multi-tenant isolation with passwordless authentication.
Row-Level Security
Complete tenant isolation at the database level via Supabase RLS policies.Passwordless OTP Auth
Email-based one-time password authentication eliminates credential theft risk.Role-Based Access
Four authorization levels: public, tenant, protected, and admin procedures.Tenant ID Validation
Every request validated against X-Tenant-ID header for isolation.Admin Role Enforcement
Admin-only endpoints verify role before granting access.JWT Token Auth
Protected routes require valid JWT tokens with automatic refresh.
06 —
Architecture Highlights
TRPC End-to-End Types
Full type safety from database queries through API responses to mobile UI components, eliminating runtime type errors.Multi-Tenant Architecture
Complete data isolation via RLS, per-tenant branding, and tenant-scoped authentication with unique business codes.Points Ledger System
Immutable transaction log with real-time balance computation via PostgreSQL views, supporting earnings, redemptions, and adjustments.Redemption Code Flow
8-character unique codes generated at redemption, with status tracking through pending, fulfilled, and cancelled states.
07 —
Data Model
PostgreSQL schema with Row Level Security for complete tenant isolation.
tenantstenant_brandingusersrewardspoints_ledgerredemptionsuser_points_balance
Need a loyalty platform for your business?
Whether you need a white-label rewards app, customer engagement platform, or multi-tenant SaaS solution, let's discuss how we can help grow your business.