NODE_01
Reputap
Google review collection via NFC, multi-location, with abuse controls.
In productionHover the interface to follow a piece of data down to the database.
L0 · Interface

L1 · Routes and actions
- GET/s/[publicToken]resolves the tag, creates the scan session
- GET/r/[token]short redirect printed on the plate
- POST/api/session/[sessionToken]/review-linkrecords the review intent, opens Google
- POST/api/session/[sessionToken]/resultserver draw, ticket issued
- GET/win/[campaignId]prize wheel, plays the result
- GET/api/merchant/dashboardestablishment figures
- GET/admin/campaigns/[id]anti-abuse rules, wheel and prizes per campaign
- GET/admin/onboardingtenant and first establishment setup
- GET/api/admin/billing/overviewsubscriptions, invoices
- GET/api/admin/system/healthdatabase latency, disk, logs
L2 · Data model
- Tenantidnameslugstatus
- EstablishmenttenantIdnamecitytimezonegoogleReviewUrl
- NfcTagestablishmentIdcampaignIdpublicTokenlastRotatedAt
- CampaignestablishmentIdtypestatusconfigJsonstartsAt
- ScanSessionnfcTagIdsessionTokendeviceIdipHashstatusexpiresAt
- ReviewIntentscanSessionIdprovidertargetUrl
- PrizewheelIdnameweightdailyCaptotalCap
- SpinscanSessionIdwheelIdprizeIdresultType
- ClaimspinIdclaimCodestatusexpiresAtredeemedByMembershipIdrejectionReason
L3 · Infrastructure
- Vercelhosting, server functions
- PostgreSQL · Supabasedatabase, tenant isolation
- Prismamodel and migrations
- Auth.jssessions, super_admin / owner / user roles
- Resendtransactional email
- Stripebilling
