Files
Convivo/docs/backend
Lago 1cbbd1b529 Registration optionset + speaker auto-promote + welcome check-in
- registrations.type is now a Postgres ENUM (registration_type)
- session_speakers trigger auto-promotes attendee -> speaker (never overrides staff/sponsor)
- new welcome_checkin RPC: staff marks an attendee present at the event
- admin Registrations: QR token is final (no reset); failed sponsor change opens in-place sponsor lookup
- Convivo Home: Now/Next cards always render; red pending-material pill + popup for speakers
- Convivo Agenda: speakers can delete their material to re-upload
- Convivo Scan: staff Session/Welcome check-in toggle (uiverse switch)
- seed: staff (Bruno/Rita) get a password so staff QR login works after reset
2026-08-23 21:33:44 +02:00
..

Backend — Supabase Core

Convivo has no custom backend. The entire server side is a local Supabase stack (run with the Supabase CLI) plus the schema, RPCs, and RLS that live in Postgres. This folder documents that core.

File What it covers
supabase-core.md The local stack: containers, ports, how to start/reset, config
schema.md All 14 tables, columns, constraints, indexes
rpcs.md The transactional points RPCs (the business logic)
rls.md Row Level Security policies + which key the app uses
interfaces.md Pretix + Sessionize sync (RPCs, sync-trigger Edge Function, mock API)
seed.md Seed data + the demo accounts
docker.md Docker: the app image + root compose (how the core + app run together)

The big picture

Postgres 17  ──  schema (14 tables, multi-event model)
             ──  RLS (who can read/write what)
             ──  RPCs (security definer, transactional points logic)
             ──  sync RPCs (service-role-only Pretix/Sessionize import)
             ──  seed (demo data)
  • Data + logic live in the database. The app never computes points or writes to registrations.points directly — it calls RPCs, and Postgres enforces the rules.
  • RLS is the security boundary. The app uses the anon key + the user's session JWT; RLS decides what that user may see and do. The service-role key is never shipped to the app. See rls.md. The one exception is the interface sync RPCs, which are service_role-only and are called by the sync-trigger Edge Function (which holds the service-role key server-side). See interfaces.md.
  • Points are transactional. Each RPC updates points, inserts the related row, and re-syncs the leaderboard mirror in one transaction, so the leaderboard is always consistent and duplicate actions never double-award. See rpcs.md.

Source of truth