MDH e-school ERP

Role guide and training

What each role can do, how requests move through the platform, illustrated end-to-end journeys, and an optional embedded training video.

System architecture

All roles use the same Next.js app in the browser. It calls a single Express API (JSON over HTTPS). The API validates JWTs, resolves school scope, then reads and writes PostgreSQL and local file storage. Nothing in the database is shared across schools without an explicit schoolId filter.

Request path

Role-based users

Browsers Β· desktop & mobile

Super AdminSchool AdminTeacherStudentParentAccountantHR

Next.js web application

App Router Β· React Β· Tailwind Β· client auth & school headers

/erp-api/*JWT in headerX-School-Id

Express API

One HTTP service: routes per module (students, fees, exams, HR, …). Every school-scoped call is checked against the signed-in user and active school context.

Middleware chain

  • JWT validation
  • Resolve school / scope
  • Zod validation
  • Prisma data access

PostgreSQL

Single database, schoolId on rows for tenant isolation.

File storage

Uploads (documents, ID assets, exam media) on disk or compatible storage, paths referenced from the API.

Optional services (e.g. Redis cache, email SMTP, payment gateways) connect from the API layer only β€” not from the browser.

End-to-end flows

Step-by-step visuals for the main journeys in the product. Each diagram is rendered as part of the page (no external diagram engine required).

Sign-in and school context

Most routes require authentication; super-admin flows add an explicit school context step.

Authentication path

Open login

MDH School ERP sign-in

Email & password

Submitted to /auth/login

Valid JWT?
Yes β†’ continueNo β†’ error UI

Dashboard

Shell & nav by primaryRole

After login β€” school context

Super Admin?
Yes β†’ pick schoolNo β†’ school on token

Schools β†’ Open as context

Sets X-School-Id for this session

School-scoped screens

Fees, students, exams, etc. for that tenant

Other roles

School is already on the JWT and/or header from login β€” no extra context step.

Admission β†’ enrollment β†’ class

Public enrollment forms feed admin review; approved students become first-class records in the school.

Admission β†’ enrollment β†’ class

1

Public / parent

Submit admission

Open enrollment form for school code

2

System

Queue application

Visible in student registrations

3

School admin

Review & approve

Check documents & eligibility

4

System

Create student

Profile + section assignment

5

Family

Access portals

Student / parent login linked

Fees: structure β†’ assignment β†’ payment

Accountants configure structures; families pay through the portal when gateways are enabled.

Fee lifecycle

Setup

  • Fee structure
  • Assign to class / student

Payment

  • Open Fees (parent or student)
  • Pay online or record offline

Post-payment

  • Receipt & ledger

Teacher daily teaching loop

Assignments, attendance, assessments, and online exams share the same section-aware permissions.

Typical teaching day in the app

Teacher signs in

JWT + assigned sections

My classes & timetable

Central hub β€” same section scope for all actions below

Attendance

Section-aware marking

Homework

Assign & track

Exams

Paper exams & marks

Online exams

Draft β†’ publish β†’ results

Messages

Class / school comms

Parent visibility loop

Parents stay on child-specific surfaces plus fees and school messages.

Parent portal map

Parent login

Linked to one or more students

My children

Pick child for academic views

From each child

Results & report cards
Timetable
Homework
Fees & pay
Also from parent home

Messages & announcements

School-wide comms

Actions by role

Navigation in the app is filtered by primaryRole. The list below matches the modules wired in the shell.

SUPER ADMIN β€” Platform owner

  • Manage all schools (create, activate, codes).
  • Use β€œOpen as context” to work inside a school as that tenant.
  • Configure biometric integration entry points and monitor platform-level support tickets.
  • Does not carry day-to-day class data until a school context is selected.

SCHOOL ADMIN β€” Principal / operations

  • Dashboard and full school configuration: academic years, promotion, timetable.
  • Students: directory, registrations, ID cards, attendance (including biometric), exams (paper & online), homework.
  • Finance: fee structures, assignments, finance module, expenses.
  • HR: staff records, leave, employment forms, incoming job applications.
  • Communication, open enrollment & employment landing pages, support.

TEACHER β€” Class & subject teacher

  • My classes: roster and section-aware views.
  • Timetable, attendance for assigned sections.
  • Exams: create/marks for permitted sections; online exams: build drafts, AI-assisted questions, publish, review attempts.
  • Homework assign and track; student profile where allowed.
  • Messages; personal HR (employment) self-service where enabled.

ACCOUNTANT β€” Finance office

  • Financial module, fees (structures, collection, reporting), expenses.
  • ID card operations tied to fees/cards where applicable.
  • Academic year visibility and promotion roster for fee-linked promotion steps.

HR β€” Human resources

  • HR module: employees, leave cycles, HR workflows.
  • Employee applications pipeline; announcements as configured.
  • Support tickets for HR-related issues.

STUDENT β€” Learner portal

  • Dashboard, personal ID card preview, timetable.
  • Attendance view, fee balance and payments (where enabled).
  • Exams schedule and results; homework; optional online exam taking with timer / camera rules.

PARENT β€” Guardian portal

  • Linked children: results, report cards, timetable, homework.
  • Fees: pay or view receipts across children.
  • Messages with school; school-wide announcements.

Training video

Record your walkthrough (screen capture + voice), upload it to YouTube or another host, then point the app at the public URL below.

Embed your video

Set NEXT_PUBLIC_ERP_TRAINING_VIDEO in frontend/.env.local to a full YouTube watch URL or direct embed URL. The legacy name NEXT_PUBLIC_ERP_TRAINING_VIDEO_HINDI is still read if the new variable is unset. Rebuild or restart next dev after changing env.

Video placeholder

Add NEXT_PUBLIC_ERP_TRAINING_VIDEO (or the legacy NEXT_PUBLIC_ERP_TRAINING_VIDEO_HINDI) to show an embedded video here.

Ready to try the app?

Go to login