Phase 2: Admin console (admin.appe.at)

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.
This commit is contained in:
Lago committed 2026-08-22 19:47:22 +02:00
1 parent 0cbfb25714
commit cf70f39903
45 files changed
+4425 -87

No files matched your search

+14 -7
View File
@@ -1,15 +1,22 @@
# Frontend — Attendee PWA
# Frontend
The frontend is a **mobile-first single-page React app** (PWA) in
[`apps/convivo/`](../../apps/convivo/). It is the same app for attendees, staff,
and admins — the user's `role` changes what they see (e.g. the Scan tab becomes a
Check-in tab for staff).
There are **two** React apps, both talking to the same Supabase core through
same-origin paths:
- **Attendee PWA** — a mobile-first single-page app in
[`apps/convivo/`](../../apps/convivo/). The same app for attendees, staff, and
admins — the user's `role` changes what they see (e.g. the Scan tab becomes a
Check-in tab for staff).
- **Admin console** — a desktop-first app in
[`apps/admin/`](../../apps/admin/), guarded to the `admin` role. See
[admin-app.md](./admin-app.md).
| File | What it covers |
|---|---|
| [app-structure.md](./app-structure.md) | Entry, contexts, the event hook, the tab shell, the demo clock |
| [screens.md](./screens.md) | Every screen: Login, Home, Agenda, Scan/Check-in, Connections, Feedback, Leaderboard, Profile |
| [app-structure.md](./app-structure.md) | Attendee app: entry, contexts, the event hook, the tab shell, the demo clock |
| [screens.md](./screens.md) | Attendee app: Login, Home, Agenda, Scan/Check-in, Connections, Feedback, Leaderboard, Profile |
| [api-client.md](./api-client.md) | The typed API wrapper + how the app talks to Supabase (auth, REST, realtime) |
| [admin-app.md](./admin-app.md) | Admin console: views, the admin auth guard, QR reset, points, schedule |
## Tech