Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

02 — User Personas (Parents Module)

Roles, goals, permissions, and expected behavior for every consumer of the Parents module. Permission values are exact from rbac/schemas/role.schema.ts (DEFAULT_ROLES) and rbac/permissions.constants.ts (ALL_PERMISSIONS). Server fact: parent endpoints are JWT-only today — parent.controller.ts:23 declares only JwtAuthGuard; no @Permissions() metadata; no parent.* permission exists in ALL_PERMISSIONS (permissions.constants.ts:1-97). Permission columns below state the intended model (from blueprint 04-Modules/Parents.md:64-70, flagged (planned)) and the actual server posture.


1. Organization Admin (org_admin)

AttributeDetail
Permissions (actual)ALL_PERMISSIONS (role.schema.ts:23) — but none of them are parent-scoped; all parent ops work for them anyway (JWT-only)
FrequencyDaily during admissions/custody changes; occasional otherwise
GoalComplete guardian picture: create profiles, link parents to students, manage primary guardians, resolve billing/pickup disputes
Core jobPOST /parents (with existing userId from POST /users), POST /parents/link/:studentId, PATCH /parents/:id, DELETE /parents/link/:linkId
Pain pointsDuplicate profiles per parent (only prevented by 409 on same userId); no search on the parent list (parent.service.ts:58-61 ignores q); no audit UI yet
Mental model"Every child needs at least one guardian who answers the phone."
Expected behaviourList parents → detail (linked children) → edit → link/unlink; confirm destructive unlink

2. Admission / Front-desk Staff (CRM-adjacent)

AttributeDetail
Permissions (actual)role-scoped (e.g., student.read + crm.read/crm.lead.managepermissions.constants.ts:33-34,47); parent endpoints are JWT-only so they can operate today
FrequencyPeak season: dozens of admissions/week
GoalEnrollment flow: student record exists → attach mother/father/guardian → mark primary → set pickup
Core jobPOST /students (student.controller.ts:38), then POST /parents/link/:studentId with relationship, isPrimaryGuardian, pickupAllowed
Pain pointsLink is a separate step after student creation (no auto-link on enrollment despite blueprint "Consumes: StudentCreated (auto-link…)" 04-Modules/Parents.md:41not implemented); parents of siblings must be re-linked per child
Mental model"Enroll → then 'who do we call?'"
NoteThe blueprint link routes (POST /students/:id/parents, 04-Modules/Parents.md:29-30) are not what the controller implements — use /parents/link/:studentId (parent.controller.ts:47-52).

3. Parent / Guardian (self-service, (forward-looking))

AttributeDetail
Permissions (actual)role parent = ['student.read'] only (role.schema.ts:50-56) — no parent. permission*; profile created by admin
Frequency2–10×/month during term (attendance alerts, results, fees)
GoalSee only own linked children (privacy boundary, USER_PERSONAS.md:48-53), check own relationship/primary flag, update emergency/pickup flags, receive absentee/result alerts (04-Modules/Parents.md:49)
Core jobLog in → my children → per-child details (attendance/results via other modules, student.read) → my profile edit
Pain pointsCannot resolve "my profile" today: no /parents/me, no userId filter on the list (OQ-1 in 01_Product_Overview.md)
RestrictionsSees data only for linked children; cross-tenant access structurally impossible (base.repository.ts:20-30)
Mental model"This school app knows which kids are mine."
Platform noteParent student.read is honored by other modules' authorization patterns (planned); the parents module itself has no owner check (OQ-8)

4. Multiple-Guardian Household (mother + father + grandparent)

AttributeDetail
Permissions (actual)each guardian = separate User → separate parents doc → separate links (parent.schema.ts:36 unique per userId)
GoalEach guardian sees the shared children; exactly one primary per child for communications; pickup rights split
Core jobAdmin links all three via POST /parents/link/:studentId per child; primary set per link
Pain pointsServer allows multiple primaries per student (no exclusivity, OQ-5); switching primary = PATCH of two links (old false / new true) — no dedicated endpoint; unlink of primary does not auto-promote (OQ-4)
Expected behaviourUI: per-child guardian list with radio "Primary guardian"; switching writes both links; unlink blocks if it would leave zero guardians or warns when removing the primary
Mental model"Grandma can pick up, but Dad gets the bills." (billing flag = financialResponsibility, student-parent-link.schema.ts:30-32)

5. Teacher / Staff (read-only consumer)

AttributeDetail
Permissions (actual)student.read (teacher/staff, role.schema.ts:31,39)
GoalFrom a student profile, reach linked guardians for a call/note (reuses GET /parents/link/student/:studentId, parent.controller.ts:53-57)
RestrictionsMust not edit guardian data; today the JWT-only API would allow it — UI hides edit for this role
Mental model"Who do I contact for this child?"

6. System actors

  • EventBus → QueueBridge: ParentCreatedin-app parent-created job; ParentUpdated/ParentDeletedaudit-write jobs (event-queue-map.ts:37-39). No email job for parent events (email.worker.ts:25-42).
  • Audit logger: append-only records of parent create/update/delete.

7. Role → parents-surface matrix

Surfaceorg_adminadmission staffparentteacher/staff
Parents list (/parents)
Parent detail + linked children
Create / edit parent profileself-edit (forward-looking)
Link / unlink guardians
Set / switch primary guardianview-only
My children + child switcher(forward-looking)
Student detail → guardiansown children onlyread

Intended permission model (planned): parent.read, parent.create, parent.update, parent.delete, parent.link (04-Modules/Parents.md:64-70) — none present in ALL_PERMISSIONS today (permissions.constants.ts). UI must gate on these once seeded and treat server as JWT-only until then.