How malicknnd/school-admin works
School Manager Platform Admin is a SUPER_ADMIN-only frontend for platform oversight, separate from the school-facing application. The main workflow is sign-in, then dashboard review and school administration: browse/search schools, inspect a school and its derived administrator accounts, or create a school with an administrator. The README also documents status, password-reset, and hard-delete actions on school details. The sampled source shows the session, API client, school hooks, and detail-page derivation; connections for unsampled dashboard and some auth internals are limited to documented or indexed evidence.
Main entry points: routes Route entrypoints · schools.index.tsx School listing · schools.$id.tsx School detail · hooks.ts Auth hooks
Components 22
Portal navigation
- Route entrypoints
src/routes - Platform shell
src/components/layout/PlatformShell.tsx - Dashboard
src/routes/dashboard.tsx - Loading and errors
src/components/layout/StateBlocks.tsx
Identity and session
- Login page
src/routes/login.tsx - Auth hooks
src/features/auth/hooks.ts - Login API
src/features/auth/api.ts - Auth context
src/features/auth/AuthContext.tsx - Local session
src/lib/session.ts
School administration
- School listing
src/routes/schools.index.tsx - Schools table
src/features/schools/components/SchoolsTable.tsx - School detail
src/routes/schools.$id.tsx - School creation
src/features/schools/components/CreateSchoolForm.tsx - School hooks
src/features/schools/hooks.ts - School API
src/features/schools/api.ts
Platform data
- API client
src/lib/apiClient.ts - User hooks
src/features/users/hooks.ts - User API
src/features/users/api.ts - Account derivation
src/features/users/derive.ts - Dashboard statistics
src/features/dashboard/stats.ts
Other components
- SUPER_ADMIN
- Backend API
Connections 29
- SUPER_ADMIN → Login page: signs in
- Login page → Auth hooks: submits credentials
src/routes/login.tsx - Auth hooks → Login API: calls login
src/features/auth/hooks.ts - Auth hooks → Auth context: uses auth state
src/features/auth/hooks.ts - Auth context → Local session: reads session
src/features/auth/AuthContext.tsx - Login API → Backend API: posts login
- API client → Local session: gets token
src/lib/apiClient.ts - API client → Backend API: sends requests
- Route entrypoints → Dashboard: routes to
src/routeTree.gen.ts - Route entrypoints → Login page: routes to
src/routeTree.gen.ts - Route entrypoints → School listing: routes to
src/routeTree.gen.ts - Route entrypoints → School detail: routes to
src/routeTree.gen.ts - Route entrypoints → School creation: routes to
- Platform shell → Auth hooks: checks identity
src/components/layout/PlatformShell.tsx - Platform shell → Local session: clears session
src/components/layout/PlatformShell.tsx - School listing → School hooks: loads schools
src/routes/schools.index.tsx - School listing → User hooks: loads users
src/routes/schools.index.tsx - School listing → Schools table: renders table
src/routes/schools.index.tsx - School detail → School hooks: loads school
src/routes/schools.$id.tsx - School detail → User hooks: loads users
src/routes/schools.$id.tsx - School detail → Account derivation: derives accounts
src/routes/schools.$id.tsx - School creation → Loading and errors: renders states
src/features/schools/components/CreateSchoolForm.tsx - School hooks → School API: calls operations
src/features/schools/hooks.ts - School API → API client: uses client
src/features/schools/api.ts - User hooks → User API: calls user API
src/features/users/hooks.ts - Account derivation → User hooks: filters loaded users
- Dashboard → Dashboard statistics: calculates totals
- Dashboard statistics → Account derivation: uses account derivation
src/features/dashboard/stats.ts - Dashboard statistics → Schools table: summarizes platform