Project Plan

Kumaraguru AutoScheduler

Serverless Automatic Timetable Generation System for Kumaraguru Institutions

Problem Statement

Current Process

  • Faculty coordinators create timetables manually
  • Hours spent resolving clashes between sections
  • Lab scheduling across batches is error-prone
  • Any change requires redoing the entire table
  • No centralized system — Excel sheets passed around
  • Multiple iterations before a clash-free table

Proposed Solution

  • Upload Excel files (courses, faculty, rooms)
  • Define constraints (mentor hour, lab rules, breaks)
  • Select year & section (1st IT A, 2nd CSE B, etc.)
  • Auto-generate clash-free timetables in seconds
  • Export to Excel / PDF / print-ready format
  • Modify & regenerate with one click

System Architecture

Everything runs in the browser. No servers, no database, no backend. Just a static website.

Data Flow
Excel Files
User uploads
Browser Engine
SheetJS + Solver
Timetable Output
View + Export
Excel parsed in browser → JS constraint solver generates timetable → Export to Excel/PDF — all offline-capable
Framework
React (Vite) — Static SPA
Hosted on Vercel/Netlify/GitHub Pages as static files. Zero server cost.
Excel Parsing
SheetJS (xlsx)
Parses .xlsx files entirely in the browser. No upload to any server.
Solver Engine
JavaScript CSP Solver
Custom constraint satisfaction solver running in a Web Worker. No Python needed. Handles 500+ variables in under 10 seconds.
Data Storage
IndexedDB + localStorage
All data stays in the browser. Constraint configs, uploaded data, generated timetables — persists across sessions.
Export
SheetJS + jsPDF
Generate Excel and PDF files client-side. No server roundtrip.
Offline Support
PWA (Service Worker)
Install as an app. Works completely offline after first load.

Algorithm — How It Works

Single-phase approach: JavaScript CSP solver with backtracking + constraint propagation, running in a Web Worker.

Step 1: Excel Parsing & Validation

SheetJS reads the Excel files in browser. Validates for missing fields, duplicates, impossible configs. Errors shown instantly — no server call needed.

Step 2: Build Constraint Model

Converts parsed data into a constraint graph. Variables = (course, section, slot) assignments. Constraints = faculty clash, room clash, lab continuity, mentor hour, breaks.

Step 3: Solve (Web Worker)

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.

Step 4: Optimize

After finding a valid solution, runs a local search pass to minimize soft constraint violations (faculty gaps, subject spread, room stability).

Step 5: Display & Export

Timetable rendered in an interactive grid. Export to .xlsx or .pdf — generated entirely in the browser.

User Flow

1

Open App

No login needed. Open the URL or installed PWA.

2

Upload Excel

Drag & drop course, faculty, section, room files

3

Set Constraints

Configure breaks, mentor hour, lab rules, timings

4

Select Scope

Pick year, department, sections

5

Generate

Solver runs in browser, live progress bar

6

Edit & Export

Drag-drop to tweak, download Excel/PDF

Implementation Phases

01

Core Engine

Week 1-2
  • React + Vite project setup
  • SheetJS Excel parsing
  • Data validation layer
  • Constraint config UI
  • IndexedDB persistence
02

Solver

Week 3-4
  • JS CSP solver with backtracking
  • Web Worker integration
  • Hard constraint encoding
  • Soft constraint optimization
  • Infeasibility detection
03

UI & Export

Week 5-6
  • Timetable grid with drag-drop
  • Section / Faculty / Room views
  • Excel export (SheetJS)
  • PDF export (jsPDF)
  • Pin & lock slots
04

Polish

Week 7
  • PWA + offline support
  • Mobile responsive
  • Conflict resolution UI
  • Template Excel downloads
  • Deploy to GitHub Pages

Input Data — Excel Templates

Users upload structured Excel files. The system parses them client-side using SheetJS and validates instantly.

Required Excel Files

1. course_list.xlsx
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.

2. faculty_list.xlsx
faculty_id name department courses[] max_hours_per_day unavailable_slots[]

Maps faculty to courses they teach. Optional: preferred time slots, max consecutive hours.

3. section_list.xlsx
year department section strength lab_batches courses[]

E.g., 1st IT A, 2nd CSE B. Lab batches: A1, A2, A3 (for splitting lab sections).

4. room_list.xlsx
room_id room_name type capacity department equipment[]

Type: Classroom / Lab / Seminar Hall. Equipment: projector, computers, etc.

Constraints Engine

All constraints are configurable. Defaults are set for Kumaraguru Institutions' requirements.

ConstraintTypeDescriptionDefault
Faculty ClashHardSame faculty cannot be in two places at the same timeAlways enforced
Section ClashHardSame section cannot have two classes at the same timeAlways enforced
Room ClashHardSame room cannot be used by two classes at the same timeAlways enforced
Mentor HourHardReserved mentor/counseling period — no regular classesWednesday, Period 1 (1 hour)
Lab ContinuityHardLab sessions must be consecutive slots, no break in between3 consecutive periods
Periods Per DayHardFixed number of teaching periods per day8 periods
Break TimingsHardFixed break slots — no classes during breaks2 breaks (after P3 & P6)
Weekly HoursHardEach course must have exactly the specified hours/weekPer course definition
Faculty LoadSoftAvoid back-to-back classes exceeding limitMax 4 consecutive hours
Subject SpreadSoftSpread theory classes across the week, not bunchedMax 1 per subject per day
Free Period GapsSoftMinimize idle gaps for students in the middle of the dayPrefer compact schedules
Room StabilitySoftSame section should use the same room when possiblePreferred

Default Period Structure

Configurable per institution. Below is the default (8 periods + 2 breaks).

SlotTimeMonTueWedThuFri
P18:45 – 9:35Mentor Hour
P29:35 – 10:25
P310:25 – 11:15
Break 1 — 11:15 – 11:30 (15 min)
P411:30 – 12:20
P512:20 – 1:10
Lunch Break — 1:10 – 2:00 (50 min)
P62:00 – 2:50Lab (3 hrs)
P72:50 – 3:40Lab (contd.)
P83:40 – 4:30Lab (contd.)

* Lab sessions are placed in consecutive slots (P6-P7-P8 shown as example). The solver ensures labs never span across a break.

Key Features

📊

Excel Import/Export

Upload existing data as Excel. Download generated timetables in Excel format matching your institution's template.

Instant Generation

Constraint solver generates clash-free timetables in seconds for an entire department.

🔄

Drag & Drop Editor

Manually swap slots after generation. System validates in real-time and warns about constraint violations.

👥

Multiple Views

Section view (class timetable), Faculty view (teacher schedule), Room view (room occupancy). All from one dataset.

🔒

Pin & Lock Slots

Lock specific classes to specific slots (e.g., "DSA must be Period 1 on Monday") before generating. Solver respects pins.

🔎

Conflict Detection

If a valid timetable is impossible, the system tells you exactly which constraints conflict and suggests resolutions.