Files
Convivo/docs/next-steps.md
T

110 lines
4.9 KiB
Markdown

# Next Steps
What's done, what's next, and the open decisions. Phase order:
**0** Supabase core → **1** attendee app → **2** admin app → **3** Pretix
interface → **4** Sessionize interface.
> **Renumbered:** the admin app is now **Phase 2** (built before the ticketing
> sync), and the Pretix interface is **Phase 3**. (Originally the whiteboard had
> Pretix as Phase 2 and the admin app as Phase 3.)
> **Current state:** Phase 0 + Phase 1 are **complete and verified** (browser-
> tested end-to-end, Docker-verified, pushed to `git.lago.dev/Lago/Convivo.git`).
> Per the working agreement, we **stop here** and let the user evaluate before
> starting Phase 2.
## Done
### Phase 0 — Dockerized Supabase core ✅
- Full schema (9 tables), RLS on every table, transactional points RPCs.
- Seed: 6 slots, 18 sessions, 13 demo users (QR token = auth password).
- Runs via the Supabase CLI (`supabase start` / `supabase db reset`).
- Details: [backend/README.md](./backend/README.md).
### Phase 1 — Attendee web PWA ✅
- Login (QR + email, no email sent), Home, Agenda, Scan/Connect, staff Check-in,
Feedback, live Leaderboard, Profile.
- Same-origin proxy to Supabase (Vite dev / nginx in Docker).
- Docker: multi-stage build → nginx sidecar on the Supabase network.
- All flows browser-tested; Docker build + proxy + login verified.
- Details: [frontend/README.md](./frontend/README.md).
## Next
### Phase 2 — Admin app (admin.appe.at) ⬜ (next)
A separate web app for event organizers, using the **admin** role (which already
has direct write access to `profiles` / `slots` / `sessions` via RLS — see
[backend/rls.md](./backend/rls.md)).
Likely scope:
- Manage **attendees** (view, edit role/company, reset QR, adjust points via
`adjust_points`).
- Manage **schedule** (slots + sessions) — create/edit/delete.
- **Live overview** — who's checked in, connection activity, leaderboard.
- Reuse the same Supabase core + anon/service key pattern; a new `apps/admin`
PWA.
### Phase 3 — Pretix interface ⬜
Sync **tickets → attendees** from [Pretix](https://pretix.eu) (the ticketing
system). This replaces the hand-written seed with real ticket data.
**Goal:** when someone buys a ticket in Pretix, a Convivo attendee is created
with a QR token and the right role/company.
Likely scope:
- A **sync job / edge function** (or a small service) that pulls orders/attendees
from the Pretix API and upserts `profiles` + `auth.users`.
- **QR token generation** for each attendee (the token that goes on the lanyard).
- **Role mapping** — which Pretix ticket type maps to `attendee` / `staff` /
`admin` (open question, see below).
- **Idempotency** — re-running the sync must not duplicate attendees (key on the
Pretix order/attendee id).
- A way to **print/export lanyard QR codes** for the event.
**Open questions:**
1. Which Pretix fields map to `role` and `company`?
2. Push (webhook on new order) vs pull (scheduled sync)?
3. Where does the sync job run (Supabase Edge Function vs a separate container)?
### Phase 4 — Sessionize interface ⬜
Sync the **real agenda** (slots, sessions, speakers, rooms) from
[Sessionize](https://sessionize.com) instead of the hand-written seed.
Likely scope:
- A sync job that pulls the event schedule from the Sessionize API and upserts
`slots` + `sessions`.
- Map Sessionize track/room/time → our `slots` / `sessions` shape.
- This makes the agenda **data-driven** from the real event (the schedule is
already stored in Postgres, so the app needs no changes).
## Cross-cutting / later
- **Real event clock** — replace the simulated `DEFAULT_NOW`
([frontend/app-structure.md#the-event-clock](./frontend/app-structure.md#the-event-clock))
with `new Date()` for the live event.
- **Subdomains** — `convivo.appe.at`, `admin.appe.at`, `db.appe.at` don't exist
yet; everything is on localhost. DNS + TLS + a reverse proxy in front of the
Supabase core will be needed for a real deployment.
- **Push notifications** — connection requests are currently seen when the app
is opened. (Out of scope for v1.)
- **Testing** — no automated tests yet. Candidates: RPC unit tests (points
idempotency, role guards), and an E2E smoke test (login → check-in →
leaderboard).
## Open decisions (need user input)
1. **Pretix role mapping** — which ticket type = staff/admin?
2. **Sync style** — webhook (push) vs scheduled (pull) for Pretix/Sessionize?
3. **Sync runtime** — Supabase Edge Functions vs separate containers?
4. **Admin app scope** — which admin features are must-haves for the event?
5. **Deployment target** — stay on localhost, or plan for the `appe.at`
subdomains now?
## How to pick up work
1. Read [architecture.md](./architecture.md) for the system overview.
2. For a phase, read the relevant component docs (backend or frontend) and the
source of truth files they link to.
3. Keep the docs updated in the same change that changes behavior (see the
conventions in [README.md](./README.md)).