How nashd31/examapp works
This is a React/Express exam-management LMS. Teachers administer courses, compose and schedule exams (including AI-assisted drafts), review submissions, grade written responses, and release results; students enroll, take timed exams, and review feedback. The graph follows the documented client-to-REST-server workflow and includes authentication, persistence, and the offline mock-data option. Several feature links are documented in the README or source index; unsampled implementation details are not inferred.
Main entry points: examService.js Exam and course API · TeacherDashboard.jsx Teacher dashboard · server.js Express application · db.js Database adapter
Components 31
Client experience
- Teacher dashboard
client/src/pages/TeacherDashboard.jsx - Exam authoring
client/src/components/ExamEditor.jsx - Course management
client/src/pages/TeacherDashboard.jsx - Student portal
client/src/pages/StudentPortal.jsx - Timed exam
client/src/pages/TakeExam.jsx - Grade review
client/src/components/GradeSubmissionViewer.jsx - Scores and analytics
client/src/components/ExamScoresViewer.jsx - Exam feedback
client/src/components/ReviewExamViewer.jsx - Authentication screens
client/src/pages/Auth.jsx - Exam and course API
client/src/api/examService.js - Authentication API
client/src/api/authService.js - HTTP client
client/src/services/apiClient.js
REST API
- Express application
server/server.js - Exam routes
server/routes/examRoutes.js - Submission routes
server/routes/submissionRoutes.js - Course routes
server/routes/courseRoutes.js - Auth routes
server/routes/authRoutes.js - Exam operations
server/controllers/examController.js - Submission grading
server/controllers/submissionController.js - Course operations
server/controllers/courseController.js - Account operations
server/controllers/authController.js - AI exam architect
server/controllers/aiController.js
Persistence and integrations
- Offline mock data
client/src/api/mockDb.js - Browser storage
client/src/services/storage.js - Database adapter
server/config/db.js - JSON database engine
server/config/jsonDbEngine.js - PostgreSQL
Identity and access
- JWT role checks
server/middleware/authMiddleware.js
Other components
- Gemini AI
- Teacher
- Student
Connections 41
- Teacher → Teacher dashboard: manages exams
- Teacher dashboard → Exam authoring: opens editor
client/src/pages/TeacherDashboard.jsx - Teacher dashboard → Course management: administers courses
client/src/pages/TeacherDashboard.jsx - Teacher dashboard → Grade review: grades submissions
client/src/pages/TeacherDashboard.jsx - Teacher dashboard → Scores and analytics: views analytics
client/src/pages/TeacherDashboard.jsx - Student → Student portal: enrolls and reviews
- Student portal → Timed exam: starts exam
- Student portal → Exam feedback: opens feedback
client/src/pages/StudentPortal.jsx - Teacher dashboard → Exam and course API: requests exam data
client/src/pages/TeacherDashboard.jsx - Exam authoring → Exam and course API: creates exams
- Course management → Exam and course API: manages courses
client/src/api/examService.js - Student portal → Exam and course API: loads courses and exams
client/src/pages/StudentPortal.jsx - Timed exam → Exam and course API: submits answers
client/src/pages/TakeExam.jsx - Grade review → Exam and course API: updates grades
- Scores and analytics → Exam and course API: loads results
client/src/pages/TeacherDashboard.jsx - Authentication screens → Authentication API: authenticates
- Authentication API → Browser storage: stores token
client/src/api/authService.js - Exam and course API → HTTP client: sends requests
client/src/api/examService.js - Authentication API → HTTP client: sends requests
client/src/api/authService.js - Exam and course API → Offline mock data: uses offline fallback
- HTTP client → Express application: calls REST API
- Express application → Exam routes: mounts routes
server/server.js - Express application → Submission routes: mounts routes
server/server.js - Express application → Course routes: mounts routes
server/server.js - Express application → Auth routes: mounts routes
server/server.js - Express application → AI exam architect: mounts AI routes
server/server.js - Exam routes → Exam operations: dispatches requests
server/routes/examRoutes.js - Submission routes → Submission grading: dispatches requests
server/routes/submissionRoutes.js - Course routes → Course operations: dispatches requests
server/routes/courseRoutes.js - Auth routes → Account operations: dispatches requests
server/routes/authRoutes.js - Exam routes → JWT role checks: checks access
server/routes/examRoutes.js - Submission routes → JWT role checks: checks access
server/routes/submissionRoutes.js - Exam operations → Database adapter: queries and writes
server/controllers/examController.js - Submission grading → Database adapter: queries and writes
server/controllers/submissionController.js - Course operations → Database adapter: queries and writes
server/controllers/courseController.js - Account operations → Database adapter: queries and writes
server/controllers/authController.js - Database adapter → PostgreSQL: persists data
- Database adapter → JSON database engine: selects JSON mode
server/config/db.js - JSON database engine → Offline mock data: loads mock records
server/config/jsonDbEngine.js - AI exam architect → Gemini AI: generates exam drafts
- Exam authoring → AI exam architect: requests AI drafts