Skip to content

infant-ui/Time-Table---Generator-

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸŽ“ AI-POWERED TIMETABLE MANAGEMENT SYSTEM

Full Stack Web Application with LLaMA Integration

Built for: SRM Institute of Science and Technology
Department: M.Sc. Applied Data Science
Academic Year: 2026-2027


🌟 OVERVIEW

This is a complete production-ready timetable management system that uses AI (LLaMA) to generate conflict-free academic schedules, track staff attendance, and automatically manage class coverage when staff are absent.

Key Features:

βœ… AI-Powered Timetable Generation using LLaMA
βœ… Three User Roles (HOD, Staff, Admin)
βœ… Real-Time Attendance Tracking
βœ… Automatic Class Coverage Assignment
βœ… Email Notifications
βœ… Version Control for Timetables
βœ… Faculty-Specific Schedules
βœ… Leave Management System


πŸ—οΈ TECH STACK

Frontend:  React (JavaScript)
Backend:   Node.js + Express
Database:  MongoDB Community
AI Engine: LLaMA (via Ollama)
IDE:       Visual Studio Code

πŸ“‚ PROJECT STRUCTURE

timetable-system/
β”‚
β”œβ”€β”€ frontend/                     # React Application
β”‚   β”œβ”€β”€ public/
β”‚   β”‚   └── index.html
β”‚   β”œβ”€β”€ src/
β”‚   β”‚   β”œβ”€β”€ components/
β”‚   β”‚   β”‚   β”œβ”€β”€ Auth/            # Login, Register
β”‚   β”‚   β”‚   β”œβ”€β”€ HOD/             # Timetable Generation
β”‚   β”‚   β”‚   β”œβ”€β”€ Staff/           # Staff Dashboard
β”‚   β”‚   β”‚   β”œβ”€β”€ Admin/           # Attendance Management
β”‚   β”‚   β”‚   β”œβ”€β”€ common/          # Header
β”‚   β”‚   β”‚   β”œβ”€β”€ services/        # API calls
β”‚   β”‚   β”‚   β”œβ”€β”€ context/         # Auth Context
β”‚   β”‚   β”‚   β”œβ”€β”€ pages/           # Error pages
β”‚   β”‚   β”‚   β”œβ”€β”€ styles/          # CSS files
β”‚   β”‚   β”‚   └── App.js
β”‚   β”‚   └── index.js
β”‚   └── package.json
β”‚
β”œβ”€β”€ backend/                      # Express API
β”‚   β”œβ”€β”€ config/                  # Configuration
β”‚   β”œβ”€β”€ models/                  # MongoDB Models
β”‚   β”‚   β”œβ”€β”€ User.js
β”‚   β”‚   β”œβ”€β”€ Timetable.js
β”‚   β”‚   β”œβ”€β”€ Attendance.js
β”‚   β”‚   β”œβ”€β”€ LeaveRequest.js
β”‚   β”‚   └── ClassCoverage.js
β”‚   β”œβ”€β”€ routes/                  # API Endpoints
β”‚   β”‚   β”œβ”€β”€ auth.js
β”‚   β”‚   β”œβ”€β”€ timetable.js
β”‚   β”‚   β”œβ”€β”€ attendance.js
β”‚   β”‚   β”œβ”€β”€ leave.js
β”‚   β”‚   └── coverage.js
β”‚   β”œβ”€β”€ services/                # Business Logic
β”‚   β”‚   β”œβ”€β”€ llamaService.js     # AI Integration
β”‚   β”‚   β”œβ”€β”€ emailService.js     # Notifications
β”‚   β”‚   └── notificationService.js
β”‚   β”œβ”€β”€ middleware/              # Auth & Validation
β”‚   β”‚   β”œβ”€β”€ authMiddleware.js
β”‚   β”‚   └── roleCheck.js
β”‚   β”œβ”€β”€ controllers/             # Route Handlers
β”‚   β”‚   β”œβ”€β”€ timetableController.js
β”‚   β”‚   β”œβ”€β”€ attendanceController.js
β”‚   β”‚   └── coverageController.js
β”‚   β”œβ”€β”€ scripts/                 # Utilities
β”‚   β”‚   └── createAdmin.js
β”‚   └── server.js
β”‚
β”œβ”€β”€ docs/                         # Documentation
β”‚   β”œβ”€β”€ README.md
β”‚   └── SETUP.md
β”‚
└── Configuration Files
    β”œβ”€β”€ README.md
    β”œβ”€β”€ INSTALLATION_GUIDE.md
    β”œβ”€β”€ API_DOCUMENTATION.md
    β”œβ”€β”€ PROJECT_DOCUMENTATION.md
    β”œβ”€β”€ PROJECT_SETUP_CHECKLIST.md
    └── .gitignore

πŸš€ QUICK START (5 MINUTES)

1. Install Prerequisites

Download and install:

2. Setup MongoDB

# Start MongoDB
mongod

# In new terminal, verify
mongo --eval "db.version()"

3. Setup LLaMA

# Install Ollama, then:
ollama pull llama2
ollama list  # Verify installation

4. Setup Backend

cd backend

# Install dependencies
npm install

# Create .env file
cp .env.example .env

# Start server
npm run dev

Expected output:

βœ… MongoDB Connected Successfully
πŸš€ Server running on port 5000

5. Setup Frontend

cd frontend

# Install dependencies
npm install

# Start React app
npm start

Browser opens at http://localhost:3000

6. Create Admin User

cd backend
node scripts/createAdmin.js

7. Login & Test

Go to http://localhost:3000

  • Email: admin@srm.edu
  • Password: admin123

πŸ“š DOCUMENTATION FILES

Your project includes comprehensive documentation:

  1. README.md - This file
  2. INSTALLATION_GUIDE.md - Detailed step-by-step setup for all platforms
  3. API_DOCUMENTATION.md - All API endpoints with examples
  4. PROJECT_DOCUMENTATION.md - System architecture and design
  5. PROJECT_SETUP_CHECKLIST.md - Complete file structure overview
  6. docs/README.md - Development documentation
  7. docs/SETUP.md - Configuration guide

πŸ‘₯ THREE USER ROLES

1. HOD (Head of Department)

  • Generate timetables with AI
  • Modify subjects and faculty
  • View all staff attendance
  • Approve leave requests
  • Generate reports

Login: admin@srm.edu / admin123

2. Staff

  • View assigned schedule
  • Mark daily attendance
  • Request leave
  • See available colleagues
  • Receive class coverage notifications

3. Admin

  • Monitor staff attendance
  • Mark absent staff
  • View real-time availability
  • Assign class coverage
  • Send email notifications

🎯 MAIN WORKFLOWS

Workflow 1: Generate Timetable (HOD)

  1. Login as HOD
  2. Navigate to "Generate Timetable"
  3. Enter department, semester, academic year
  4. Add subjects with faculty
  5. Click "Generate with AI"
  6. LLaMA creates conflict-free schedule
  7. Review and save

Workflow 2: Staff Attendance & Auto Coverage

  1. 8:00 AM - Staff logs in to mark attendance
  2. 9:00 AM - System detects absent staff
  3. 9:05 AM - System checks absent staff's classes
  4. 9:06 AM - System finds available staff
  5. 9:07 AM - Email sent with coverage request
  6. Available staff accepts via dashboard
  7. Admin receives confirmation

Workflow 3: Staff Requests Leave

  1. Staff logs in
  2. Clicks "Request Leave"
  3. Selects date, enters reason
  4. System finds replacement
  5. Email sent to eligible staff
  6. Admin approves + assigns replacement
  7. Both notified

πŸ” SECURITY FEATURES

  • βœ… JWT authentication with expiry
  • βœ… Bcrypt password hashing
  • βœ… Role-based access control (RBAC)
  • βœ… Protected API routes
  • βœ… Environment variable secrets
  • βœ… CORS configuration
  • βœ… Error handling with no sensitive info leakage

πŸ“§ EMAIL SETUP (Optional)

For email notifications:

  1. Enable 2FA on Gmail
  2. Generate App Password: https://myaccount.google.com/apppasswords
  3. Update backend .env:
EMAIL_USER=your_email@gmail.com
EMAIL_PASSWORD=xxxx xxxx xxxx xxxx

πŸ§ͺ TESTING

Test API Endpoints

# Health check
curl http://localhost:5000/health

# Login
curl -X POST http://localhost:5000/api/auth/login \
  -H "Content-Type: application/json" \
  -d '{"email":"admin@srm.edu","password":"admin123"}'

Test Frontend

  1. Open http://localhost:3000
  2. Login with admin credentials
  3. Navigate through all features
  4. Generate a test timetable
  5. Mark attendance

🚨 TROUBLESHOOTING

MongoDB not connecting?

# Check if running
ps aux | grep mongod

# Start MongoDB
mongod

LLaMA not responding?

# Check Ollama
ollama list

# Restart
ollama serve

Port 5000 already in use?

# Change port in backend/.env
PORT=5001

πŸ“¦ DEPLOYMENT

Backend β†’ AWS EC2

  • Launch Ubuntu instance
  • Install Node.js, MongoDB
  • Use PM2 for process management
  • Configure security groups

Frontend β†’ Vercel

  • Push to GitHub
  • Import in Vercel
  • Set environment variables
  • Deploy

Database β†’ MongoDB Atlas

  • Create free cluster
  • Get connection string
  • Update backend .env

πŸŽ“ SAMPLE DATA

For testing, you can use these sample subjects:

Semester 1:

  • PAD2130U - Deep Learning for Data Science - Dr. N. Vijayalakshmi
  • PAD21302T - Enterprise Machine Learning - Dr. Anuradha
  • PAD21D08J - Exploratory Data Analysis - Dr. Karthika Dev
  • PAD21P01L - Internship - Dr. N. Vijayalakshmi
  • PAD21P02L - Mini Project Work - Dr. N. Vijayalakshmi
  • PCD21AE3T - Employability Skills - Dr. Shanmugam

πŸ› οΈ CUSTOMIZATION

Change Institution Details

Edit frontend/src/components/common/Header.js:

<h1>Your Institution Name</h1>

Modify Timetable Structure

Edit backend/services/llamaService.js:

workingDays: 6,  // Include Saturday
periodsPerDay: 8  // Add more periods

Add New User Roles

Edit backend/models/User.js:

role: {
  enum: ['hod', 'staff', 'admin', 'principal']
}

πŸ“ˆ FUTURE ENHANCEMENTS

Possible additions:

  • Mobile app (React Native)
  • WhatsApp notifications
  • Automated conflict resolution
  • Google Calendar integration
  • Student portal
  • Analytics dashboard
  • PDF/Excel export
  • SMS notifications

🀝 SUPPORT

For help:


πŸ“„ LICENSE

Proprietary - Internal Use Only
Β© 2026 SRM Institute of Science and Technology


βœ… CHECKLIST FOR DEPLOYMENT

  • All dependencies installed
  • MongoDB running and connected
  • LLaMA model downloaded
  • Environment variables configured
  • Admin user created
  • Email service configured (optional)
  • Frontend builds without errors
  • Backend API responding
  • Test login successful
  • Test timetable generation
  • Test attendance marking

πŸŽ‰ You're Ready to Go!

Start with:

npm run dev  # in backend
npm start    # in frontend

Questions? Check the detailed documentation files included in this project.


Version: 1.0.0
Last Updated: February 2026
Status: βœ… Production Ready
Built with ❀️ for SRM Institute

About

("Automated Full-Stack Timetable Generation System")

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors