Skip to content

Platform Overview

QRSETU is a React SPA ("web-app") — one platform bundling three products for small businesses on shared infrastructure, backed by one Supabase project and one React codebase, code-split by tier. Hosted on Cloudflare Pages (+ CDN caching).

The three product pillars

PillarProductWhat it doesPublic route
InteractionQRSetuQR codes, Digital Menu (+ KOT, cash-calculator), Feedback / engagement forms./s/:slug
PresenceStudio ("My Setu")Block-based website builder./w/:slug, /s/:slug
AggregationBioLinkLink-in-bio pages./b/:slug

Unified identity, data, and analytics span all three pillars — a single profiles row and one auth session drive every product.

System map

The one hard rule

supabase.from() is banned in src/. Reads go through Postgres RPCs (called from hooks via TanStack Query); writes and any secret / external-HTTP / multi-step work go through Edge Functions (called from services). This keeps table names and schema off the network wire. See Data Access Strategy — the most important page in this portal.

Tech stack at a glance

  • Frontend: React 18.2 + Vite, TypeScript-first (.ts/.tsx for logic, allowJs during retrofit), Tailwind CSS, React Router 6, React Hook Form + Zod, TanStack Query, Recharts, shadcn/ui (style "new-york"), @dnd-kit (builder drag-drop).
  • Backend: Supabase — PostgreSQL with RLS (58 tables, 118 policies), Deno/TypeScript Edge Functions pinned to @supabase/supabase-js 2.30.0, Postgres RPCs for reads.
  • Hosting: Cloudflare Pages (three projects: DEV / UAT / PROD) + CDN caching (target hit-rate

    95% on public pages).

  • Testing: Vitest (4-layer model), Deno tests for edge functions (test:ef), pgTAP planned for SQL/RPC, Playwright planned for E2E.

Environments

Two Supabase projects and three Cloudflare Pages projects. See Environment Strategy for the full branch→env matrix.

Supabase projectRefNotes
PRODqr-setu-prodygmqxyrbnemhwkiyobocIsolated, real user data.
DEV + UATqr-setu-devdyhjofjjuazhyqcvlrkxBootstrapped from a schema-only baseline; zero data rows.

Mobile north-star (design for it; don't build yet)

An Expo / React Native app that reuses the Supabase backend and the shared TS core entirely — only the UI screens (+ thin per-platform adapters) are built separately. Keep domain logic/contracts free of web/DOM dependencies now so later extraction to a monorepo packages/core is a move, not a rewrite.

Next: Developer Onboarding · Tier System · HLD.