Appearance
Platform overview
THE PRODUCTION PROJECT CHANGED ON 2026-08-16 — CHECK THE REF, NOT THE NAME
Every ygmqxyrbnemhwkiyoboc on this page is the retired project, now named qr-setu-legacy-bkp. Production is ikkwqowfnbhdasfejojg (qr-setu-prod), on a separate Supabase account. ⚠ Both projects have held the name qr-setu-prod, so the NAME is ambiguous and only the REF identifies a project — anything written before 2026-08-16 that says "qr-setu-prod" means the other one. Following a stale instruction here points an OAuth redirect, a migration or a build at the wrong live project.
Rewritten 2026-08-08. The previous version opened "QRSETU is a React SPA", listed three product pillars including BioLink (retired 2026-07-23, tables dropped 2026-08-08), quoted 58 tables from the retired Prod baseline, and filed the mobile app under "design for it; don't build yet" — when the mobile app is the merchant product and is the only surface actually shipping. Index of truth: current architecture state.
QRSETU is a business-assistant platform for Indian small businesses, delivered as two frontend stacks over one shared core and one Supabase backend (ADR-0011). It is not a place to store and view information: every feature has to answer "how does this help the merchant take action and grow their business today?"
What it actually is
| The merchant product | A universal Expo / React Native app — Android native · iOS native · Web PWA, from one codebase. This is where a business owner works. |
| The growth surface | The public Setu Card at qrsetu.com/:slug — server-rendered DOM, Cloudflare-cached, readable with no account and no app. SEO is the primary growth factor and is never routed through React Native Web. |
| The control plane | A platform admin tier (Stack 1, DOM + installable PWA) for QRSETU staff, and — designed, not built — a separate org-admin portal for enterprise customers. |
| The audience | Three user categories: solo business owners (primary), enterprise organizations, and individual consumers. See the user ecosystem. |
The Setu Card replaced the three-pillar framing
The platform was originally described as three products — Interaction (QRSetu), Presence (Studio / "My Setu"), and Aggregation (BioLink). That framing is retired. The Setu Card is the universal public identity for every user, and it subsumed the separate BioLink product entirely (QRS-172, 2026-07-23). bio_pages and bio_links were dropped from Dev on 2026-08-08.
If a document still names BioLink, Studio websites, /b/:slug, /s/:slug or /w/:slug as live surfaces, it is stale — report it rather than following it. The only public route is /:slug.
System map
The one hard rule
supabase.from() is banned in app code. It keeps table names off the network wire.
- Reads → TanStack Query
useQueryin a feature hook → a service inpackages/data→supabase.rpc('get_…'). RPC only in services, never in components or JSX. - Writes / secrets / external HTTP / multi-step →
useMutation→ the service →functions.invoke(EDGE_FN.X). Invalidate queries on success. - Mutations take a REQUIRED
idempotencyKey, reused across retries. Not boilerplate: 6 of 11 rows in the legacy production reminders table were double-tap duplicates (QRS-210).
The seam is packages/data — a typed interface per domain plus a stub, so presentation never knows whether it is talking to Supabase or a stub. Check packages/data/src/index.ts to see which impl is wired; a service.stub.ts existing beside a service.supabase.ts does not tell you which runs. See Data Access Strategy.
Tech stack at a glance
- Merchant app: Expo SDK 57 (New Arch + Hermes), Expo Router, NativeWind, Zustand (client state), TanStack Query (server state), jest-expo.
- Web: React Router v8 in framework mode (SSR), Tailwind v3 over
@qrsetu/tokens, vitest + Playwright (layout-invariants,axe-core, visual regression). - Backend: Supabase — PostgreSQL with RLS, Deno/TypeScript Edge Functions pinned to
@supabase/supabase-js2.39.7, Postgres RPCs for reads, pgTAP for RLS and grants. - Design tokens: one
@qrsetu/tokenspackage compiled to both a Tailwind config (DOM) and a NativeWind/JS theme (RN) — the single source of truth for colour, spacing, radius, type scale, motion and elevation. Zero hard-coded colours in either idiom. - Hosting: Cloudflare Pages (DEV / UAT / PROD) + CDN caching, target hit-rate >95% on public pages.
- Observability: Sentry across all surfaces through the
@qrsetu/observabilityseam, never a Sentry SDK directly. No-op until a DSN is set; PII scrubbed.
Full current-vs-target stack and cost: Tech Stack.
Environments
qr-setu-dev is the source of truth and the only environment that informs design. Prod is disposable — the owner will replace it by replicating Dev once Dev is release-ready, so it carries no compatibility obligation and must never be cited as evidence for a design decision.
| Supabase project | Ref | State | |
|---|---|---|---|
| DEV + UAT | qr-setu-dev | dyhjofjjuazhyqcvlrkx | Greenfield. Verified 2026-08-08: public holds 0 tables — the v2 reset ran and the baseline is authored but not yet applied. |
| PROD | qr-setu-prod | ygmqxyrbnemhwkiyoboc | Pre-vision schema. Disposable. Not a design reference. |
See Environment Strategy for the branch→env matrix and supabase/docs/PROMOTION_RUNBOOK.md for promotion.
Next: Current Architecture State · User Ecosystem · Tier System · HLD.
What QRSETU is — the operating-manual text
Provenance — moved from CLAUDE.md on 2026-09-23 (QRS-1288)
This is the verbatim text of CLAUDE.md § "What QRSETU is" as of commit 00c1eca, relocated here under the context-architecture programme. Sentences of the form "this said X until [date]" are corrections recorded at the time they were made; the live rule is the corrected one. Retired vocabulary inside those corrections names what was retired and is not a live claim.
What QRSETU is
A platform for small businesses on shared infrastructure. Target architecture — surface-matched (ADR-0011): two frontend stacks over one shared core. (1) React web (DOM, shadcn/ui) renders the SEO-critical public pages (Setu Cards) and the admin panel; (2) a universal Expo/React Native app is the merchant product (Android native + iOS native + responsive web via RNW). Mobile-first for the product; SEO uncompromised for the public pages. The previous single Vite React-DOM SPA is retired to legacy/ (reference only).
⚠ THE "THREE PILLARS / THREE PRODUCTS" FRAMING IS RETIRED, AND THIS SECTION TAUGHT IT UNTIL 2026-08-12. It read: "three products … QRSetu (Interaction) · Studio / 'My Setu' (Presence) · BioLink (Aggregation)". BioLink was retired 2026-07-23 (QRS-172) in favour of the Setu Card, and its tables were dropped 2026-08-08.
tools/check-docs-vocabulary.jscarries it as retired vocabulary group #1 with exactly that reason — whilecheck:docsdid not scan this file until 2026-08-24 (QRS-567), and it does now — a live run reports "192 portal page(s) + 2 root doc(s) scanned", which is how the repo's own operating manual kept teaching a dead product to every session that read it. The 2026-08-08 audit banner-stamped 129 archived docs for this and did not think to check CLAUDE.md. The current model is the four-layer platform — industry × archetype × primitives × grants (ADR-0020..0025) — documented below under "The platform model". A merchant's public identity is the Setu Card; Digital Menu is excluded from R1 and slated for an R2 re-home onto the Goods archetype; Studio / "My Setu" is not R1 scope. If you need the historical pillar vocabulary, it survives in the ADRs and the archive, where it belongs.
One Supabase backend (Postgres + RLS + Auth + Edge Functions + Storage), code-split by tier. Web hosted on Cloudflare Workers (+ CDN caching) — ⚠ not Pages, and this said Pages until 2026-08-28.apps/web/wrangler.jsonc declares "main": "./workers/app.ts" with an assets block and no pages_build_output_dir; deploy-web.yml is headed "apps/web → Cloudflare Workers". Three Pages projects were created first; the conversion landed 2026-08-20. Unified identity, data, and analytics across the platform. Frontend is surface-matched (ADR-0011): the public Setu Cards (primary growth/SEO surface) render on a server-rendered React web (DOM) stack; the merchant product app is a universal Expo/React Native codebase (Android native + iOS native, both R1 / responsive web via RNW); admin is DOM web + an installable PWA. Both stacks share the Supabase backend, the platform-agnostic TS core, and one design-token package (see "Frontend platform" below).