Admin Setup Guide — real walkthrough + completion tracking
What & Why
A SuperAdmin page at already exists, but it only shows a read-only env-var / integration status board. New SuperAdmins still have no guided first-run walkthrough for the academy itself: setting pricing, defining coach roles, creating the first event, configuring league/season basics, etc. This task turns that page into a real Admin Setup Guide with a must-do checklist that automatically tracks completion as the admin does the work elsewhere in the app.
Done looks like
- (kept under "Admin & Operations" → "Setup Guide" in the SuperAdmin nav, same nav key) now shows two stacked sections:
1. A new
Setup checklist with the must-do academy configuration steps (e.g. set pricing, add coach roles, create the first event, set the first season, invite at least one coach). Each row shows: title, one-line description, status (Done / Not yet), a "Go to it" deep-link button to the right page in the app, and a manual "Mark done" / "Mark not done" toggle so steps that can't be auto-detected still get tracked. 2. The existing
Environment & Integrations status board, unchanged, rendered below.
- Each checklist row auto-detects completion from existing data where possible (e.g. "Add coach roles" auto-completes when at least one coach role exists). Steps that can't be auto-detected fall back to a per-academy manual flag.
- An overall progress header at the top of the page: "X of N steps complete" with a progress bar.
- A "Hide this guide" affordance — once all required steps are complete (auto-detected + manual), the admin can dismiss the checklist; it stays hidden unless they re-open it from a small "Show setup guide" link on the same page.
- A Newsroom / Command Center-style "What's next?" empty state when everything is done.
- Manual completion + dismissal state is persisted server-side per academy (not per user) so a second SuperAdmin sees the same progress.
Out of scope
- Per-user checklists (this is one shared academy-level setup guide).
- Onboarding walkthroughs for non-SuperAdmin roles (coach onboarding already lives at ; member onboarding has its own page).
- Editing pricing / roles / events from inside this page — the "Go to it" buttons deep-link to the existing dedicated pages.
- Wizard / multi-step modal flow — this is a checklist, not a wizard.
- New env-var or integration items in the bottom status board (already covered by the existing ).
Steps
1.
Schema for manual completion + dismissal — Add a small singleton-row table (or extend the existing academy-settings row, whichever fits) holding: per-step timestamps (keyed by stable step id) and a timestamp. SuperAdmin-only writes. 2.
Backend setup-status endpoint — New SuperAdmin-only endpoint that returns the canonical step list with, for each step: id, title, description, deep-link path, whether it's auto-detected, current auto-detected status (computed from existing data), current manual status, and the effective Done/Not-yet status. Also returns the overall counts and the dismissed-at timestamp. Define the step list in one shared module so the same ids are used on both sides. 3.
Backend setup-status mutation endpoints — Two small SuperAdmin-only endpoints: one to toggle a step's manual completion (only honoured for non-auto-detected steps), one to set / clear the dismissed-at timestamp. 4.
Rewrite the Admin Setup Guide page — Keep the existing route and nav key. Render a header with the progress bar, the new checklist section (auto-detect status pill + manual toggle button + deep-link "Go to it" button per row, grouped by purpose), then the existing Environment & Integrations status board below. Add the dismiss / re-show affordance. Use existing shadcn primitives and follow Command Center styling conventions. 5.
Empty / completion states — When dismissed, the checklist collapses to a single "Setup complete — show again" line above the env board. When not dismissed but every step is done, show a celebratory "All set" card with a "Hide this guide" button.
Relevant files
- - - - -
No comments:
Post a Comment