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.

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:
committed 2026-08-22 19:47:22 +02:00
1 parent 015c0a3a06
commit 32c86767ef
45 files changed
+4425 -87

No files matched your search

+11 -7
View File
@@ -4,8 +4,8 @@ Living documentation for **Convivo** — a conference networking app that turns
conference into a game. This folder is the single source of truth for *how the
system works*; the root [`README.md`](../README.md) is the quick-start.
> **Status:** Phase 0 (Dockerized Supabase core) + Phase 1 (attendee web PWA)
> are complete and verified. Phases 2–4 are planned — see
> **Status:** Phase 0 (Dockerized Supabase core) + Phase 1 (attendee web PWA) +
> Phase 2 (admin console) are complete and verified. Phases 3–4 are planned — see
> [next-steps.md](./next-steps.md).
## Where things live
@@ -20,11 +20,12 @@ system works*; the root [`README.md`](../README.md) is the quick-start.
| Row Level Security policies | [backend/rls.md](./backend/rls.md) |
| Seed data + demo accounts | [backend/seed.md](./backend/seed.md) |
| Docker (app image + compose) | [backend/docker.md](./backend/docker.md) |
| **Frontend (attendee PWA) — overview** | [frontend/README.md](./frontend/README.md) |
| App structure, state, contexts, routing | [frontend/app-structure.md](./frontend/app-structure.md) |
| Every screen (Login, Home, Agenda, Scan, …) | [frontend/screens.md](./frontend/screens.md) |
| **Frontend — overview (both apps)** | [frontend/README.md](./frontend/README.md) |
| Attendee app: structure, state, contexts, routing | [frontend/app-structure.md](./frontend/app-structure.md) |
| Attendee app: every screen (Login, Home, Agenda, Scan, …) | [frontend/screens.md](./frontend/screens.md) |
| API client (how the app talks to Supabase) | [frontend/api-client.md](./frontend/api-client.md) |
| **What's next (Phase 2/3/4 + open items)** | [next-steps.md](./next-steps.md) |
| **Admin console** (views, auth guard, QR reset, points, schedule) | [frontend/admin-app.md](./frontend/admin-app.md) |
| **What's next (Phase 3/4 + open items)** | [next-steps.md](./next-steps.md) |
## Reading order
@@ -35,6 +36,7 @@ system works*; the root [`README.md`](../README.md) is the quick-start.
[backend/rls.md](./backend/rls.md).
3. **Working on the UI?** Go to [frontend/app-structure.md](./frontend/app-structure.md)
→ [frontend/screens.md](./frontend/screens.md) → [frontend/api-client.md](./frontend/api-client.md).
For the admin console, read [frontend/admin-app.md](./frontend/admin-app.md).
4. **Planning the next phase?** Read [next-steps.md](./next-steps.md).
## Conventions
@@ -45,7 +47,9 @@ system works*; the root [`README.md`](../README.md) is the quick-start.
- **Code is the source of truth.** If a doc and the code disagree, the code wins —
fix the doc. Key files:
- Schema + RPCs + RLS: [`supabase/migrations/20260822000000_init.sql`](../supabase/migrations/20260822000000_init.sql)
- Admin app migration (admin read RLS + `reset_qr_token`): [`supabase/migrations/20260823000000_admin_app.sql`](../supabase/migrations/20260823000000_admin_app.sql)
- Seed: [`supabase/seed.sql`](../supabase/seed.sql)
- App source: [`apps/convivo/src/`](../apps/convivo/src/)
- Attendee app source: [`apps/convivo/src/`](../apps/convivo/src/)
- Admin app source: [`apps/admin/src/`](../apps/admin/src/)
- **Keep it current.** Update the relevant doc in the same change that changes the
behavior it describes.