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:
1 parent
015c0a3a06
commit
32c86767ef
45 files changed
+4425
-87
No files matched your search
+32
-5
@@ -9,14 +9,18 @@
|
||||
# (supabase_network_<project_id>; here: supabase_network_Convivo) and a Kong
|
||||
# container (supabase_kong_Convivo) that fronts the API on port 54321.
|
||||
#
|
||||
# This compose file runs the attendee app as a sidecar that JOINS that network
|
||||
# and proxies the Supabase same-origin paths to the Kong container.
|
||||
# This compose file runs the attendee app (:3000) and the admin app (:3001) as
|
||||
# sidecars that JOIN that network and proxy the Supabase same-origin paths to
|
||||
# the Kong container.
|
||||
#
|
||||
# 1. npm run db:start # start the Supabase core (CLI)
|
||||
# 2. docker compose up --build # build + run the app on :3000
|
||||
# 2. docker compose up --build # build + run both apps
|
||||
#
|
||||
# Then open http://localhost:3000 and log in with a demo QR code
|
||||
# (e.g. CVV-ANA-4821 / [email protected]).
|
||||
# Then open:
|
||||
# - http://localhost:3000 (attendee app) — log in with a demo QR code
|
||||
# (e.g. CVV-ANA-4821 / [email protected])
|
||||
# - http://localhost:3001 (admin app) — log in as admin
|
||||
# (CVV-ADM-0001 / [email protected])
|
||||
|
||||
name: convivo
|
||||
|
||||
@@ -49,6 +53,29 @@ services:
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
convivo-admin:
|
||||
build:
|
||||
context: ./apps/admin
|
||||
args:
|
||||
# Standard local Supabase anon key (not a secret). Override if needed.
|
||||
VITE_SUPABASE_ANON_KEY: ${VITE_SUPABASE_ANON_KEY:-eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJzdXBhYmFzZS1kZW1vIiwicm9sZSI6ImFub24iLCJleHAiOjE5ODM4MTI5OTZ9.CRXP1A7WOeoJeXxjNni43kdQwgnWNReilDMblYTn_I0}
|
||||
image: convivo-admin:latest
|
||||
container_name: convivo-admin
|
||||
ports:
|
||||
- "3001:3001"
|
||||
environment:
|
||||
# Same proxy target as the attendee app (Kong on the shared network).
|
||||
SUPABASE_PROXY_TARGET: ${SUPABASE_PROXY_TARGET:-supabase_kong_Convivo:8000}
|
||||
networks:
|
||||
- supabase
|
||||
restart: unless-stopped
|
||||
healthcheck:
|
||||
test: ["CMD", "wget", "-qO-", "http://127.0.0.1:3001/"]
|
||||
interval: 15s
|
||||
timeout: 5s
|
||||
retries: 5
|
||||
start_period: 10s
|
||||
|
||||
networks:
|
||||
supabase:
|
||||
# External network created by `supabase start`. Name = supabase_network_<project_id>.
|
||||
|
||||
Reference in new issue
Block a user