CampusHub is a full school ERP SaaS built on Laravel with Stancl Tenancy, giving each school an isolated database while sharing one central codebase and admin layer.
Core modules include student admissions, attendance tracking with QR-code check-in, GPA calculation and printable report cards, a daily diary/homework system, and role-based dashboards for admins, teachers, parents, and students. A companion Flutter mobile app mirrors the web dashboards with push notifications for announcements and grades.
The platform currently serves over 40 schools with a combined 15,000+ student records, processing attendance and grade updates in real time without cross-tenant data leakage.
/projects/campushub-school-erp
SaaS
CampusHub — Multi-Tenant School ERP
A multi-tenant school management platform handling admissions, attendance, grading, and parent communication for 40+ schools on a single codebase.
Challenges & solutions
The trickiest problem was a tenancy middleware priority bug that caused infinite redirect loops on specific routes under high concurrency. I traced it through the full request lifecycle and found the tenant-identification middleware was running after route-model-binding tried to resolve tenant-scoped models — reordering the middleware stack fixed it permanently.
Another challenge was soft-delete and uniqueness constraint conflicts across 60+ models (re-enrolling a student with the same admission number after a soft delete would throw a constraint violation). Solved with composite unique indexes that account for the deleted_at column.
Another challenge was soft-delete and uniqueness constraint conflicts across 60+ models (re-enrolling a student with the same admission number after a soft delete would throw a constraint violation). Solved with composite unique indexes that account for the deleted_at column.