A desktop-first React app for organizers, guarded to the admin role. Backend (supabase/migrations/20260823000000_admin_app.sql): - Admin-only SELECT policies on preferences, connections, feedback - reset_qr_token RPC: regenerates a lanyard token, re-hashes it as the Auth password (old token stops working), and clears the attendee's sessions to force re-login App (apps/admin, port 3001): - Login: same QR+email flow, but non-admin sessions are rejected - Dashboard: live stats + top points + recent activity - Attendees: search, edit name/company/role, reset QR, adjust points - Schedule: manage slots + sessions (create/edit/delete) - Activity: check-ins / connections / feedback tables - Same-origin proxy (Vite dev / nginx in Docker), same design tokens Docker + scripts: - convivo-admin service in docker-compose.yml (:3001) - admin:dev / admin:build root scripts - fixed db:reset script (supabase reset -> supabase db reset) Docs: new frontend/admin-app.md; updated architecture, rls, rpcs, docker, next-steps, and READMEs. Verified: build clean, all views + flows browser-tested, Docker build + proxy + login + admin guard confirmed. DB reset to clean seed. 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]>
114 lines
5.3 KiB
Markdown
114 lines
5.3 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 + Phase 2 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 3 (Pretix).
|
|
|
|
## 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).
|
|
|
|
### Phase 2 — Admin app (admin.appe.at) ✅
|
|
A separate desktop-first web app for event organizers, using the **admin** role
|
|
(which has direct write access to `profiles` / `slots` / `sessions` via RLS — see
|
|
[backend/rls.md](./backend/rls.md)).
|
|
|
|
- **Login** — same QR + email flow, but guarded: non-admin accounts are signed
|
|
out and rejected ("This account is not an admin").
|
|
- **Dashboard** — live stats (attendees, check-ins, connections, avg rating,
|
|
sessions) + top points + recent activity.
|
|
- **Attendees** — searchable table; edit name/company/role, view + **reset QR
|
|
token** (new `reset_qr_token` RPC), **adjust points** (via `adjust_points`).
|
|
- **Schedule** — manage slots + sessions (create/edit/delete).
|
|
- **Activity** — check-ins, connections, and feedback tables.
|
|
- Same-origin proxy to Supabase (Vite dev on :3001 / nginx in Docker).
|
|
- Docker: `convivo-admin` service on :3001, same network + proxy pattern.
|
|
- All views + flows browser-tested; Docker build + proxy + login verified.
|
|
- Details: [frontend/admin-app.md](./frontend/admin-app.md).
|
|
|
|
## Next
|
|
|
|
### Phase 3 — Pretix interface ⬜ (next)
|
|
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. **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)).
|