# ducvlm/1_ltw_cuoiky architecture

> Architecture diagram of the GitHub repository ducvlm/1_ltw_cuoiky, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/ducvlm/1_ltw_cuoiky
- Repository: https://github.com/ducvlm/1_ltw_cuoiky

## Overview

QuizMaster is a React frontend for role-based online multiple-choice exams. The visible user flow is home → register or log in → role-specific area; login/register call an API, while protected routes check the locally stored token and role. The admin dashboard supports account and system management, and the home page describes question banking, exam organization, and grading. Teacher and student workspaces are currently placeholders, so their described capabilities are not represented as implemented flows. The README is empty, and unsampled modules are not inferred beyond documented home-page capabilities.

Main entry points: [`cuoiky/src/App.js`](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/App.js) (Route dispatcher), [`cuoiky/src/pages/AdminDashboard.jsx`](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/AdminDashboard.jsx) (Admin dashboard), [`cuoiky/src/pages/Home.jsx`](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Home.jsx) (Home and features), [`cuoiky/src/api/axiosClient.js`](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/api/axiosClient.js) (Authenticated API client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_routing["Routing and shell"]
  node_app["Route dispatcher<br/>[App.js]"]
  node_layout["Role-aware layout<br/>[Layout.jsx]"]
  node_home["Home and features<br/>[Home.jsx]"]
  node_bootstrap["Application bootstrap<br/>[index.js]"]
end

subgraph group_identity["Account access"]
  node_register["Registration<br/>[Register.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_guard["Role and token guard<br/>[ProtectedRoute.jsx]"]
  node_client["Authenticated API client<br/>[axiosClient.js]"]
end

subgraph group_admin["Administration"]
  node_admin["Admin dashboard<br/>[AdminDashboard.jsx]"]
end

subgraph group_exam["Exam experience"]
  node_teacher["Teacher workspace placeholder<br/>[App.js]"]
  node_student["Exam workspace placeholder<br/>[App.js]"]
  node_questionbank["Question bank<br/>[Home.jsx]"]
  node_examorg["Exam organization<br/>[Home.jsx]"]
  node_grading["Submission and grading<br/>[Home.jsx]"]
end

subgraph group_shared["Shared interface"]
  node_modal["Confirmation modal<br/>[ConfirmModal.jsx]"]
  node_skeleton["Loading skeleton<br/>[Skeleton.jsx]"]
  node_toast["Toast notifications<br/>[Toast.jsx]"]
  node_vitals["Web vitals reporting<br/>[reportWebVitals.js]"]
end

node_visitor(("Visitor / user"))
node_api{{"Backend API"}}

node_visitor -->|"opens routes"| node_app
node_app -->|"wraps routes"| node_layout
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_register
node_app -->|"guards areas"| node_guard
node_app -->|"routes to"| node_admin
node_app -->|"routes to"| node_teacher
node_app -->|"routes to"| node_student
node_login -->|"posts credentials"| node_client
node_register -->|"posts registration"| node_client
node_admin -->|"requests admin data"| node_client
node_client -->|"sends API requests"| node_api
node_guard -->|"redirects unauthenticated"| node_login
node_layout -->|"renders outlet"| node_home
node_home -->|"describes capability"| node_questionbank
node_home -->|"describes capability"| node_examorg
node_home -->|"describes capability"| node_grading
node_admin -->|"renders loading state"| node_skeleton
node_admin -->|"uses confirmation UI"| node_modal
node_admin -->|"uses notifications"| node_toast
node_bootstrap -->|"renders application"| node_app
node_bootstrap -->|"invokes reporting"| node_vitals

click node_app "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/App.js"
click node_layout "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/Layout.jsx"
click node_home "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Home.jsx"
click node_register "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Register.jsx"
click node_login "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Login.jsx"
click node_guard "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/ProtectedRoute.jsx"
click node_client "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/api/axiosClient.js"
click node_admin "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/AdminDashboard.jsx"
click node_teacher "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/App.js"
click node_student "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/App.js"
click node_questionbank "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Home.jsx"
click node_examorg "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Home.jsx"
click node_grading "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Home.jsx"
click node_modal "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/ui/ConfirmModal.jsx"
click node_skeleton "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/ui/Skeleton.jsx"
click node_toast "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/ui/Toast.jsx"
click node_bootstrap "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/index.js"
click node_vitals "https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/reportWebVitals.js"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_app,node_layout,node_home,node_bootstrap,node_visitor toneBlue
class node_register,node_login,node_guard,node_client toneAmber
class node_admin,node_api toneMint
class node_teacher,node_student,node_questionbank,node_examorg,node_grading toneRose
class node_modal,node_skeleton,node_toast,node_vitals toneIndigo
```

## Components

### Routing and shell

- [Route dispatcher](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/App.js): `cuoiky/src/App.js`
- [Role-aware layout](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/Layout.jsx): `cuoiky/src/components/Layout.jsx`
- [Home and features](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Home.jsx): `cuoiky/src/pages/Home.jsx`
- [Application bootstrap](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/index.js): `cuoiky/src/index.js`

### Account access

- [Registration](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Register.jsx): `cuoiky/src/pages/Register.jsx`
- [Login](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Login.jsx): `cuoiky/src/pages/Login.jsx`
- [Role and token guard](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/ProtectedRoute.jsx): `cuoiky/src/components/ProtectedRoute.jsx`
- [Authenticated API client](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/api/axiosClient.js): `cuoiky/src/api/axiosClient.js`

### Administration

- [Admin dashboard](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/AdminDashboard.jsx): `cuoiky/src/pages/AdminDashboard.jsx`

### Exam experience

- [Teacher workspace placeholder](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/App.js): `cuoiky/src/App.js`
- [Exam workspace placeholder](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/App.js): `cuoiky/src/App.js`
- [Question bank](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Home.jsx): `cuoiky/src/pages/Home.jsx`
- [Exam organization](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Home.jsx): `cuoiky/src/pages/Home.jsx`
- [Submission and grading](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/pages/Home.jsx): `cuoiky/src/pages/Home.jsx`

### Shared interface

- [Confirmation modal](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/ui/ConfirmModal.jsx): `cuoiky/src/components/ui/ConfirmModal.jsx`
- [Loading skeleton](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/ui/Skeleton.jsx): `cuoiky/src/components/ui/Skeleton.jsx`
- [Toast notifications](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/components/ui/Toast.jsx): `cuoiky/src/components/ui/Toast.jsx`
- [Web vitals reporting](https://github.com/ducvlm/1_ltw_cuoiky/blob/main/cuoiky/src/reportWebVitals.js): `cuoiky/src/reportWebVitals.js`

### Other components

- **Visitor / user**
- **Backend API**

## Connections

- Visitor / user → Route dispatcher: opens routes (evidence: `cuoiky/src/App.js`)
- Route dispatcher → Role-aware layout: wraps routes (evidence: `cuoiky/src/App.js`)
- Route dispatcher → Home and features: routes to (evidence: `cuoiky/src/App.js`)
- Route dispatcher → Login: routes to (evidence: `cuoiky/src/App.js`)
- Route dispatcher → Registration: routes to (evidence: `cuoiky/src/App.js`)
- Route dispatcher → Role and token guard: guards areas (evidence: `cuoiky/src/App.js`)
- Route dispatcher → Admin dashboard: routes to (evidence: `cuoiky/src/App.js`)
- Route dispatcher → Teacher workspace placeholder: routes to (evidence: `cuoiky/src/App.js`)
- Route dispatcher → Exam workspace placeholder: routes to (evidence: `cuoiky/src/App.js`)
- Login → Authenticated API client: posts credentials (evidence: `cuoiky/src/pages/Login.jsx`)
- Registration → Authenticated API client: posts registration (evidence: `cuoiky/src/pages/Register.jsx`)
- Admin dashboard → Authenticated API client: requests admin data (evidence: `cuoiky/src/pages/AdminDashboard.jsx`)
- Authenticated API client → Backend API: sends API requests (evidence: `cuoiky/src/api/axiosClient.js`)
- Role and token guard → Login: redirects unauthenticated (evidence: `cuoiky/src/components/ProtectedRoute.jsx`)
- Role-aware layout → Home and features: renders outlet (evidence: `cuoiky/src/components/Layout.jsx`)
- Home and features → Question bank: describes capability (evidence: `cuoiky/src/pages/Home.jsx`)
- Home and features → Exam organization: describes capability (evidence: `cuoiky/src/pages/Home.jsx`)
- Home and features → Submission and grading: describes capability (evidence: `cuoiky/src/pages/Home.jsx`)
- Admin dashboard → Loading skeleton: renders loading state (evidence: `cuoiky/src/pages/AdminDashboard.jsx`)
- Admin dashboard → Confirmation modal: uses confirmation UI (evidence: `cuoiky/src/pages/AdminDashboard.jsx`)
- Admin dashboard → Toast notifications: uses notifications (evidence: `cuoiky/src/pages/AdminDashboard.jsx`)
- Application bootstrap → Route dispatcher: renders application (evidence: `cuoiky/src/index.js`)
- Application bootstrap → Web vitals reporting: invokes reporting (evidence: `cuoiky/src/index.js`)
