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
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.
β
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
Frontend: React (JavaScript)
Backend: Node.js + Express
Database: MongoDB Community
AI Engine: LLaMA (via Ollama)
IDE: Visual Studio Code
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
Download and install:
- Node.js (v16+): https://nodejs.org/
- MongoDB: https://www.mongodb.com/try/download/community
- Ollama (for LLaMA): https://ollama.ai/
# Start MongoDB
mongod
# In new terminal, verify
mongo --eval "db.version()"# Install Ollama, then:
ollama pull llama2
ollama list # Verify installationcd backend
# Install dependencies
npm install
# Create .env file
cp .env.example .env
# Start server
npm run devExpected output:
β
MongoDB Connected Successfully
π Server running on port 5000
cd frontend
# Install dependencies
npm install
# Start React app
npm startBrowser opens at http://localhost:3000
cd backend
node scripts/createAdmin.jsGo to http://localhost:3000
- Email:
admin@srm.edu - Password:
admin123
Your project includes comprehensive documentation:
- README.md - This file
- INSTALLATION_GUIDE.md - Detailed step-by-step setup for all platforms
- API_DOCUMENTATION.md - All API endpoints with examples
- PROJECT_DOCUMENTATION.md - System architecture and design
- PROJECT_SETUP_CHECKLIST.md - Complete file structure overview
- docs/README.md - Development documentation
- docs/SETUP.md - Configuration guide
- Generate timetables with AI
- Modify subjects and faculty
- View all staff attendance
- Approve leave requests
- Generate reports
Login: admin@srm.edu / admin123
- View assigned schedule
- Mark daily attendance
- Request leave
- See available colleagues
- Receive class coverage notifications
- Monitor staff attendance
- Mark absent staff
- View real-time availability
- Assign class coverage
- Send email notifications
- Login as HOD
- Navigate to "Generate Timetable"
- Enter department, semester, academic year
- Add subjects with faculty
- Click "Generate with AI"
- LLaMA creates conflict-free schedule
- Review and save
- 8:00 AM - Staff logs in to mark attendance
- 9:00 AM - System detects absent staff
- 9:05 AM - System checks absent staff's classes
- 9:06 AM - System finds available staff
- 9:07 AM - Email sent with coverage request
- Available staff accepts via dashboard
- Admin receives confirmation
- Staff logs in
- Clicks "Request Leave"
- Selects date, enters reason
- System finds replacement
- Email sent to eligible staff
- Admin approves + assigns replacement
- Both notified
- β 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
For email notifications:
- Enable 2FA on Gmail
- Generate App Password: https://myaccount.google.com/apppasswords
- Update backend
.env:
EMAIL_USER=your_email@gmail.com
EMAIL_PASSWORD=xxxx xxxx xxxx xxxx# 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"}'- Open http://localhost:3000
- Login with admin credentials
- Navigate through all features
- Generate a test timetable
- Mark attendance
MongoDB not connecting?
# Check if running
ps aux | grep mongod
# Start MongoDB
mongodLLaMA not responding?
# Check Ollama
ollama list
# Restart
ollama servePort 5000 already in use?
# Change port in backend/.env
PORT=5001- Launch Ubuntu instance
- Install Node.js, MongoDB
- Use PM2 for process management
- Configure security groups
- Push to GitHub
- Import in Vercel
- Set environment variables
- Deploy
- Create free cluster
- Get connection string
- Update backend .env
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
Edit frontend/src/components/common/Header.js:
<h1>Your Institution Name</h1>Edit backend/services/llamaService.js:
workingDays: 6, // Include Saturday
periodsPerDay: 8 // Add more periodsEdit backend/models/User.js:
role: {
enum: ['hod', 'staff', 'admin', 'principal']
}Possible additions:
- Mobile app (React Native)
- WhatsApp notifications
- Automated conflict resolution
- Google Calendar integration
- Student portal
- Analytics dashboard
- PDF/Excel export
- SMS notifications
For help:
- Email: support@example.com
- Docs: See included .md files
- API: See API_DOCUMENTATION.md
Proprietary - Internal Use Only
Β© 2026 SRM Institute of Science and Technology
- 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 frontendQuestions? 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