A web-based academic timetable generation platform built with Next.js frontend and Django REST Framework backend. The system uses constraint-based algorithms to generate conflict-free academic schedules.
- Multiple scheduling algorithms (Final Universal Scheduler, Enhanced Scheduler, Working Scheduler)
- Constraint-based optimization
- Support for theory and practical subjects
- Batch and section-based scheduling
- 19 academic and infrastructure constraints
- Real-time constraint validation
- Conflict detection and resolution
- Room allocation optimization
- Teacher-subject assignments with section specificity
- Department-based data isolation
- Batch and semester management
- Classroom and lab allocation
- PDF export functionality using jsPDF
- Responsive web interface
- User role management (Admin, Teacher, Student)
The system implements a Deterministic Constraint-Based Algorithm with controlled randomization:
- Deterministic Core: Same input always produces identical output for consistent scheduling
- Constraint-Based Foundation: All 19 academic constraints are strictly enforced
- Controlled Randomization: Random elements only when explicitly regenerating timetables
- Predictable Results: Ensures consistent timetables for same academic configuration
- Deterministic constraint-based scheduling
- Enhanced room allocation with priority-based selection
- Gap filling for compact scheduling
- Section-based scheduling support
- Advanced constraint validation
- Teacher unavailability handling
- Cross-semester conflict detection
- Basic conflict resolution
- Teacher and room constraint enforcement
- Systematic constraint validation
- Iterative conflict resolution
The system enforces 19 constraints:
- Subject Frequency - Correct number of classes per week based on credits
- Practical Blocks - 3-hour consecutive blocks for practical subjects
- Teacher Conflicts - No teacher double-booking
- Room Conflicts - No room double-booking
- Friday Time Limits - Classes must not exceed 12:00/1:00 PM with practical, 11:00 AM without practical
- Minimum Daily Classes - No day has only practical or only one class
- Thesis Day Constraint - Wednesday is exclusively reserved for Thesis subjects for final year students
- Compact Scheduling - Classes wrap up quickly while respecting Friday constraints
- Cross Semester Conflicts - Prevents scheduling conflicts across batches
- Teacher Assignments - Intelligent teacher assignment matching
- Friday Aware Scheduling - Monday-Thursday scheduling considers Friday limits proactively
- Working Hours - All classes are within 8:00 AM to 3:00 PM
- Same Lab Rule - All 3 blocks of practical subjects must use the same lab
- Practicals in Labs - Practical subjects must be scheduled only in laboratory rooms
- Room Consistency - Enhanced room consistency for theory/practical separation
- Same Theory Subject Distribution - Max 1 class per day, distributed across 5 weekdays
- Breaks Between Classes - Minimal breaks, only when needed
- Teacher Breaks - After 2 consecutive theory classes, teacher must have a break
- Teacher Unavailability - Teachers cannot be scheduled during their unavailable periods
✅ All 19 constraints have been successfully implemented and tested with real academic data from Software Engineering Department, including real faculty members, actual course structures, and comprehensive constraint validation.
- Next.js 15.1.4
- React 19.1.0
- Tailwind CSS 3.4.1
- Axios 1.7.9 for API communication
- MUI Icons 7.0.1, React Icons 5.4.0, and Lucide React 0.487.0 for UI elements
- jsPDF 3.0.1 and jspdf-autotable 5.0.2 for PDF exports
- Django 4.2.7 with Django REST Framework 3.14.0
- JWT authentication via djangorestframework-simplejwt 5.3.0
- SQLite database
- ESLint 9 for code quality
- Turbopack for faster development builds
- Python 3.8+
- Node.js 16+
- Clone the repository
git clone <repository-url>
cd timetable-generation- Install Backend Dependencies
cd django-backend/backend
pip install -r requirements.txt- Install Frontend Dependencies
cd frontend
npm install-
Set Environment Variables
- Create
.envfiles for both backend and frontend - Configure Firebase service account credentials
- Set Django secret key and database settings
- Create
-
Run the Application
# Start both backend and frontend concurrently
npm start
# Or start individually:
npm run start:backend
npm run start:frontendtimetable-generation/
├── django-backend/ # Django backend application
│ ├── backend/ # Django project settings
│ ├── timetable/ # Main timetable app
│ │ ├── algorithms/ # Scheduling algorithms
│ │ ├── models.py # Data models
│ │ ├── views.py # API views
│ │ └── urls.py # URL routing
│ ├── users/ # User management app
│ └── requirements.txt # Python dependencies
├── frontend/ # Next.js frontend application
│ ├── pages/ # Application pages
│ │ ├── components/ # React components
│ │ └── utils/ # Utility functions
│ ├── styles/ # CSS and styling
│ └── package.json # Node.js dependencies
└── package.json # Root package.json with scripts
- Modular architecture with separation between UI, API, and scheduling logic
- Enhanced constraint validator and resolver for complex scheduling requirements
- Supports multiple user roles and department-based access controls
- Firebase integration for user authentication
- Celery integration for background task processing
This system automates the creation of academic timetables for educational institutions, handling complex scheduling constraints while ensuring conflict-free schedules. It's designed for colleges, universities, and institutions looking to streamline their timetable generation process.