How shirohafomi/spsh works
Student Performance & Study Habits is a role-based student analytics and study-support application. Users authenticate in the React/Vite SPA, then use student, teacher, or administrator capabilities that call an Express API backed by MySQL; prediction and simulation capabilities are served by a unified ML service. Major documented branches include schema-adaptive dashboards, ML monitoring, goals, assignments, sessions, journals, notifications, and saved what-if scenarios. The tree, README, and excerpts support the API and sampled service relationships; unsampled integrations are shown only as unverified where noted.
Main entry points: apiRoutes.js API routing · db.js MySQL database · studentController.js Student handlers · mlService.js Prediction and simulation
Components 27
Web application
- React SPA routes
frontend/src/App.jsx - Session UI
frontend/src/hooks/useAuth.jsx - API client
frontend/src/api.js
API and access
- Express application
src/app.js - API routing
src/routes/apiRoutes.js - Authentication handlers
src/controllers/apiController.js - Student handlers
src/controllers/studentController.js - Admin operations
src/controllers/adminController.js - User and role service
src/services/authService.js - Refresh sessions
src/services/authSessionService.js
Student analytics
- Student records and analytics
src/services/studentService.js - Dataset schema mapping
src/utils/schemaMap.js - AI counsel
src/services/aiCounselService.js - ML drift monitoring
src/services/mlDriftService.js
Study support
- Assignments
src/controllers/assignmentController.js - Goals and check-ins
src/controllers/studyGoalController.js - Study sessions
src/controllers/studySessionController.js - Assignment service
src/services/assignmentService.js - Goal service
src/services/studyGoalService.js - Session service
src/services/studySessionService.js - Notification center
src/services/notificationService.js - Learning journal
src/controllers/learningJournalController.js
Persistence and ML
- Prediction and simulation
src/services/mlService.js - Prediction history
src/services/predictionHistoryService.js - Python prediction runtime
ml/inference.py - MySQL database
src/config/db.js
Other components
- Students and staff
Connections 36
- Students and staff → React SPA routes: uses
README.md - React SPA routes → Session UI: provides routes
frontend/src/App.jsx - Session UI → API client: requests session
frontend/src/hooks/useAuth.jsx - React SPA routes → API client: calls API
- API client → API routing: sends requests
README.md - Express application → API routing: mounts routes
src/app.js - API routing → Authentication handlers: routes auth
src/routes/apiRoutes.js - API routing → Student handlers: routes student actions
src/routes/apiRoutes.js - API routing → Admin operations: routes admin actions
src/routes/apiRoutes.js - API routing → Assignments: routes assignments
src/routes/apiRoutes.js - API routing → Goals and check-ins: routes goals
src/routes/apiRoutes.js - API routing → Study sessions: routes sessions
src/routes/apiRoutes.js - Authentication handlers → User and role service: authenticates users
src/controllers/apiController.js - User and role service → Refresh sessions: manages sessions
src/services/authService.js - Student handlers → Student records and analytics: loads student data
src/controllers/studentController.js - Student handlers → Prediction and simulation: requests predictions
src/controllers/studentController.js - Student handlers → Prediction history: records predictions
src/controllers/studentController.js - Student handlers → AI counsel: requests counsel
src/controllers/studentController.js - Admin operations → Student records and analytics: queries risk data
src/controllers/adminController.js - Admin operations → Prediction and simulation: checks ML health
src/controllers/adminController.js - Prediction and simulation → Student records and analytics: loads student profile
src/services/mlService.js - Prediction and simulation → Python prediction runtime: invokes inference
- Student records and analytics → Dataset schema mapping: adapts columns
src/services/studentService.js - Student records and analytics → MySQL database: reads and writes
src/services/studentService.js - User and role service → MySQL database: reads and writes
src/services/authService.js - Refresh sessions → MySQL database: stores sessions
src/services/authSessionService.js - Assignments → Assignment service: manages coursework
src/controllers/assignmentController.js - Assignment service → MySQL database: persists assignments
- Goals and check-ins → Goal service: manages progress
src/controllers/studyGoalController.js - Goal service → MySQL database: persists goals
src/services/studyGoalService.js - Study sessions → Session service: manages timers
src/controllers/studySessionController.js - Session service → MySQL database: persists sessions
src/services/studySessionService.js - Students and staff → Learning journal: writes reflections
- Students and staff → Notification center: receives alerts
- Prediction and simulation → Prediction history: tracks outcomes
- Students and staff → ML drift monitoring: views model health