Appearance
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
| Pillar | Product | What it does | Public route |
|---|---|---|---|
| Interaction | QRSetu | QR codes, Digital Menu (+ KOT, cash-calculator), Feedback / engagement forms. | /s/:slug |
| Presence | Studio ("My Setu") | Block-based website builder. | /w/:slug, /s/:slug |
| Aggregation | BioLink | Link-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/.tsxfor logic,allowJsduring 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-js2.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 project | Ref | Notes | |
|---|---|---|---|
| PROD | qr-setu-prod | ygmqxyrbnemhwkiyoboc | Isolated, real user data. |
| DEV + UAT | qr-setu-dev | dyhjofjjuazhyqcvlrkx | Bootstrapped 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.