How lchithanh/web_tracnghiem works
This is an online multiple-choice exam management system: a React role-based interface uses a Laravel REST API for authentication, courses/classes, exam authoring, timed attempts, and results. The main student workflow is browse exams, start and submit an attempt, then view its score and history; teacher and admin workflows manage the content and users behind it. The graph follows documented routes and sampled references. Some frontend pages and backend controllers are indexed but unsampled, so their internal calls are not expanded.
Main entry points: api.php API routes · App.jsx Role routes · axiosClient.js API client · Attempt.php Attempt records
Components 26
React application
- Role routes
my-react-fe/src/App.jsx - Auth state
my-react-fe/src/context/AuthContext.jsx - API client
my-react-fe/src/api/axiosClient.js - User management
my-react-fe/src/pages/admin/UserManager.jsx - Admin tools
my-react-fe/src/pages/admin - Teacher tools
my-react-fe/src/pages/teacher - Student exam UI
my-react-fe/src/pages/student
Identity and access
- Authentication
my-laravel-be/app/Http/Controllers/AuthController.php - User administration
my-laravel-be/app/Http/Controllers/Api/UserController.php - User accounts
my-laravel-be/app/Models/User.php
Learning domain
- Exam management
my-laravel-be/app/Http/Controllers/Api/ExamController.php - Question bank
my-laravel-be/app/Http/Controllers/Api/QuestionController.php - Answer choices
my-laravel-be/app/Http/Controllers/Api/AnswerController.php - Question import
my-laravel-be/app/Http/Controllers/Api/ImportController.php - Class management
my-laravel-be/app/Http/Controllers/Api/ClassroomController.php - Class enrollment
my-laravel-be/app/Http/Controllers/Api/JoinController.php - Exam attempts
my-laravel-be/app/Http/Controllers/Api/AttemptController.php - Attempt responses
my-laravel-be/app/Http/Controllers/Api/AttemptAnswerController.php - Attempt records
my-laravel-be/app/Models/Attempt.php - Exam records
my-laravel-be/app/Models/Exam.php - Class records
my-laravel-be/app/Models/Classroom.php
Laravel API
- API routes
my-laravel-be/routes/api.php - Relational database
Other components
- Student
- Teacher
- Administrator
Connections 34
- Role routes → Auth state: provides auth
my-react-fe/src/App.jsx - Role routes → Admin tools: routes admin
my-react-fe/src/App.jsx - Role routes → Teacher tools: routes teacher
my-react-fe/src/App.jsx - Role routes → Student exam UI: routes student
my-react-fe/src/App.jsx - Auth state → API client: calls
my-react-fe/src/context/AuthContext.jsx - User management → API client: calls
my-react-fe/src/pages/admin/UserManager.jsx - Admin tools → API client: calls
my-react-fe/src/pages/admin/UserManager.jsx - Teacher tools → API client: calls
my-react-fe/src/pages/teacher/ExamManager.jsx - Student exam UI → API client: calls
- API client → API routes: HTTP requests
my-react-fe/src/api/axiosClient.js - API routes → Authentication: dispatches
my-laravel-be/routes/api.php - API routes → User administration: dispatches
my-laravel-be/routes/api.php - API routes → Exam management: dispatches
my-laravel-be/routes/api.php - API routes → Question bank: dispatches
my-laravel-be/routes/api.php - API routes → Answer choices: dispatches
my-laravel-be/routes/api.php - API routes → Question import: dispatches
my-laravel-be/routes/api.php - API routes → Class management: dispatches
my-laravel-be/routes/api.php - API routes → Class enrollment: dispatches
my-laravel-be/routes/api.php - API routes → Exam attempts: dispatches
my-laravel-be/routes/api.php - API routes → Attempt responses: dispatches
my-laravel-be/routes/api.php - Authentication → User accounts: uses account
my-laravel-be/app/Http/Controllers/AuthController.php - User administration → User accounts: uses account
my-laravel-be/app/Http/Controllers/Api/UserController.php - Exam management → Exam records: uses exam
my-laravel-be/app/Http/Controllers/Api/ExamController.php - Exam management → Attempt records: reads attempts
my-laravel-be/app/Http/Controllers/Api/ExamController.php - Class management → Class records: uses class
my-laravel-be/app/Http/Controllers/Api/ClassroomController.php - Exam attempts → Attempt records: uses attempt
my-laravel-be/app/Http/Controllers/Api/AttemptController.php - Attempt responses → Attempt records: uses attempt
my-laravel-be/app/Http/Controllers/Api/AttemptAnswerController.php - Attempt records → Exam records: belongs to
my-laravel-be/app/Models/Attempt.php - Exam records → Relational database: persists records
- Class records → Relational database: persists records
- User accounts → Relational database: persists records
- Student → Role routes: uses portal
my-react-fe/src/App.jsx - Teacher → Role routes: uses portal
my-react-fe/src/App.jsx - Administrator → Role routes: uses portal
my-react-fe/src/App.jsx