Portal routes
Where each kind of user lands in the Education Hub, the gate on each portal, the route files under it, and what the main staff screens call.
Every signed-in screen lives under src/routes/_authenticated. A file is a route; a folder is a URL segment. Naming rules are on Routing and app shell.
Where a user lands
getUserDestination decides the first screen after sign-in:
| User | Lands on |
|---|---|
platform_admin | /platform/hub |
guest | /guest |
student | /student/hub |
guardian | /guardian/hub |
Staff who can read school_administration (or manage all) | /staff-hub/school/hub |
| Other staff | /staff-hub/campus/$campusId/hub, using their profile campus, else the first campus in their scope |
| Staff with no campus | /staff-hub/no-campus |
The gate on each portal
| Portal | Layout file | Gate |
|---|---|---|
| Student | student/route.tsx | Student portal flag, user type student. No campus on the profile redirects to /student/no-campus |
| Guardian | guardian/route.tsx | Guardian portal flag, user type guardian |
| School (staff) | staff-hub/school/route.tsx | Staff, read on school_administration |
| Campus (staff) | staff-hub/campus.$campusId/route.tsx | Staff, and canAccessCampus: school-level scope, or the campus is in their scope or is their home campus. Otherwise redirects to /staff-hub/select-campus |
| Guest, platform | guest/route.tsx, platform/route.tsx | See Routing and app shell |
There is no single staff-hub/route.tsx; school and campus each have their own layout. These Hub gates are separate from the API's permission checks, described on The ability.
The campus layout keeps campusAcademicYearId in the URL. When the campus has no current year it shows an empty shell; someone who can create an academic year gets a button to start it.
The route files
Listed at Hub b46552179. A trailing underscore (admissions_, payments_.pay.tsx) means the file does not sit inside the parent's layout. A folder starting with - is not a route.
Hub cards
The school and campus hubs show a grid of cards. A card shows when its permission passes and, if it names a feature, that feature is on.
Staff screens at a glance
Each row is the route file's own gate on top of the layout gate, and the main API operation it calls. Read in the code at Hub 9e84f4c33d; unchanged at b46552179.