How n0ngxarm/checkclass works
Teachers use the attendance system to sign in, review class and attendance summaries, record student attendance, manage student records, and inspect daily or individual reports. The modern Next.js frontend calls a PHP JSON API backed by MySQL; a parallel server-rendered PHP interface is also present. The graph preserves the documented dashboard, attendance, student-management, and reporting capabilities. Relationships between the sampled Next.js client and API are explicit; several backend endpoints and legacy pages were not excerpted, so their internal call paths are not expanded.
Main entry points: api.js API client · database.php Database connection · functions.php PHP domain helpers · cors.php CORS and API auth
Components 23
Web interfaces
- Analytics dashboard
frontend/app/dashboard/page.js - Take attendance
frontend/app/attendance/take/page.js - Student management
frontend/app/students/page.js - Daily and individual reports
frontend/app/reports/page.js - Date picker
frontend/components/CustomDatePicker.jsx - Navigation and session UI
frontend/components/Navbar.jsx - API client
frontend/lib/api.js - PHP dashboard
pages/dashboard.php - PHP attendance entry
pages/attendance_take.php - PHP student management
pages/students.php - PHP individual report
pages/report_individual.php
PHP API
- Authentication endpoints
api/auth/login.php - Dashboard endpoint
api/dashboard.php - Attendance endpoint
api/attendance.php - Student endpoint
api/students.php - Report endpoints
api/reports/daily.php - Class endpoint
api/classes.php
Shared data and access
- CORS and API auth
api/cors.php - PHP page auth
includes/auth.php - PHP domain helpers
includes/functions.php - Database connection
config/database.php - MySQL database
Other components
- Teacher
Connections 39
- Teacher → Analytics dashboard: views
- Teacher → Take attendance: records attendance
- Teacher → Student management: manages students
- Teacher → Daily and individual reports: reviews reports
- Analytics dashboard → API client: requests data
frontend/app/dashboard/page.js - Take attendance → API client: loads and saves
frontend/app/attendance/take/page.js - Student management → API client: manages via
frontend/app/students/page.js - Daily and individual reports → API client: requests reports
frontend/app/reports/page.js - Daily and individual reports → Date picker: renders
frontend/app/reports/page.js - Analytics dashboard → Navigation and session UI: uses
frontend/app/dashboard/page.js - Take attendance → Navigation and session UI: uses
frontend/app/attendance/take/page.js - Student management → Navigation and session UI: uses
frontend/app/students/page.js - Daily and individual reports → Navigation and session UI: uses
frontend/app/reports/page.js - API client → Authentication endpoints: sends auth requests
frontend/lib/api.js - API client → Dashboard endpoint: requests dashboard
frontend/lib/api.js - API client → Attendance endpoint: loads and saves
frontend/lib/api.js - API client → Student endpoint: manages students
frontend/lib/api.js - API client → Report endpoints: requests reports
frontend/lib/api.js - API client → Class endpoint: requests classes
frontend/lib/api.js - Attendance endpoint → CORS and API auth: initializes requests
api/attendance.php - Student endpoint → CORS and API auth: authenticates requests
api/students.php - Authentication endpoints → CORS and API auth: uses shared API support
api/auth/login.php - Dashboard endpoint → CORS and API auth: uses shared API support
api/dashboard.php - Report endpoints → CORS and API auth: uses shared API support
api/reports/daily.php - Attendance endpoint → Database connection: opens connection
api/attendance.php - Student endpoint → Database connection: opens connection
api/students.php - Dashboard endpoint → Database connection: opens connection
api/dashboard.php - Report endpoints → Database connection: opens connection
api/reports/daily.php - Database connection → MySQL database: connects
config/database.php - PHP dashboard → PHP page auth: requires login
pages/dashboard.php - PHP dashboard → PHP domain helpers: loads helpers
pages/dashboard.php - PHP attendance entry → PHP page auth: requires login
pages/attendance_take.php - PHP attendance entry → PHP domain helpers: loads helpers
pages/attendance_take.php - PHP student management → PHP page auth: requires login
pages/students.php - PHP student management → PHP domain helpers: loads helpers
pages/students.php - PHP individual report → PHP page auth: requires login
pages/report_individual.php - PHP individual report → PHP domain helpers: loads helpers
pages/report_individual.php - PHP domain helpers → Database connection: opens connections
includes/functions.php - PHP dashboard → MySQL database: queries attendance
pages/dashboard.php