Serverless Automatic Timetable Generation System for Kumaraguru Institutions
Everything runs in the browser. No servers, no database, no backend. Just a static website.
Single-phase approach: JavaScript CSP solver with backtracking + constraint propagation, running in a Web Worker.
SheetJS reads the Excel files in browser. Validates for missing fields, duplicates, impossible configs. Errors shown instantly — no server call needed.
Converts parsed data into a constraint graph. Variables = (course, section, slot) assignments. Constraints = faculty clash, room clash, lab continuity, mentor hour, breaks.
CSP solver runs in a background Web Worker (doesn't freeze the UI). Uses arc consistency + backtracking with forward checking. Solves a typical department in 3-15 seconds.
After finding a valid solution, runs a local search pass to minimize soft constraint violations (faculty gaps, subject spread, room stability).
Timetable rendered in an interactive grid. Export to .xlsx or .pdf — generated entirely in the browser.
No login needed. Open the URL or installed PWA.
Drag & drop course, faculty, section, room files
Configure breaks, mentor hour, lab rules, timings
Pick year, department, sections
Solver runs in browser, live progress bar
Drag-drop to tweak, download Excel/PDF
Users upload structured Excel files. The system parses them client-side using SheetJS and validates instantly.
course_code course_name type credits hours_per_week department semester
Type: Theory / Lab / Tutorial. Lab hours usually 3 (one block). Theory: 3-4 hrs/week.
faculty_id name department courses[] max_hours_per_day unavailable_slots[]
Maps faculty to courses they teach. Optional: preferred time slots, max consecutive hours.
year department section strength lab_batches courses[]
E.g., 1st IT A, 2nd CSE B. Lab batches: A1, A2, A3 (for splitting lab sections).
room_id room_name type capacity department equipment[]
Type: Classroom / Lab / Seminar Hall. Equipment: projector, computers, etc.
All constraints are configurable. Defaults are set for Kumaraguru Institutions' requirements.
| Constraint | Type | Description | Default |
|---|---|---|---|
| Faculty Clash | Hard | Same faculty cannot be in two places at the same time | Always enforced |
| Section Clash | Hard | Same section cannot have two classes at the same time | Always enforced |
| Room Clash | Hard | Same room cannot be used by two classes at the same time | Always enforced |
| Mentor Hour | Hard | Reserved mentor/counseling period — no regular classes | Wednesday, Period 1 (1 hour) |
| Lab Continuity | Hard | Lab sessions must be consecutive slots, no break in between | 3 consecutive periods |
| Periods Per Day | Hard | Fixed number of teaching periods per day | 8 periods |
| Break Timings | Hard | Fixed break slots — no classes during breaks | 2 breaks (after P3 & P6) |
| Weekly Hours | Hard | Each course must have exactly the specified hours/week | Per course definition |
| Faculty Load | Soft | Avoid back-to-back classes exceeding limit | Max 4 consecutive hours |
| Subject Spread | Soft | Spread theory classes across the week, not bunched | Max 1 per subject per day |
| Free Period Gaps | Soft | Minimize idle gaps for students in the middle of the day | Prefer compact schedules |
| Room Stability | Soft | Same section should use the same room when possible | Preferred |
Configurable per institution. Below is the default (8 periods + 2 breaks).
* Lab sessions are placed in consecutive slots (P6-P7-P8 shown as example). The solver ensures labs never span across a break.
Upload existing data as Excel. Download generated timetables in Excel format matching your institution's template.
Constraint solver generates clash-free timetables in seconds for an entire department.
Manually swap slots after generation. System validates in real-time and warns about constraint violations.
Section view (class timetable), Faculty view (teacher schedule), Room view (room occupancy). All from one dataset.
Lock specific classes to specific slots (e.g., "DSA must be Period 1 on Monday") before generating. Solver respects pins.
If a valid timetable is impossible, the system tells you exactly which constraints conflict and suggests resolutions.