Skip to main content

SKOLE-STAF — Staff Management Module

Module ID: SKOLE-STAF | Version: 1.0 | Status: Active
Products: Web App (admin only)

1. Overview

FieldValue
Module NameStaff Management
Module CodeSTAF
Business ValueSchool admin manages teachers and support staff. Designations carry RBAC (role-based access control) JSON that determines what each staff role can see and do within the Teacher App.

Scope In

  • Create, update staff records
  • Assign designations with RBAC JSON permissions
  • Manage staff addresses
  • Track leave
  • Assign students to staff members

Scope Out

  • Payroll
  • Biometric integration

2. Requirements

Functional Requirements (FR)

What the module must DO — actions, behaviors, and outcomes.
  • SKOLE-STAF-FR001: The module shall allow admins to create staff records including name, designation, and contact details.
  • SKOLE-STAF-FR002: The module shall enable admins to define designations and associate them with RBAC JSON configuration.
  • SKOLE-STAF-FR003: The module shall allow admins to assign students to staff members for academic management.
  • SKOLE-STAF-FR004: The module shall enable recording and management of staff leave requests.
  • SKOLE-STAF-FR005: The module shall allow admins to toggle staff status between active and inactive.

Non-Functional Requirements (NFR)

How well the module must do it — performance, security, and reliability.
  • SKOLE-STAF-NFR001: The module shall behave as a security gate by using the RBAC JSON to control module-level access in the Teacher application.
  • SKOLE-STAF-NFR002: The module shall perform multi-tenant isolation by scoping all staff records strictly to the skole_id.

Constraints

Rules and boundaries — tech choices and platform restrictions.
  • C001: We must use a JSON-based RBAC model for designations to allow for flexible permission changes without schema migrations.
  • C002: We must separate staff personal data from their institutional roles to support designation history in the future.

3. Sub-modules / Backlog

IDSub-modulePriorityStatusEstimateLinked FR
SKOLE-STAF-SM001Staff CRUDP0Done3dFR001, FR006
SKOLE-STAF-SM002Designation & RBACP0Done2dFR002
SKOLE-STAF-SM003Student assignmentP1Done1dFR003
SKOLE-STAF-SM004Leave trackingP1Done1dFR004
SKOLE-STAF-SM005Address managementP2Done0.5dFR005

4. Logical Implementation

RBAC JSON Example (staff_designation.rbac)

{
  "attendance": { "view": true, "mark": true },
  "diary": { "view": true, "create": true, "edit": false },
  "write_to": { "view": true, "reply": true },
  "noticeboard": { "view": true, "create": false }
}
This JSON is read by the Teacher App on login and gates which tabs/features are visible.

5. UI Requirements

Web App

IDScreenRouteDescription
SKOLE-STAF-UI001Staff Page/:skoleId/staffTable of all staff with create/edit/deactivate
SKOLE-STAF-UI002Staff Detail/:skoleId/staff/:idProfile with address, leave records, assigned students
SKOLE-STAF-UI003Designations Page/:skoleId/staff/designationsRBAC designation management
Components:
IDComponentProps
SKOLE-STAF-UC001StaffCardstaff, onEdit, onToggleStatus
SKOLE-STAF-UC002RBACEditorrbac, onChange
SKOLE-STAF-UC003LeaveFormstaffId, onSubmit
SKOLE-STAF-UC004StudentAssignmentstaffId, students[], onAssign

6. Conditional Expressions

IDExpressionTriggerTrue ActionFalse Action
SKOLE-STAF-CE001staff.status === 0Staff list renderShow “Inactive” badgeShow “Active” badge
SKOLE-STAF-CE002rbac.attendance.mark === trueTeacher app loginShow attendance mark UIHide mark controls
SKOLE-STAF-CE003rbac.diary.create === trueTeacher diary screenShow create buttonRead-only
SKOLE-STAF-CE004leave.leave_status === 'approved'Leave list renderGreen badgePending/rejected badge

7. Database Tables

IDTableRole
SKOLE-STAF-TB001staffCore staff record
SKOLE-STAF-TB002staff_designationRole definitions + RBAC JSON
SKOLE-STAF-TB003staff_addressStaff home/work addresses
SKOLE-STAF-TB004staff_leaveLeave request records
SKOLE-STAF-TB005staff_studentStaff-to-student assignments

8. API Endpoints

IDMethodRouteAuthDescription
SKOLE-STAF-EP001GET/web-app/staffJWT (user)List all staff
SKOLE-STAF-EP002POST/web-app/staffJWT (user)Create staff
SKOLE-STAF-EP003PUT/web-app/staff/:idJWT (user)Update staff
SKOLE-STAF-EP004GET/web-app/staff/designationsJWT (user)List designations
SKOLE-STAF-EP005POST/web-app/staff/designationsJWT (user)Create designation
SKOLE-STAF-EP006PUT/web-app/staff/designations/:idJWT (user)Update designation RBAC
SKOLE-STAF-EP007POST/web-app/staff/:id/assign-studentsJWT (user)Assign students to staff
SKOLE-STAF-EP008GET/web-app/staff/:id/leaveJWT (user)View staff leave
SKOLE-STAF-EP009POST/web-app/staff/:id/leaveJWT (user)Create leave record