Existing-sponsor link + remove Interfaces (Pretix/Sessionize)
- Sponsor lookup popup can now link an existing sponsor (dropdown + pre-fill) or create a new one; save upserts the sponsor linked to the contact and sets the registration type to sponsor. - Remove the Interfaces feature end-to-end: admin nav button + Sync view, sync API helpers + SyncRun type, sync-trigger Edge Function, mock-api + its docker-compose service, and a migration dropping the sync RPCs, helpers, and sync_runs table. - Update docs (architecture, backend, frontend, README, roadmap, next-steps). 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]>
This commit is contained in:
1 parent
ffb270c140
commit
24909cf8ab
27 files changed
+147
-1150
No files matched your search
+32
-54
@@ -4,7 +4,7 @@ What's done, what's next, and the open decisions. The full roadmap lives in the
|
||||
root [`roadmap.md`](../roadmap.md); this file is the working detail for the
|
||||
current phase.
|
||||
|
||||
> **Current state:** Phases 0–8 are complete and verified, plus five polish
|
||||
> **Current state:** Phases 0–6 are complete and verified, plus six polish
|
||||
> rounds: **Fixes & Refinements** (QR token moved to the registration, role-pill
|
||||
> capitalization, connection detail sheet + red-dot recalc, admin schedule
|
||||
> speaker multi-select + upload/speaker bug fixes, sponsor contact search),
|
||||
@@ -13,14 +13,17 @@ current phase.
|
||||
> password sync** (setting `contacts.password` auto-syncs the Auth password;
|
||||
> staff excluded from the leaderboard; Home/Agenda/Profile identical for all
|
||||
> roles), **Convivo staff QR login** (a staff QR asks for the staff password, not
|
||||
> an email), and **Registration optionset + speaker promote + welcome check-in**
|
||||
> an email), **Registration optionset + speaker promote + welcome check-in**
|
||||
> (`registrations.type` is now a Postgres enum; adding a speaker auto-promotes
|
||||
> their registration to `speaker`; staff can do a Welcome check-in that marks an
|
||||
> attendee present at the event; the admin QR token is final (no reset) and a
|
||||
> failed sponsor change opens an in-place sponsor lookup; speakers see a red
|
||||
> pending-material pill on Home and can delete their material to re-upload).
|
||||
> Remaining work is cross-cutting (real event clock, deployment, testing) and
|
||||
> the open questions in [backend/interfaces.md](./backend/interfaces.md).
|
||||
> pending-material pill on Home and can delete their material to re-upload), and
|
||||
> **Existing-sponsor link + Interfaces removal** (the in-place sponsor lookup can
|
||||
> now link an existing sponsor, not just create one; the Pretix/Sessionize
|
||||
> "Interfaces" feature — admin view, `sync-trigger` Edge Function, mock API, and
|
||||
> the `sync_runs` table + sync RPCs — is removed).
|
||||
> Remaining work is cross-cutting (real event clock, deployment, testing).
|
||||
|
||||
## Done
|
||||
|
||||
@@ -152,45 +155,31 @@ rebuilt the views on the new model:
|
||||
- `https://www.appe.at/assets/appe_full.png` as favicon + PWA icon (192/512)
|
||||
for **both** apps. Updated `index.html` + `manifest.webmanifest` + `public/`.
|
||||
|
||||
## The Interfaces (Phases 7–8) — ✅ complete
|
||||
## Existing-sponsor link + Interfaces removal — ✅ complete
|
||||
|
||||
Both external interfaces are built and browser-verified end-to-end (against the
|
||||
local mock API). Full detail: [backend/interfaces.md](./backend/interfaces.md).
|
||||
A polish round (migration `20260830000000_remove_interfaces.sql` + app changes),
|
||||
all browser-verified.
|
||||
|
||||
### Phase 7 — Pretix interface ✅
|
||||
Sync **tickets → contacts + registrations** from [Pretix](https://pretix.eu).
|
||||
**In-place sponsor lookup can link an existing sponsor.**
|
||||
- The sponsor lookup popup (opened when a registration is set to `sponsor` with
|
||||
no sponsor yet) now lists the event's existing sponsors in a dropdown. Picking
|
||||
one pre-fills the form (type, name, email, phone, amount, paid) and the save
|
||||
button reads **Link sponsor & set type**; leaving it on **— Create new —**
|
||||
keeps the original create flow. On save it upserts the sponsor linked to the
|
||||
contact's email, then sets the registration type to `sponsor`.
|
||||
|
||||
- **`sync-trigger` Edge Function** pulls `GET /pretix/attendees`, normalizes, and
|
||||
calls the service-role-only `sync_pretix_attendees(jsonb)` RPC.
|
||||
- **Upserts** `contacts` (by email) + `registrations` (by event + contact) +
|
||||
`auth.users` (QR token = password). **Generates a QR token** for new ticket
|
||||
holders so they can log in.
|
||||
- **Type mapping** — `_map_ticket_type` maps the Pretix ticket type to
|
||||
`attendee` / `speaker` / `staff` / `sponsor` (substring match; sponsor
|
||||
auto-creates a sponsor row).
|
||||
- **Idempotent** — keyed on `external_id` (Pretix order code) + email; re-runs
|
||||
update in place.
|
||||
- **QR export** — the APPE Admin **Interfaces** view exports a CSV of lanyard QR
|
||||
codes for the active event.
|
||||
|
||||
### Phase 8 — Sessionize interface ✅
|
||||
Sync the **real agenda** (slots, sessions, speakers, rooms) from
|
||||
[Sessionize](https://sessionize.com).
|
||||
|
||||
- The same Edge Function pulls `GET /sessionize/sessions` and calls the
|
||||
service-role-only `sync_sessionize_sessions(jsonb)` RPC.
|
||||
- **Slots** are matched/created by `(event, date, start, end)`; **sessions** are
|
||||
upserted by `external_id` (Sessionize id); **speakers** are upserted as
|
||||
contacts + `session_speakers` links.
|
||||
- **Idempotent** — keyed on `external_id`; re-runs update in place.
|
||||
|
||||
### Shared plumbing (both phases)
|
||||
- **`sync_runs`** audit table (admin-only read) records every run; the
|
||||
Interfaces view shows the last 8.
|
||||
- **`mock-api`** Docker service (`interfaces/mock-api/`, :54330) serves the real
|
||||
API shapes from fixtures so the pipeline is testable without credentials.
|
||||
- **Auth** — the Edge Function accepts an admin JWT (verified via `is_admin()`)
|
||||
or a `CRON_SECRET` header for scheduled runs.
|
||||
**The Pretix/Sessionize "Interfaces" feature is removed.**
|
||||
- **Admin UI** — the **Interfaces** nav button + `Sync.tsx` view are gone; the
|
||||
sync API helpers (`triggerSync`, `getSyncRuns`, `exportQrCsv`, `SyncResult`)
|
||||
and the `SyncRun` type are removed from the admin client.
|
||||
- **Edge Function** — `supabase/functions/sync-trigger/` is deleted.
|
||||
- **Mock API** — `interfaces/mock-api/` and its `docker-compose.yml` service are
|
||||
deleted.
|
||||
- **DB** — migration `20260830000000_remove_interfaces.sql` drops the
|
||||
`sync_pretix_attendees` / `sync_sessionize_sessions` RPCs, the
|
||||
`_ensure_auth_user` / `_map_ticket_type` helpers, and the `sync_runs` table.
|
||||
The `external_id` columns are kept (harmless, nullable, reserved for a future
|
||||
external system).
|
||||
|
||||
## Fixes & Refinements — ✅ complete
|
||||
|
||||
@@ -336,7 +325,7 @@ Migration `20260829000000_registration_type_optionset_speaker_promote_welcome_ch
|
||||
`checkin_attendee`) and **Welcome check-in** (`welcome_checkin`).
|
||||
|
||||
**Admin Registrations: final QR token + in-place sponsor lookup.**
|
||||
- The **Reset token** button is gone — the token is final (generated by Pretix).
|
||||
- The **Reset token** button is gone — the token is final (generated per event).
|
||||
The QR modal now says "This token is final…".
|
||||
- Setting a type to **Sponsor** when no sponsor lookup exists opens an
|
||||
**in-place sponsor popup** (create the sponsor linked to the contact, then set
|
||||
@@ -374,19 +363,8 @@ Migration `20260829000000_registration_type_optionset_speaker_promote_welcome_ch
|
||||
|
||||
## Open decisions (need user input)
|
||||
|
||||
**Resolved in Phases 7–8:**
|
||||
- **Sync runtime** — Supabase **Edge Function** (`sync-trigger`), not a separate
|
||||
container. Keeps the "no custom backend" philosophy.
|
||||
- **Sync style** — **pull** (on-demand from the APPE Admin Interfaces view +
|
||||
cron-ready via `CRON_SECRET`). Webhooks are a later add-on.
|
||||
- **Credentials** — env-configured (`PRETIX_*` / `SESSIONIZE_*`), with a local
|
||||
**mock API** for testing. Real tokens are set as Edge Function secrets.
|
||||
|
||||
**Still open:**
|
||||
1. **Pretix type mapping** — confirm the ticket-type → registration-type mapping
|
||||
(the substring matcher is a reasonable default).
|
||||
2. **Sync cadence** — how often to pull (pre-event vs during the event)?
|
||||
3. **AI provider** — which LLM/API for `ai_generated_feedback` (the admin
|
||||
1. **AI provider** — which LLM/API for `ai_generated_feedback` (the admin
|
||||
"Evaluate" button is still a stub).
|
||||
4. **Deployment target** — stay on localhost, or plan for the `appe.at`
|
||||
subdomains now?
|
||||
|
||||
Reference in new issue
Block a user