Appearance
Glossary
| Term | Meaning |
|---|---|
| Tier | Top-level access boundary under src/tiers/: landing, user, admin, public. Features live in their tier and are lazy-loaded. |
| Feature | A self-contained unit under tiers/{tier}/features/{name}/ with pages/ components/ hooks/ services/ utils/ tests/ (+ TS-first types/ schemas/ constants/). |
| Pillar | One of the three products: Interaction (QRSetu), Presence (Studio / My Setu), Aggregation (BioLink). |
| RPC | A Postgres function called via supabase.rpc('get_…') from a hook. Read-only path. SECURITY DEFINER + SET search_path = public. |
| Edge Function (EF) | A Deno/TypeScript function called via supabase.functions.invoke() from a service. Handles writes, secrets, external HTTP, multi-step work. |
| Type A EF | User-facing edge function; requires JWT (requireAuth/requireAdmin, or optionalAuth for public-capable). Named domain-action. |
| Type B EF | Cron/internal edge function; deployed --no-verify-jwt. Named domain-noun-verb (e.g. public_page_ops_*). |
| Webhook EF | HMAC signature + timestamp window + constant-time compare + idempotency via a UNIQUE event id. |
| RLS | Row-Level Security. Defense-in-depth on every user-facing table; the EF is the primary write-enforcement layer — both always required. |
_shared kit | Shared EF utilities: cors.ts, auth.ts, errors.ts, response.ts, logging.ts, plus error-handler.ts, database.ts, cloudflare.ts, config-cache.ts, retry.ts. |
EDGE_FN map | Per-feature config map of Edge Function names (UPPER_SNAKE_CASE keys) — EF names are never inline strings. |
| UI Hybrid System | Two-layer UI: global primitives in src/components/ui/ + per-tier overrides in tiers/{tier}/components/ui/ that wrap the global. |
cn() | Class-composition helper used with the isLight theme guard for centralised light/dark theming. |
isLight | Boolean theme flag driving component-first dark/light theming — never per-page branching. |
| Expand-contract | The only safe migration shape: add-nullable → backfill → switch → drop. Never a breaking change in one step. |
| Strangler-fig | The retrofit strategy: new code meets the standard now; existing code is migrated feature-by-feature with parity verification. |
docs:gen | node tools/generate-docs.js — regenerates the auto-generated reference pages of this portal (currently the EF index). |
| QRS-### | A permanent tracker id for every confirmed issue / risk / debt / improvement. See the Dev Tracker. |
| Promotion | Deliberately applying every migration / EF / secret / storage / cron change to both Supabase projects (Dev first, then Prod). |
| Green baseline | Phase 0.4 milestone: type-check, lint, test, build all clean — the first time these tools ran against installed deps. |