The admin panel is hosted inside the face-app at face.zooly.ai/admin (no separate deployment). It is Cognito-gated and reuses the same zooly-auth SSO + requireAdmin middleware that powers merch-admin.
packages/team-leaderboard/client/src/app/admin/admin-auth.tsx — AdminAuthGate:
GET /api/merch/admin/me.401, redirects to VITE_AUTH_URL for login (with a return-to).SPA deep-linking for /admin/* is handled by apps/face-app/vercel.json.
packages/team-leaderboard/client/src/app/admin/admin-layout.tsx — header + nav + outlet wrapper.packages/team-leaderboard/client/src/lib/admin-api.ts — adminApi() fetch transport (credentials + base URL)./admin in packages/team-leaderboard/client/src/app/routes.tsx.| Page | File | What it does |
|---|---|---|
| Boards list | admin/boards-page.tsx | List boards + "create board" modal |
| Board editor | admin/board-detail-page.tsx | Edit board chrome (title, subtitle, hero images, background color, sponsor) + a table of its teams |
| Team editor | admin/team-detail-page.tsx | Edit a team (name, colors, flag image, face-paint images, search terms, seed count) + the linked store |
| Leads | admin/leads-page.tsx | Paginated lead submissions with a kind filter + search |
Inline-styled components in packages/team-leaderboard/client/src/app/admin/components/ (shared styles in field-styles.ts):
Dropzone.tsx (drag-and-drop via react-dropzone), ImageDropField.tsx (single), MultiImageField.tsx (multi grid). Uploads reuse the shared merch presigned-URL flow (POST /api/merch/upload/presigned-url) via packages/team-leaderboard/client/src/lib/upload.ts (uploadImageToS3()).ColorField.tsx (native swatch + hex input), MultiColorField.tsx (ordered list with add/remove).StorePickerField.tsx: a dialog to select the linked store (campaign) by name/slug, showing the store name and an "Edit store" link to merch-admin (${APP_URL}/admin/merch/campaigns/:id/builder — merch-admin is served by the same backend). Replaces pasting a raw campaign ID.These are wired into both editors — board-detail-page.tsx (background color, sponsor logo, hero images) and team-detail-page.tsx (main color, colors, flag image, face-paint images, store picker).
See API Reference → Admin API for the full list of apps/zooly-app/app/api/merch/admin/* routes.