Timetable Manager is a web application designed to help educational institutions create, manage, and view timetables efficiently.
- Timetable Generation: Dynamically generate timetables based on various inputs.
- Multiple Timetable Views: View timetables by Division, Teacher, or Classroom.
- Slot Management: Add, update, and delete individual slots in the timetable.
- Data Management: Manage related data such as subjects, teachers, classrooms, batches, and subdivisions.
- PDF Export: Export timetables to PDF format for easy sharing and printing.
- Interactive UI: User-friendly interface for easy navigation and timetable manipulation.
- Responsive Design: Adapts to different screen sizes.
git clone https://github.com/MatricalDefunkt/timetable-manager
cd timetable-manager- Open the project folder in your IDE.
- Open a terminal and run:
bun install
To start the development server, run:
bun devThis will start the frontend on http://localhost:5173 and the backend server using PM2, or attempt to install pm2 if it does not already exist.
The project is organized into two main parts:
src/frontend/: Contains the React-based user interface, built with TypeScript and Vite.Components/: Reusable UI components.Pages/: Top-level page components.context/: React context for state management.
utils/: Utility functions and type definitions.src/backend/: Contains the BunJS and ElysiaJS based API.controllers/: Logic for handling API requests.api/routes/: Defines the API routes.database/: Models and database interaction logic.
SAMPLE_DATA/: Contains CSV files for sample data.public/: Static assets..env: Environment variable configuration (ensure you have this set up locally, it's not committed to git).
- Frontend:
- React
- TypeScript
- Vite
- Material-UI (MUI)
- Backend:
- BunJS
- ElysiaJS
- TypeScript
- Runtime:
- Bun
- Database:
- MariaDB Server.
The backend API is served from http://localhost:3000. The following are some of the main endpoints available in the OpenAPI specification:
Data Retrieval (Getters): (See getTables.ts)
GET /academicYears: Get all academic years.GET /departments/:id/subjects: Get subjects by department.- (Parameters:
departmentId) GET /academicYears/:id/classrooms: Get all classrooms by academic year.- (Parameters:
academicYearId) GET /academicYears/:id/teachers: Get all teachers by academic year.- (Parameters:
academicYearId) GET /subject/:id/teachers: Get teachers for a specific subject.- (Parameters:
subjectId) GET /academicYears/:id/batches: Get all batches by academic year.- (Parameters:
academicYearId) GET /departments/:id/divisions: Get all divisions by department.- (Parameters:
departmentId) GET /batches/:id/departments: Get all departments by batch.- (Parameters:
batchId)
Timetable Viewing:
GET /subdivisions/:id/timetable: Get timetable for a subdivision.- (Parameters:
subdivisionId)
- (Parameters:
GET /divisions/:id/timetable: Get timetable for a division.- (Parameters:
divisionId)
- (Parameters:
GET /teachers/:id/timetable: Get timetable for a teacher.- (Parameters:
teacherId)
- (Parameters:
GET /classrooms/:id/timetable: Get timetable for a classroom.- (Parameters:
classroomId)
- (Parameters:
Availability Checks:
GET /available/teachers: Get available teachers for a given slot and subject.- (Parameters:
subjectId,slotId) - (Controller logic likely in
getAvailableTeachersand routed viaavailable.ts)
- (Parameters:
GET /available/classrooms: Get available classrooms for a given slot and subject.- (Parameters:
subjectId,slotId) - (Controller logic likely in
getAvailableClassroomsand routed viaavailable.ts)
- (Parameters:
GET /available/subdivisions: Fetch available subdivisions. (This was in the previous README, checkavailable.tsoropenapi.yamlfor confirmation and parameters)- (Controller logic might be in
getAvailableSubdivisions)
- (Controller logic might be in
Timetable Slot Management (Editing):
(These are inferred from editing.ts and previous README structure; paths might vary slightly. Check editing.ts routes for exact paths)
POST /slotDatas/update: Add data to a timetable slot.- (Controller:
addSlotData, routed viaediting.ts)
- (Controller:
PUT /slotDatas/:id: Update data for an existing timetable slot.- (Controller:
updateSlotData, routed viaediting.ts)
- (Controller:
DELETE /slotDatas/:id: Delete data from a timetable slot.- (Controller:
deleteSlotData, routed viaediting.ts)
- (Controller:
Data Management & Generation:
- Endpoints for CSV data upload are available, routed via
addCsv.ts.- (Refer to addCsv.ts)
- Endpoints for timetable generation are available, routed via
generate.ts.- (Refer to generate.ts)