Objective
Run distribution routes, field visits and client loyalty in one system.
A Turborepo monorepo with six role dashboards, a staff app for field visits and QR redemption, and a client app for points and promotions. Types and Zod schemas live in a package shared by all three apps.
Overview
Six roles share the platform: admin, brand manager, supervisor, promoter, sales advisor and client. Each has its own web dashboard; field staff and clients also get a native app.
Technical Implementation
Multi-Tenancy
Row Level Security on every table, plus a tenant filter in every query as defense in depth. URLs, exports and QR codes use public identifiers, not internal IDs. A separate suite tests those rules.
Mobile Apps
The staff app scans QR codes and attaches GPS-tagged photo evidence to visits. Both apps receive push notifications and ship to iOS and Android through EAS Build.
Loyalty
A sales advisor scans the client’s QR to redeem a promotion, and the redemption is logged for distributor-to-brand billing. Points, tiers and brand memberships are tracked per client.
Features
- Visits: three-stage assessment wizard (pricing, inventory, POP) with auto-save.
- Promotions and surveys: authored by brands, published after admin approval.
- Targeting: audience filters with reach estimation.
- Operations: orders, support tickets, exhibition submissions.
- Notifications: real-time in-app alerts.
- Exports: segmented datasets as ZIP archives.
Technologies
- Next.js 16
- React 19
- TypeScript
- Expo
- React Native
- NativeWind
- Supabase
- PostgreSQL
- Row Level Security
- Turborepo
- Tailwind CSS 4
- React Hook Form
- Zod
- Recharts
- Jest
- Playwright
- MSW
- EAS Build
- Vercel
