An intelligent, AI-powered timetable generation system designed specifically for higher education institutions implementing the National Education Policy (NEP) 2020 framework.
# Clone and start the entire system
git clone https://github.com/saqib-7/Time-Table-Generator.git
cd Time-Table-Generator
docker-compose up -d- π Frontend: http://localhost
- β‘ Backend API: http://localhost:8000
- π API Docs: http://localhost:8000/docs
- Username:
admin - Password:
admin123
- β Constraint Satisfaction: Google OR-Tools optimization
- β Conflict-Free Scheduling: Automatic detection & resolution
- β Real-time Generation: Sub-second timetable creation
- β Smart Optimization: Faculty workload & room utilization
- β Multi-Program Support: FYUP, B.Ed, M.Ed, ITEP
- β Credit System: Major (12), Minor (6), Skill (3), Value-Added (3)
- β Flexible Structure: Multidisciplinary course allocation
- β Exit Options: Certificate, Diploma, Degree pathways
- β Role-Based Access: Admin, Faculty, Student dashboards
- β Bulk Import/Export: Excel/CSV data management
- β Analytics Dashboard: Resource utilization insights
- β Scenario Simulation: What-if analysis before deployment
| Layer | Technology | Purpose |
|---|---|---|
| Frontend | React 18 + TypeScript | Modern UI with type safety |
| Backend | FastAPI + Python 3.11 | High-performance async API |
| Database | PostgreSQL 15 | Reliable relational data storage |
| Cache | Redis 7 | Session management & caching |
| Search | Elasticsearch 8 | Advanced search & analytics |
| AI Engine | Google OR-Tools | Constraint satisfaction solver |
| Container | Docker + Compose | Easy deployment & scaling |
Time-Table-Generator/
βββ π¨ frontend/ # React TypeScript app
β βββ src/components/ # Reusable UI components
β βββ src/pages/ # Application pages
β βββ src/services/ # API integration
β βββ src/store/ # Redux state management
βββ π§ backend/ # FastAPI Python app
β βββ app/api/ # REST API endpoints
β βββ app/core/ # Configuration & database
β βββ app/models/ # Database models (SQLAlchemy)
β βββ app/schemas/ # Pydantic request/response models
β βββ app/services/ # Business logic & AI engine
β βββ app/tasks/ # Background job processing
βββ π³ docker-compose.yml # Complete system orchestration
βββ π nginx/ # Reverse proxy configuration
βββ π scripts/ # Database initialization
- Docker & Docker Compose (Recommended)
- OR Manual setup: Python 3.11+, Node.js 18+, PostgreSQL 15+
-
Clone the repository:
git clone https://github.com/saqib-7/Time-Table-Generator.git cd Time-Table-Generator -
Start all services:
docker-compose up -d
-
Verify services are running:
docker-compose ps
-
Access the application:
- Frontend: http://localhost
- API Docs: http://localhost:8000/docs
π§ Backend Setup
cd backend
# Create virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# Install dependencies
pip install -r requirements.txt
# Set environment variables
cp .env.example .env
# Edit .env with your database credentials
# Run database migrations
alembic upgrade head
# Start development server
uvicorn app.main:app --reload --port 8000π¨ Frontend Setup
cd frontend
# Install dependencies
npm install
# Set environment variables
cp .env.example .env.local
# Edit .env.local with API URL
# Start development server
npm startOur AI engine uses Constraint Satisfaction Problem (CSP) modeling with Google OR-Tools:
# Example: Core constraints
constraints = [
"No faculty double-booking",
"Room capacity compliance",
"Student schedule conflicts",
"NEP 2020 credit distribution",
"Faculty workload limits",
"Lab consecutive slot requirements"
]
optimization_goals = [
"Minimize student schedule gaps",
"Balance faculty workload",
"Maximize room utilization",
"Respect faculty preferences"
]- Generation Speed: < 0.1 seconds for typical schedule
- Conflict Resolution: 99.9% automated resolution rate
- Optimization Score: 85%+ constraint satisfaction
- Scalability: Supports 1000+ courses, 500+ faculty
# Login
POST /api/v1/auth/login
{
"username": "admin",
"password": "admin123"
}
# Response
{
"access_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9...",
"token_type": "bearer",
"user": { ... }
}# Generate new timetable
POST /api/v1/timetables/generate
{
"name": "Spring 2024 Timetable",
"semester": 1,
"academic_year": "2024-2025",
"program_ids": ["uuid-here"],
"max_generation_time": 120
}
# Response
{
"status": "success",
"timetable_id": "generated-uuid",
"statistics": {
"total_assignments": 156,
"conflicts_count": 0,
"generation_time": 0.089,
"constraints_satisfied": 98.5
}
}Visit http://localhost:8000/docs for interactive API documentation.
cd backend
pytest tests/ -v --cov=app --cov-report=htmlcd frontend
npm test -- --coverage --watchAll=false# Run full test suite
docker-compose -f docker-compose.test.yml up --abort-on-container-exit# Production build
docker-compose -f docker-compose.prod.yml up -d
# Scale services
docker-compose -f docker-compose.prod.yml up -d --scale backend=3- AWS: ECS, RDS, ElastiCache
- GCP: Cloud Run, Cloud SQL, Memorystore
- Azure: Container Instances, Database for PostgreSQL
| NEP 2020 Feature | Implementation Status |
|---|---|
| Flexible Credit System | β Complete |
| Multidisciplinary Courses | β Complete |
| Multiple Exit Options | β Complete |
| Skill-Based Learning | β Complete |
| Teacher Education Integration | β Complete |
| Assessment Pattern Flexibility | β Complete |
- Fork the repository
- Create feature branch:
git checkout -b feature/AmazingFeature - Commit changes:
git commit -m 'Add AmazingFeature' - Push to branch:
git push origin feature/AmazingFeature - Open Pull Request
Use our issue tracker with:
- Bug reports: Use the bug template
- Feature requests: Use the feature template
- Questions: Use the discussion tab
This project is licensed under the MIT License - see the LICENSE file for details.
- π§ Email: saqib.developers@gmail.com
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- π Documentation: Full Docs
If this project helped you, please consider:
- β Starring this repository
- π Reporting bugs you encounter
- π§ Contributing improvements
- π’ Sharing with others who might find it useful