A browser-based auto-scheduler for school timetables — no backend, no build step.
ES6 modules require an HTTP server (browsers block import on file://).
cd GVP-MLBT-Scheduler
python3 -m http.server 8080
# then open http://localhost:8080GVP-MLBT-Scheduler/
├── index.html ← Shell HTML (one <script type="module">)
├── styles/
│ └── main.css ← All CSS
├── config/
│ ├── school-config.json ← ✏️ Edit this to change school data
│ └── school-config.js ← Config loader (re-exports JSON as named constants)
└── js/
├── app.js ← Entry point, wires everything together
├── state.js ← Shared mutable runtime state
├── helpers.js ← Pure utility functions
├── selects.js ← Dropdown population
├── persistence.js ← localStorage + JSON export/import
├── scheduler.js ← Core scheduling algorithm
├── toast.js ← Notification helper
├── views/
│ ├── class-view.js ← Class timetable grid
│ ├── teacher-view.js ← Teacher timetable grid
│ ├── subject-view.js ← Subject timetable grid
│ ├── dashboard.js ← Workload / issues / coverage
│ └── admin-view.js ← Admin panels + mutations
└── modals/
├── cell-modal.js ← Cell edit dialog
└── teacher-modal.js ← Teacher add/edit dialog
Open config/school-config.json — it is the single source of truth for defaults. (config/school-config.js is just a loader that re-exports the JSON as named constants; it rarely needs editing.)
| JSON key | What to edit |
|---|---|
teachers |
Add / remove teachers, their subjects and classes |
classConfig |
Add / remove classes, sections, subjects, class teachers |
subjects |
Colour, text colour, periodsPerWeek, minPeriodsPerWeek, and mustAppearDaily per subject |
periods |
Period IDs, timings, and break flags |
satHalfDayClasses |
Classes with a Saturday half-day |
upperClasses |
Classes that get a Work Review slot |
noP1LockClasses |
Classes where Period 1 is not pinned to the class teacher |
combinedSections |
Section pairs that share a teacher for Period 1 |
Changes take effect on a fresh start (no localStorage snapshot). To apply them when a saved state exists, click Reset to Defaults in the Admin → Scheduler Settings panel.
| Event | What happens |
|---|---|
| First load | Defaults from config/school-config.js |
| Any admin change (teacher, class, frequency) | Saved to localStorage immediately |
| Page reload | "Load Saved" banner appears — click to restore |
| Export JSON | Downloads the full current state |
| Import JSON | Restores that state and saves to localStorage |
| Reset to Defaults | Clears localStorage and reloads — reverts to config/school-config.js |
- Add a teacher: append to
teachersinconfig/school-config.json, add their ID tosectionTeachersin the relevant class inclassConfig. - Add a subject: add an entry under
subjects(withcolor,textColor,periodsPerWeek, and optionallyminPeriodsPerWeekandmustAppearDaily), then add it to the relevant class'ssubjects[]inclassConfig. - Add a class: add a new key to
classConfigwithsections,subjects, andsectionTeachers. - Change period timings: edit the
periodsarray and updatesatHalfDayClasses/upperClassesif needed.