AIML Project – University Timetable Management System
University_Timetable_System/
├── backend/
│ ├── flask_api/ # Flask REST API
│ │ ├── api.py
│ │ ├── api_stable.py
│ │ ├── start_api.bat
│ │ ├── config.py
│ │ ├── timetable_optimizer.py
│ │ └── timetable_db_mysql.py
│ ├── django_app/ # Django Web Application
│ │ └── timetable_project/
│ ├── streamlit_app/ # Streamlit UI
│ │ ├── timetable_app.py
│ │ ├── app.py
│ │ ├── config.py
│ │ ├── timetable_optimizer.py
│ │ └── timetable_db_mysql.py
│ ├── database/ # Database modules
│ │ ├── timetable_db_mysql.py
│ │ ├── timetable_db.py
│ │ ├── database.py
│ │ └── timetable.db
│ ├── utils/ # Utility modules
│ │ ├── timetable_optimizer.py
│ │ └── optimizer.py
│ └── config.py # Main configuration
├── frontend/ # React Frontend
│ ├── public/
│ ├── src/
│ │ ├── components/
│ │ ├── App.js
│ │ └── index.js
│ └── package.json
├── scripts/ # Setup & utility scripts
│ ├── test_api.py
│ ├── test_api_start.py
│ ├── test_db_connection.py
│ ├── check_users.py
│ ├── setup_mysql.py
│ ├── fix_database.py
│ ├── update_db_schema.py
│ ├── update_teachers_table.py
│ └── create_tables.sql
├── docs/ # Documentation
│ └── SECURITY_FIXES.md
├── .env.example
├── .gitignore
├── requirements.txt
├── package.json
├── main.py
└── README.md
-
Install Python dependencies:
pip install -r requirements.txt
-
Configure environment variables:
copy .env.example .env # Edit .env with your database credentials -
Run Flask API:
cd backend/flask_api python api.py -
Run Streamlit App:
cd backend/streamlit_app streamlit run timetable_app.py -
Run Django App:
cd backend/django_app/timetable_project python manage.py runserver
-
Install Node dependencies:
cd frontend npm install -
Start React app:
npm start
cd scripts
python setup_mysql.py
python test_db_connection.py- Multi-framework Backend: Flask API, Django Web App, Streamlit UI
- React Frontend: Modern, responsive UI with admin/student/lecturer dashboards
- AI-Powered Optimization: Google OR-Tools for constraint-based timetable generation
- Strict Capacity Validation: Ensures rooms are only assigned when capacity >= student count
- Role-Based Teaching Assignments: Automatic assignment based on faculty roles
- Lecturers/Assistant Lecturers/Senior Lecturers/Visiting Lecturers → Lectures & Tutorials
- Instructors → Lab/Practical sessions only
- Multi-Session Support: Courses can have lecture + tutorial + lab sessions per week
- Database Support: MySQL (primary) and SQLite (fallback)
- User Authentication: Role-based access control
- RESTful API: Complete CRUD operations for courses, teachers, rooms, and schedules
See docs/SECURITY_FIXES.md for security improvements and best practices.
The system automatically enforces teaching responsibilities based on faculty roles:
-
Academic Staff (Lecturer, Assistant Lecturer, Senior Lecturer, Visiting Lecturer)
- Authorized for: Lectures and Tutorials
- Not allowed: Lab/Practical sessions
-
Technical Staff (Instructor)
- Authorized for: Lab/Practical sessions only
- Not allowed: Lectures and Tutorials
For detailed information, see: