Campuses
This page documents the current developer implementation of campus management in ILS-dev.
Campuses are the second-level organizational units under institutions.
Frontend entrypoint
The campus page is mounted at /admin/campuses in frontend/src/App.jsx.
The page implementation is in frontend/src/pages/CampusesPage.jsx.
Backend contract
The campus frontend calls the backend campus API at /api/campuses.
The backend route implementation is in backend/routes/campus.js.
Supported endpoints:
GET /api/campuses— list all campusesPOST /api/campuses— create a new campusGET /api/campuses/:id— load a single campusPUT /api/campuses/:id— update a campusDELETE /api/campuses/:id— soft delete a campusGET /api/campuses/:campus_id/reporting-rules— get campus reporting rulesPOST /api/campuses/:campus_id/reporting-rules— upsert reporting rules
Frontend behavior
Campus list
CampusesPage.jsx loads campus data on mount from fetchApi('/campuses').
It renders a simple list of campus names and currently supports display only.
Campus reporting rules
The campus backend route also exposes campus reporting rule endpoints used by teacher intelligence features. These reporting rules include:
low_activity_dayssuccess_thresholdreteach_threshold
The frontend uses these rules in classroom intelligence and Cockpit state calculations.
Developer notes
- The campus list page is a simple read-only view in the current implementation.
- Creating or editing campuses is handled by the backend API contract, but there is no dedicated frontend edit form in the current code.
- The backend enforces
institution_idandnamewhen creating campuses. - Campus deletion is soft delete via
deleted_at.
Related developer content
docs/developer/institutions.md— institutions own campusesdocs/developer/data-model.md— campus entity in the vertical hierarchydocs/developer/api.md— campus API contract and supporting routesdocs/developer/classroom-intelligence.md— campus reporting rules influence teacher intelligence
Last updated: 2026-07-08