v2.0.0 Milestone
Version 2.0.0 documentation release
- Naming decision for this project
- Code revisions
- User routing
- Docusaurus update
The student portal section is still Portal, but the part that refers to Placement activity recording and marking now has a name!
We are now PRAXIS™
All dev code for the site has been updated with logos and being the scenes folders and paths that referred to /portfolio have been changed to /praxis
There is a playbook for the navigation map based on User definitions. These are linked to the presence of id numbers in fields in the Clerk private metadata as described here
High-Level Routing Logic
All routing decisions are made server-side in /(auth)/post-login/page.tsx. The resolved private metadata drives a single redirect. No client-side role detection.
On login:
resolve private metadata from /api/current-user
if studentId !== ""
→ /dashboard (Portal — student landing)
▶️ action button to /praxis/student (a list of placements)
else if markerId !== "" [all markers are staff]
[markerId sub-role evaluated within Portal, not at login]
▶️ action button to /praxis/marker (a list of marking and moderation)
else if staffId !== ""
→ /staff-dashboard (Portal — staff landing)
[sub-roles evaluated within Portal, not at login to cover staff being a supervisor]
▶️ action button to /praxis/role (a list of marking and moderation)
[if tutor has back button on /super route]
else if superId !== ""
→ /praxis/super (Praxis — direct federation, no Portal)
else if observerId !== ""
→ /praxis/super (Praxis — observer flag set, no Portal)
else if moderatorId !== "" [no staffId — external moderator edge case]
the user will have no Praxis access (26-05_12)
all moderation done in Sopley Central
else if externalId !== ""
→ /praxis/external (Praxis — direct federation, no Portal)
else
→ /error (no recognised identity)
Key rule — Marker routing: A marker is normally internal staff and will have a staffId. They land on /staff-dashboard and enter Praxis from there. In the unlikely event that there is a markerId-without-staffId, a branch handles this — they federate directly into Praxis in the same way as a Supervisor.
Key rule — presence checks: All role ID fields are empty strings "" when not held, not null or undefined. All checks must use !== "" not !!value.
Docusaurus version update
To version 3.10.1, code cleaned and sanitised for new features