How rgh-code/schoolmanagement works
School EMIS is a multi-tenant school management platform. School administrators register or sign in, complete school setup if needed, then manage school records, classes, subjects, marks, attendance, and reports; a separate super-admin workflow manages schools. CDC-aware grading distinguishes CAS assessment for Classes 1–5 from numeric marks for Classes 6–12. The map includes documented backup/export and ledger capabilities. Edges reflect shown routing, calls, imports, or README statements; unsampled implementations are represented only where documented.
Main entry points: App.jsx Routes and access control · AuthContext.jsx Session and school setup · ExamsLedgers.jsx Marks and attendance · supabaseClient.js Supabase client
Components 23
Application entry
- Routes and access control
src/App.jsx
Identity and tenancy
- Session and school setup
src/context/AuthContext.jsx - Supabase client
src/lib/supabaseClient.js - Supabase services
- Tenant data and RLS
supabase/schema.sql - School sign-in
src/pages/SchoolLogin.jsx - School registration
src/pages/SchoolRegister.jsx - Complete school setup
src/pages/CompleteSchoolSetup.jsx
Platform administration
- Admin sign-in
src/pages/SuperAdminLogin.jsx - School administration
src/pages/SuperAdminDashboard.jsx - Create-school function
supabase/functions/create-school/index.ts
School operations
- School workspace shell
src/pages/school/SchoolLayout.jsx - Enrollment and profile dashboard
src/pages/school/Dashboard.jsx - School profile updates
src/lib/schoolProfileUpdate.js - Student and staff directory
src/pages/school/Directory.jsx - Backup and restore
src/pages/school/BackupSecurity.jsx
Assessment and reporting
- Marks and attendance
src/pages/school/ExamsLedgers.jsx - Class-level assessment rules
src/utils/classLevel.js - CDC grades and CSV
src/utils/grading.js - Term grade ledger
src/pages/school/ledgers/TermGradeLedger.jsx - Combined ledger
src/pages/school/ledgers/CombinedLedger.jsx - Student grade sheet
src/pages/school/ledgers/StudentGradeSheet.jsx
Other components
- School admins and super admin
Connections 39
- School admins and super admin → Routes and access control: opens
README.md - Routes and access control → School sign-in: routes to
src/App.jsx - Routes and access control → School registration: routes to
src/App.jsx - Routes and access control → Admin sign-in: routes to
src/App.jsx - Routes and access control → Complete school setup: routes to
src/App.jsx - Routes and access control → School administration: protects route
src/App.jsx - Routes and access control → School workspace shell: protects route
src/App.jsx - Routes and access control → Enrollment and profile dashboard: routes to
src/App.jsx - Routes and access control → Student and staff directory: routes to
src/App.jsx - Routes and access control → Marks and attendance: routes to
src/App.jsx - Routes and access control → Backup and restore: routes to
src/App.jsx - Routes and access control → Session and school setup: reads session
src/App.jsx - Session and school setup → Supabase client: uses
src/context/AuthContext.jsx - Supabase client → Supabase services: connects to
src/lib/supabaseClient.js - Session and school setup → Supabase services: loads profiles
src/context/AuthContext.jsx - School sign-in → Session and school setup: signs in
src/pages/SchoolLogin.jsx - School registration → Session and school setup: registers school
src/pages/SchoolRegister.jsx - Complete school setup → Session and school setup: completes setup
src/pages/CompleteSchoolSetup.jsx - Admin sign-in → Session and school setup: signs in
src/pages/SuperAdminLogin.jsx - School administration → Supabase client: lists and deletes
src/pages/SuperAdminDashboard.jsx - School administration → Create-school function: invokes
src/pages/SuperAdminDashboard.jsx - Create-school function → Supabase services: creates school login
README.md - Supabase services → Tenant data and RLS: enforces tenant RLS
README.md - School workspace shell → Session and school setup: reads school context
src/pages/school/SchoolLayout.jsx - Enrollment and profile dashboard → Supabase client: queries school data
src/pages/school/Dashboard.jsx - Enrollment and profile dashboard → School profile updates: updates profile
src/pages/school/Dashboard.jsx - Student and staff directory → Supabase client: manages registries
src/pages/school/Directory.jsx - Student and staff directory → Class-level assessment rules: uses class list
src/pages/school/Directory.jsx - Backup and restore → Supabase client: backs up school data
src/pages/school/BackupSecurity.jsx - Marks and attendance → Supabase client: loads and saves records
src/pages/school/ExamsLedgers.jsx - Marks and attendance → Class-level assessment rules: selects assessment type
src/pages/school/ExamsLedgers.jsx - Marks and attendance → CDC grades and CSV: exports CSV
src/pages/school/ExamsLedgers.jsx - Marks and attendance → Term grade ledger: renders
src/pages/school/ExamsLedgers.jsx - Marks and attendance → Combined ledger: renders
src/pages/school/ExamsLedgers.jsx - Marks and attendance → Student grade sheet: renders
src/pages/school/ExamsLedgers.jsx - Term grade ledger → CDC grades and CSV: calculates grades
src/pages/school/ledgers/TermGradeLedger.jsx - Combined ledger → Class-level assessment rules: uses class rules
src/pages/school/ledgers/CombinedLedger.jsx - Student grade sheet → CDC grades and CSV: calculates GPA
src/pages/school/ledgers/StudentGradeSheet.jsx - Student grade sheet → Supabase client: loads marks
src/pages/school/ledgers/StudentGradeSheet.jsx