Phase 3: admin magic-link auth and event setup screens
- /login sends a Supabase magic link (admin emails only); /auth/confirm completes sign-in; proxy.ts guards /admin and every server action re-checks with requireAdmin(), since actions are plain POST endpoints. - /admin lists, creates, duplicates and deletes events. - /admin/events/[eventId] edits teams (colour, order) and games with criteria, presets and notes. All input goes through zod schemas that mirror the database constraints so errors read as plain sentences. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
+1
-1
@@ -21,7 +21,7 @@ human a short "how to test this manually" checklist. Don't start the next phase
|
||||
**Done when:** tests green, 100% branch coverage on the scoring module.
|
||||
|
||||
## Phase 3 — Admin auth + setup screens
|
||||
- `/login` magic link; middleware guards `/admin/*` with `ADMIN_EMAILS`.
|
||||
- `/login` magic link; `proxy.ts` guards `/admin/*` with `ADMIN_EMAILS`.
|
||||
- Events list + create/duplicate/delete.
|
||||
- Event setup: teams CRUD (colour picker, reorder), games builder with criteria + presets, notes.
|
||||
**Done when:** I can build a "Worship Game Night" with 4 teams and a Karaoke game with 5 criteria (1–5) and a Guess the Lyric game with 1 number criterion.
|
||||
|
||||
Reference in New Issue
Block a user