How sarvani1947-cmd/smart-campus-management-system works
This is a MERN college-management application with role-based access and an admin-operated timetable generator. The main timetable workflow accepts uploaded academic CSVs, parses and validates them, searches for a CSP schedule, independently verifies it, saves it as a draft, and supports viewing and publishing. The wider product also manages classes, students, subjects, teachers, attendance, and exam results, with separate student and teacher views. Edges follow shown route/controller calls or explicit README capabilities; unsampled frontend/API wiring is left unverified where necessary.
Main entry points: route.js REST routes · timetableController.js Generate timetable · AdminDashboard.js Admin dashboard · App.js Role router
Components 32
Access and roles
- Role router
client/src/App.js - Role login
client/src/pages/LoginPage.js - Auth requests and state
client/src/redux/userRelated/userHandle.js
Academic administration
- Admin dashboard
client/src/pages/admin/AdminDashboard.js - Class management
client/src/pages/admin/classRelated - Student management
client/src/pages/admin/studentRelated - Subject management
client/src/pages/admin/subjectRelated - Teacher management
client/src/pages/admin/teacherRelated
Timetable generation
- Timetable workspace
client/src/pages/admin/AdminTimetable.js - CSV parsing
server/utils/csv-parser.js - Input validation
server/utils/timetable-validator.js - CSP solver
server/timetable-solver/solver.js - Independent verifier
server/timetable-solver/verifyTimetable.js - Generate timetable
server/controllers/timetableController.js - Timetable read and publish
server/controllers/timetableViewController.js - Publish timetable
server/controllers/timetablePublishController.js
API and persistence
- REST routes
server/routes/route.js - Admin account API
server/controllers/admin-controller.js - Student and attendance API
server/controllers/student_controller.js - Teacher API
server/controllers/teacher-controller.js - Class API
server/controllers/class-controller.js - Subject API
server/controllers/subject-controller.js - Account and academic records
server/models/studentSchema.js - Timetable records
server/models/timetableSchema.js - Teacher records
server/models/teacherSchema.js - Subject records
server/models/subjectSchema.js
Student and teacher portals
- Student portal
client/src/pages/student - Teacher portal
client/src/pages/teacher - Attendance and charts
client/src/components/attendanceCalculator.js - Pie chart
client/src/components/CustomPieChart.js - Feedback popup
client/src/components/Popup.js
Other components
- Visitor or user
Connections 39
- Visitor or user → Role router: opens
client/src/App.js - Role router → Role login: routes to
client/src/App.js - Role router → Admin dashboard: routes to
client/src/App.js - Role router → Student portal: routes to
client/src/App.js - Role router → Teacher portal: routes to
client/src/App.js - Role login → Auth requests and state: dispatches
client/src/pages/LoginPage.js - Auth requests and state → REST routes: HTTP requests
client/src/redux/userRelated/userHandle.js - Admin dashboard → Class management: navigates
client/src/pages/admin/AdminDashboard.js - Admin dashboard → Student management: navigates
client/src/pages/admin/AdminDashboard.js - Admin dashboard → Subject management: navigates
client/src/pages/admin/AdminDashboard.js - Admin dashboard → Teacher management: navigates
client/src/pages/admin/AdminDashboard.js - Admin dashboard → Timetable workspace: navigates
client/src/pages/admin/AdminDashboard.js - Timetable workspace → Generate timetable: uses generation API
- Student portal → Attendance and charts: calculates attendance
- Teacher portal → Attendance and charts: calculates attendance
client/src/pages/teacher/TeacherViewStudent.js - Teacher portal → Pie chart: renders
client/src/pages/teacher/TeacherViewStudent.js - REST routes → Admin account API: routes account requests
server/routes/route.js - REST routes → Student and attendance API: routes student requests
server/routes/route.js - REST routes → Teacher API: routes teacher requests
server/routes/route.js - REST routes → Class API: routes class requests
server/routes/route.js - REST routes → Subject API: routes subject requests
server/routes/route.js - REST routes → Generate timetable: routes generation
server/routes/route.js - REST routes → Timetable read and publish: routes viewing
server/routes/route.js - REST routes → Publish timetable: routes publishing
server/routes/route.js - Generate timetable → CSV parsing: parses uploads
server/controllers/timetableController.js - Generate timetable → Input validation: validates data
server/controllers/timetableController.js - Generate timetable → CSP solver: generates schedule
server/controllers/timetableController.js - Generate timetable → Independent verifier: verifies schedule
server/controllers/timetableController.js - Generate timetable → Timetable records: saves draft
server/controllers/timetableController.js - Timetable read and publish → Timetable records: reads schedule
server/controllers/timetableViewController.js - Publish timetable → Timetable records: updates status
server/controllers/timetablePublishController.js - Student and attendance API → Account and academic records: reads and updates
server/controllers/student_controller.js - Teacher API → Teacher records: reads and updates
server/controllers/teacher-controller.js - Teacher API → Subject records: updates assignment
server/controllers/teacher-controller.js - Subject API → Subject records: reads and updates
server/controllers/subject-controller.js - Subject API → Teacher records: updates assignments
server/controllers/subject-controller.js - Subject API → Account and academic records: updates student records
server/controllers/subject-controller.js - Student management → Attendance and charts: uses attendance metrics
client/src/pages/admin/studentRelated/ViewStudent.js - Student management → Feedback popup: shows feedback
client/src/pages/admin/studentRelated/ViewStudent.js