Back to projects
06Full-stack · School Management2026Live

Madrasa Hub

A three-portal school management system — admins run the school, teachers take attendance and grade, and parents follow their children's progress and message teachers — with role-scoped access enforced on every query and a Claude-drafted progress-comment feature.

Screenshots
Details

Role: Solo developer

Status: Live

Next.jsTypeScriptPrismaNeon PostgresNextAuth (RBAC)Tailwind CSSRechartsAnthropic ClaudeDocker
Problem

A school system isn't one app — it's three audiences over the same data, each of whom must see exactly their slice and nothing else. Admins manage students, teachers, classes, and terms; teachers work only with their own class sections and students; parents see only their own children. Getting that wrong isn't a bug, it's a privacy breach, so authorization can't be a matter of hiding a menu item — it has to be re-checked server-side on every read and every mutation. On top of that boundary sits the actual work of a school: taking attendance fast enough to do it live in class, a gradebook that computes averages, assignments and announcements, parent–teacher messaging, and dashboards that reflect what happened today — all of which has to feel like a real mid-semester school, not an empty shell.

Approach

Madrasa Hub is a complete platform with three role-based portals behind one login and a hard server-side authorization boundary. Admin: manages students, teachers, classes, terms, and parent accounts, and sees school-wide analytics — enrollment, today's attendance rate, and charts for attendance over 30 days and enrollment by grade (Recharts). Teachers: a fast attendance screen (tap to cycle Present/Absent/Late/Excused, save a whole roster at once), a gradebook grid of students × assignments with class averages, class announcements, and a per-student view. Parents: a child overview with today's attendance, per-class averages, recent grades and upcoming assignments, a calendar-style attendance history, an announcements feed, teacher progress comments, and messaging with their child's teachers only. Security as the core story: role-based redirects are convenience only — every portal page and mutation re-checks the authenticated role, teacher queries are scoped to their own sections and students, and parent queries to their own linked children. AI feature: on a student's profile a teacher clicks 'Draft progress comment' and Claude composes a 3–4 sentence report from that student's real grades and attendance, which the teacher edits and saves — feature-flagged so it falls back to a sensible local draft without an API key, and gated behind enough data to avoid garbage output. Built on Next.js (App Router) + TypeScript, Prisma against Neon Postgres, NextAuth credentials with an ADMIN/TEACHER/PARENT role, Tailwind, Recharts, and DB-backed messaging via polling — shipped Docker standalone with /api/health for Coolify.

Outcome

A finished, deployed three-portal platform that treats authorization as the product, not an afterthought — every query scoped to its role — while still shipping the full day-to-day surface of a real school, from live attendance to AI-assisted progress reports.

Madrasa Hub | Hassan Al Salam