How cubon23/appointment-system works
This is a university faculty attendance and consultation portal for students, faculty, deans, and administrators. Users enter through QR or account login, then use role-specific dashboards for attendance/status, schedules, appointments, announcements, and administration. The Express API handles authentication and these domain operations over MongoDB; a scheduled job also updates faculty status. The route file is only partially excerpted, so dashboard-to-API links are shown as unverified; unsampled implementation details are not inferred.
Main entry points: faculty.js Faculty operations API · App.tsx Role routing · LandingPage.tsx Login and entry · server.js Express server
Components 25
Web experience
- Login and entry
frontend/src/components/LandingPage.tsx - Role routing
frontend/src/App.tsx - Role guard
frontend/src/components/ProtectedRoute.tsx - Student dashboard
frontend/src/components/StudentDashboard.tsx - Faculty dashboard
frontend/src/components/FacultyDashboard.tsx - Admin dashboard
frontend/src/components/AdminDashboard.tsx - Dean dashboard
frontend/src/components/DeanDashboard.tsx - Cohort configuration
frontend/src/data/cohortConfig.ts
Backend API
- Account and QR auth
backend/routes/auth.js - Faculty operations API
backend/routes/faculty.js - JWT role checks
backend/middleware/auth.js - Express server
backend/server.js
Domain data
- User and status
backend/models/User.js - Consultation appointments
backend/models/Appointment.js - Teaching schedules
backend/models/Schedule.js - Announcements
backend/models/Announcement.js - Consultation hours
backend/models/ConsultationHours.js - Personal events
backend/models/PersonalEvent.js - Status history
backend/models/StatusHistory.js - Time conflict logic
backend/utils/timeMath.js
Status automation
- Scheduled status updater
backend/jobs/statusUpdater.js
Other components
- Student
- Faculty
- Dean / admin
- MongoDB
Connections 31
- Student → Login and entry: starts login
- Faculty → Login and entry: starts login
- Dean / admin → Login and entry: starts login
- Login and entry → Role routing: enters app
frontend/src/App.tsx - Role routing → Role guard: checks role
frontend/src/App.tsx - Role routing → Student dashboard: routes student
frontend/src/App.tsx - Role routing → Faculty dashboard: routes faculty
frontend/src/App.tsx - Role routing → Admin dashboard: routes admin
frontend/src/App.tsx - Role routing → Dean dashboard: routes dean
frontend/src/App.tsx - Admin dashboard → Cohort configuration: reads config
frontend/src/components/AdminDashboard.tsx - Login and entry → Cohort configuration: reads config
frontend/src/components/LandingPage.tsx - Login and entry → Account and QR auth: submits login
- Student dashboard → Faculty operations API: requests portal data
- Faculty dashboard → Faculty operations API: requests portal data
- Admin dashboard → Faculty operations API: requests administration
- Dean dashboard → Faculty operations API: requests portal data
- Express server → Faculty operations API: mounts routes
backend/server.js - Express server → Account and QR auth: mounts routes
backend/server.js - Express server → Scheduled status updater: starts job
backend/server.js - Account and QR auth → User and status: finds and updates
backend/routes/auth.js - Faculty operations API → User and status: queries users
backend/routes/faculty.js - Faculty operations API → Consultation appointments: manages appointments
backend/routes/faculty.js - Faculty operations API → Teaching schedules: manages schedules
backend/routes/faculty.js - Faculty operations API → Announcements: manages announcements
backend/routes/faculty.js - Faculty operations API → Consultation hours: manages hours
backend/routes/faculty.js - Faculty operations API → Personal events: manages events
backend/routes/faculty.js - Faculty operations API → Status history: records status history
backend/routes/faculty.js - Faculty operations API → Time conflict logic: checks time conflicts
backend/routes/faculty.js - JWT role checks → User and status: validates roles
- Scheduled status updater → User and status: updates status
backend/jobs/statusUpdater.js - Express server → MongoDB: connects
backend/server.js