Files
fbc827c2b8 feat: finalize ticket merging and speaker-aware imports
Co-authored-by: Stephan Charles <[email protected]>
Co-authored-by: Amelia Hernandez <[email protected]>
Co-authored-by: Markus Franz <[email protected]>
Co-authored-by: Sabrina Hota <[email protected]>
Co-authored-by: Nilüfer Doğan <[email protected]>
2026-10-10 13:28:18 +02:00

5.7 KiB
Raw Permalink Blame History

Seed Data & Demo Accounts

Source of truth: supabase/seed.sql. The seed runs on npm run db:reset and is idempotent (on conflict ... do nothing / do update).

The seed uses real data from a past event — the Global Power Platform Bootcamp (Austria) — instead of random demo data:

  • The agenda (slots + sessions) comes from the event's Sessionize public API (…/api/v2/4domszaq/view/All): 22 sessions on 2026-02-20 (18 talks + 4 service sessions: coffee break, lunch, a partner session, and the closing).
  • The speakers are not seeded — they are imported from the Sessionize "Sessions and speakers (advanced)" .xlsx via the admin Interfaces → Import Excel control (see sidecar.md). That import creates the speaker contacts, links them to sessions, and creates their speaker registrations (matched by email).

What it creates

Data Count Notes
auth.users + auth.identities 4 Staff only; appe-admin-2026 (staff password)
contacts 4 Staff only (is_admin = true, password = 'appe-admin-2026')
events 1 Global Power Platform Bootcamp | Austrian Power Platform Enthusiasts Edition, 2026-02-20, Vienna, Austria, active, sessionize_endpoint set to https://sessionize.com/api/v2/4domszaq/view/All
registrations 4 Staff only; each with a staff QR token
slots 10 2026-02-20, 09:15–17:00 (7 session + 3 service_session)
sessions 22 real titles/descriptions/rooms from the Sessionize API
session_speakers 0 added by the Excel import (not seeded)
sponsors 0 none for this event

No synthetic attendees or artificial starting points are seeded. Attendee registrations come from purchased Pretix tickets. Removing fixtures from the seed does not delete accounts already present in a database; do not reset a live database to apply this change.

Speaker contacts are intentionally absent. After db:reset, run the Excel import (Interfaces → Import Excel → choose the .xlsx → Import) to add the 21 speakers: their contacts, session links, and speaker registrations.

GoTrue gotcha: manually-inserted auth.users must have confirmation_token, recovery_token, email_change_token_new, and email_change set to '' (empty string), not NULL — GoTrue's password grant can't scan a NULL confirmation_token. phone is left NULL (unique constraint).

Staff = admin (merged). The four staff have is_admin = true on their contacts row (so they can open the APPE Admin console and generate the Sessionize export) and their registration type is staff.

Slots (2026-02-20)

Type Time
session 09:15–10:00 (keynote)
service_session 10:00–10:30 (coffee break)
session 10:30–11:15
session 11:15–12:00
service_session 12:00–13:00 (lunch)
session 13:00–13:45
session 13:45–14:30
session 14:30–15:15
session 15:15–16:00
service_session 16:00–17:00 (partner session + closing)

type is the slot_type enum (session / service_session) — see schema.md.

Demo accounts

Attendees log in with QR code (typed or scanned) + email — the QR token is the Auth password. Staff log in with QR code + their staff password in the Convivo app. The Admin console uses only email magic links. All four staff share the password appe-admin-2026 (stored in contacts.password, auto-synced to auth.users.encrypted_password by the trg_contact_password_sync trigger).

Existing default password: any @appe.at contact is an admin and retains appe-admin-2026 for Convivo staff password login. The trg_contacts_appe_at_admin trigger sets contacts.password = 'appe-admin-2026' (when null) on insert/update, and the auth-user-creation helpers hash it into auth.users.encrypted_password. Admin magic-link login neither uses nor changes these passwords. A custom password set on the contact row is always respected (never overwritten). See migration 20260910000000_admin_default_password.sql.

Person Type Email Convivo Login
Amelia Hernandez staff (admin) [email protected] appe-admin-2026
Sabrina Hota staff (admin) [email protected] appe-admin-2026
Jose Lago staff (admin) [email protected] appe-admin-2026
Markus Franz staff (admin) [email protected] appe-admin-2026

Speaker auto-promote: the Excel import creates the speakers' registrations as speaker directly (and the session_speakers_speaker_promote trigger promotes any attendee that gets linked). The seed itself contains no speakers — only the 4 staff.

Suggested demo flow

  1. Log in as Amelia (staff/admin) in the admin app using an email magic link for [email protected] → Dashboard shows the real event (4 registrations, 22 sessions).
  2. Interfaces → Import Excel → choose the "Sessions and speakers (advanced)" .xlsx → Import → the result modal shows the speakers created, sessions updated, speaker links, and speaker registrations created.
  3. Schedule → slots now show Session / Service Session types and the sessions list their speakers.
  4. Events → the event's Sessionize endpoint is set; the Sync button runs the (keyless) API sync.
  5. Sync purchased tickets from Pretix, then log in as an attendee in the Convivo app using their ticket QR and email → Home/Agenda show the real agenda.