Modern Timetable Management System for Veer Patta Public School
Features β’ Quick Start β’ Documentation β’ Contributing
A comprehensive, intelligent timetable management system designed specifically for school administrators and teachers. Features real-time teacher availability tracking, smart substitution planning, and multiple view modes for different scheduling needs.
- Intelligent Substitution Planning: Automatically suggests the best substitute teachers based on workload and availability
- Real-Time Insights: Live dashboard showing current period, free teachers, and daily statistics
- Multiple View Modes: Dashboard, Day, Class, Teacher, and Substitution views
- Export & Share: Print-friendly layouts and WhatsApp-ready screenshot sharing
- Responsive Design: Works seamlessly on desktop, tablet, and mobile devices
- Keyboard Shortcuts: Quick navigation with Alt+1 through Alt+5
- Current date and time with auto-refresh
- Real-time statistics (active classes, total teachers, current substitutions)
- Live free teacher finder for any period
- Today's schedule overview
- Quick action buttons
- Complete schedule for any day of the week
- Visual indicators for current period
- All classes shown side-by-side
- Substitution status highlighting
- Export and print capabilities
- Detailed weekly schedule for individual classes
- Filter by class (Classes 1-12, including streams)
- Subject and teacher information
- Period-by-period breakdown
- Individual teacher schedules
- Workload statistics (periods per day/week)
- Cross-class teaching visibility
- Availability tracking
- Mark teachers as absent
- Auto-generate intelligent substitution plans
- Consider teacher workload and availability
- Track and modify substitutions
- Clear all substitutions feature
- Smart Caching: Performance optimizations for large datasets
- Free Teacher Finder: Real-time availability checking for any day/period
- Workload Balancing: Substitution algorithm considers current teacher load
- Screenshot Sharing: Export timetables as images for WhatsApp or download
- Print Optimization: Special print stylesheets for paper-friendly output
- Keyboard Navigation: Alt+1-5 shortcuts for quick view switching
- Mobile Responsive: Touch-friendly interface on all screen sizes
- Modern web browser (Chrome, Firefox, Safari, Edge)
- Node.js 16+ (optional, for development)
-
Clone the repository
git clone https://github.com/veerpatta/culturalprograminvite2025.git cd culturalprograminvite2025 -
Open in browser (Simple method)
# Just open index.html in your browser open index.html # macOS xdg-open index.html # Linux start index.html # Windows
-
Use a local server (Recommended for development)
# Option 1: Using Node.js http-server npx http-server -p 8080 -o # Option 2: Using Python python -m http.server 8080 # Option 3: Using PHP php -S localhost:8080
-
Access the application
http://localhost:8080
# Install development dependencies (optional)
npm install
# Run development server with live reload
npm run dev
# Run linting
npm run lint
# Format code
npm run formatThe application follows a modern modular architecture:
culturalprograminvite2025/
βββ index.html # Main HTML file
βββ css/
β βββ styles.css # All styles (extracted from inline)
βββ js/
β βββ app.js # Main entry point & initialization
β βββ constants.js # Configuration & constants
β βββ data.js # Data parsing & management
β βββ state.js # State management
β βββ utils.js # Utility functions
β βββ views.js # View rendering functions
βββ data/
β βββ timetable_raw.txt # Raw timetable data
βββ package.json # Project metadata
βββ README.md # This file
βββ ARCHITECTURE.md # Detailed architecture docs
βββ REFACTORING_SUMMARY.md # Refactoring details
| Module | Purpose | Key Functions |
|---|---|---|
| app.js | Application entry point | initializeApp(), switchView(), event handlers |
| constants.js | Configuration | Period times, special teachers, settings |
| data.js | Data management | parseTimetableData(), data loading |
| state.js | State management | Substitution management, cache handling |
| utils.js | Utilities | showToast(), getCurrentPeriod(), formatters |
| views.js | UI rendering | renderDashboard(), renderDayView(), etc. |
The timetable data is organized as:
- Days: Monday through Saturday
- Periods: 8 periods per day (8:30 AM - 2:10 PM)
- Classes: 16 classes (Class 1-10, Class 11/12 Science/Commerce/Arts)
- Break: Between Period 4 and Period 5 (11:10-11:30 AM)
The application maintains centralized state:
{
currentView: 'Dashboard', // Active view
substitutions: {}, // Day -> Period -> Substitution mapping
allData: {}, // Parsed timetable data
cache: Map(), // Performance cache
performanceMetrics: {} // Performance tracking
}When generating substitution plans:
- Identifies teachers available during the period
- Excludes absent teachers
- Excludes teachers with scheduled classes
- Excludes special teachers (Gyan, Phy) who can't substitute
- Ranks remaining teachers by current workload
- Assigns substitutes starting with least-loaded teachers
Via Menu:
- Click any navigation button (Dashboard, Day, Class, Teacher, Substitution)
Via Keyboard:
Alt+1: DashboardAlt+2: Day ViewAlt+3: Class ViewAlt+4: Teacher ViewAlt+5: Substitution View
- Go to Dashboard view
- In the "Free Teacher Finder" card:
- Select a day from the dropdown
- Select a period from the dropdown
- View instantly available teachers for that slot
- See count of free teachers
- Navigate to Substitution view
- Select the day
- Check boxes next to absent teachers
- Click Generate Substitution Plan
- Review suggested substitutes
- Modify if needed by clicking Modify button
- Clear all with Clear All Substitutions
Print:
- Navigate to desired view (Day/Class/Teacher)
- Click the Print button
- Use browser print dialog
- Optimized layouts will automatically apply
Share Screenshot:
- Click Screenshot button
- Choose Share to WhatsApp or Download
- Image captured and ready to share
The timetable data is currently embedded in js/data.js. To update:
- Open
js/data.js - Locate the
rawDataconstant - Update the CSV-formatted data following this pattern:
DayName Class,Period 1<br>Time,Period 2<br>Time,... ClassName,Subject (Teacher),Subject (Teacher),...
Future Enhancement: Move to external JSON file for easier updates.
All styles are in css/styles.css. Key CSS variables:
:root {
--primary-600: #2563eb; /* Main brand color */
--gray-50: #f9fafb; /* Light background */
--shadow-lg: ...; /* Shadow effects */
--radius: 0.5rem; /* Border radius */
}Edit js/constants.js to modify:
- Period times
- Special teachers list
- School hours
- Cache duration
- Other configuration values
- Frontend: Vanilla JavaScript (ES6+)
- Styling: CSS3 with CSS Variables
- Icons: Lucide Icons
- Export: html2canvas library
- Module System: ES6 Modules
- β Chrome/Edge 90+
- β Firefox 88+
- β Safari 14+
- β Mobile browsers (iOS Safari, Chrome Mobile)
- Intelligent caching for expensive computations
- Debounced user inputs
- Lazy evaluation where possible
- Performance metrics tracking
- Optimized DOM manipulation
- β
XSS prevention via
textContentusage - β Input validation on all user inputs
- β Sanitized data handling
- β No eval() or unsafe practices
β οΈ Note: No authentication system (add for production)
Contributions are welcome! Here's how you can help:
- Check if the bug is already reported in Issues
- Create a new issue with:
- Clear title and description
- Steps to reproduce
- Expected vs actual behavior
- Screenshots if applicable
- Open a new issue with the
enhancementlabel - Describe the feature and its benefits
- Provide mockups or examples if possible
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Make your changes
- Test thoroughly
- Commit with clear messages (
git commit -m 'Add amazing feature') - Push to your fork (
git push origin feature/amazing-feature) - Open a Pull Request
- Use ES6+ JavaScript features
- Follow existing code formatting
- Add JSDoc comments for functions
- Keep functions small and focused
- Write self-documenting code
- External JSON data file support
- Data validation and error handling improvements
- Unit tests (Jest/Vitest)
- Accessibility improvements (WCAG AA compliance)
- TypeScript migration
- Backend API for data management
- Real-time updates (WebSockets)
- User authentication and authorization
- Progressive Web App (PWA) support
- Offline functionality
- Mobile app (React Native/Flutter)
- Admin panel for timetable editing
- Database integration (PostgreSQL/MongoDB)
- Lines of Code: ~2,500 (JavaScript) + ~900 (CSS) + ~900 (HTML)
- Modules: 6 JavaScript modules
- Classes Supported: 16 classes (1-12 with streams)
- Teachers Tracked: 25+ teachers
- Periods Per Day: 8 periods
- Days Covered: 6 days (Monday-Saturday)
This project is licensed under the MIT License - see the LICENSE file for details.
- Veer Patta Public School - For the opportunity to create this system
- Lucide Icons - Beautiful icon set
- html2canvas - Screenshot functionality
- All teachers and staff who provided feedback
For support and questions:
- π§ Email: [email protected] (replace with actual email)
- π Issues: GitHub Issues
- π¬ Discussions: GitHub Discussions
- Refactoring Summary - Details of v2.0 refactoring
- Architecture Documentation - System architecture deep dive
- Change Log - Version history (to be created)
Made with β€οΈ for education
β Star this repo if you find it helpful!