Naalya Handbook

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:

UserLands 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

PortalLayout fileGate
Studentstudent/route.tsxStudent portal flag, user type student. No campus on the profile redirects to /student/no-campus
Guardianguardian/route.tsxGuardian portal flag, user type guardian
School (staff)staff-hub/school/route.tsxStaff, read on school_administration
Campus (staff)staff-hub/campus.$campusId/route.tsxStaff, 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, platformguest/route.tsx, platform/route.tsxSee 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.

enrollments.tsx
exams.tsx
grades.tsx
hub.tsx
no-campus.tsx
notice-board.tsx
results.tsx
route.tsx
no-campus.tsx
select-campus.tsx
pay.$reference.tsx
exam-check.$examinationId.tsx
exam-room.$attemptId.tsx

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.

Shared screen behaviour

On this page