# sudhakar-cyber/adaptive-quiz-system architecture

> Architecture diagram of the GitHub repository sudhakar-cyber/adaptive-quiz-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/sudhakar-cyber/adaptive-quiz-system
- Repository: https://github.com/sudhakar-cyber/adaptive-quiz-system

## Overview

LearnSmart is a role-based adaptive learning product for students, educators, and administrators. Users enter through login and role-protected routes; students explore and take quizzes, while educators manage quizzes and review learner performance and administrators manage users and platform content. The frontend’s shared browser-storage service supplies application state. The tree also contains backend API and ML-engine modules, but their excerpts show no wiring, so their runtime relationships are not asserted. Several frontend capabilities are represented as subsystem nodes because their component files are listed but not excerpted.

Main entry points: [`frontend/src/App.jsx`](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/App.jsx) (Role router), [`frontend/src/services/sharedDatabase.js`](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/services/sharedDatabase.js) (Shared browser database), [`frontend/src/components/Dashboard.jsx`](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/components/Dashboard.jsx) (Student dashboard), [`frontend/src/pages/EducatorDashboard.jsx`](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/pages/EducatorDashboard.jsx) (Educator dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry and identity"]
  node_app["Role router<br/>[App.jsx]"]
  node_login["Login and registration<br/>[Login.jsx]"]
  node_auth["Auth service<br/>[authService.js]"]
  node_protected["Route guards<br/>[ProtectedRoute.jsx]"]
  node_oauth["OAuth verification"]
end

subgraph group_learning["Student learning"]
  node_student_dash["Student dashboard<br/>[Dashboard.jsx]"]
  node_quiz_catalog["Quiz catalog data<br/>[quizData.js]"]
  node_learning_views["Quiz and progress views"]
end

subgraph group_management["Educator and admin"]
  node_educator_dash["Educator dashboard"]
  node_educator_data["Educator quiz and cohort data<br/>[educatorData.js]"]
  node_educator_views["Educator management views"]
  node_admin_dash["Admin dashboard<br/>[AdminDashboard.jsx]"]
  node_admin_views["Admin management views"]
  node_shared_db[("Shared browser database<br/>[sharedDatabase.js]")]
end

subgraph group_server["Backend and ML"]
  node_api["Backend API modules"]
  node_ml["Adaptive ML engine"]
  node_ml_dash["ML dashboard<br/>[app.py]"]
end

node_learner(("Learner"))
node_educator(("Educator"))
node_admin(("Administrator"))

node_learner -->|"opens"| node_app
node_educator -->|"opens"| node_app
node_admin -->|"opens"| node_app
node_app -->|"routes to"| node_login
node_app -->|"guards routes"| node_protected
node_app -->|"routes to"| node_student_dash
node_app -->|"routes to"| node_educator_dash
node_app -->|"routes to"| node_admin_dash
node_login -->|"uses"| node_auth
node_protected -->|"checks identity"| node_auth
node_login -->|"offers verification"| node_oauth
node_oauth -->|"registers student"| node_shared_db
node_student_dash -->|"reads quiz data"| node_quiz_catalog
node_student_dash -->|"renders"| node_learning_views
node_student_dash -->|"uses"| node_shared_db
node_educator_dash -->|"uses"| node_educator_data
node_educator_dash -->|"renders"| node_educator_views
node_educator_dash -->|"updates cohort"| node_shared_db
node_admin_dash -->|"renders"| node_admin_views
node_admin_dash -->|"registers educator"| node_shared_db
node_shared_db -->|"loads initial data"| node_educator_data
node_shared_db -->|"loads catalog"| node_quiz_catalog

click node_app "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/App.jsx"
click node_login "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/pages/Login.jsx"
click node_auth "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/services/authService.js"
click node_protected "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/routes/ProtectedRoute.jsx"
click node_oauth "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/components/OAuthVerification.jsx"
click node_student_dash "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/components/Dashboard.jsx"
click node_quiz_catalog "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/data/quizData.js"
click node_learning_views "https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/frontend/src/components"
click node_educator_dash "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/pages/EducatorDashboard.jsx"
click node_educator_data "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/data/educatorData.js"
click node_educator_views "https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/frontend/src/components"
click node_admin_dash "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/pages/AdminDashboard.jsx"
click node_admin_views "https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/frontend/src/components"
click node_shared_db "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/services/sharedDatabase.js"
click node_api "https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/backend/app"
click node_ml "https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/backend/ml_engine"
click node_ml_dash "https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/ml_dashboard/app.py"

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_login,node_auth,node_protected,node_oauth toneBlue
class node_student_dash,node_quiz_catalog,node_learning_views toneAmber
class node_educator_dash,node_educator_data,node_educator_views,node_admin_dash,node_admin_views,node_shared_db toneMint
class node_api,node_ml,node_ml_dash toneRose
class node_learner,node_educator,node_admin toneIndigo
```

## Components

### Entry and identity

- [Role router](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Login and registration](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Auth service](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/services/authService.js): `frontend/src/services/authService.js`
- [Route guards](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/routes/ProtectedRoute.jsx): `frontend/src/routes/ProtectedRoute.jsx`
- [OAuth verification](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/components/OAuthVerification.jsx): `frontend/src/components/OAuthVerification.jsx`

### Student learning

- [Student dashboard](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/components/Dashboard.jsx): `frontend/src/components/Dashboard.jsx`
- [Quiz catalog data](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/data/quizData.js): `frontend/src/data/quizData.js`
- [Quiz and progress views](https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/frontend/src/components): `frontend/src/components`

### Educator and admin

- [Educator dashboard](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/pages/EducatorDashboard.jsx): `frontend/src/pages/EducatorDashboard.jsx`
- [Educator quiz and cohort data](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/data/educatorData.js): `frontend/src/data/educatorData.js`
- [Educator management views](https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/frontend/src/components): `frontend/src/components`
- [Admin dashboard](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/pages/AdminDashboard.jsx): `frontend/src/pages/AdminDashboard.jsx`
- [Admin management views](https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/frontend/src/components): `frontend/src/components`
- [Shared browser database](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/frontend/src/services/sharedDatabase.js): `frontend/src/services/sharedDatabase.js`

### Backend and ML

- [Backend API modules](https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/backend/app): `backend/app`
- [Adaptive ML engine](https://github.com/sudhakar-cyber/adaptive-quiz-system/tree/main/backend/ml_engine): `backend/ml_engine`
- [ML dashboard](https://github.com/sudhakar-cyber/adaptive-quiz-system/blob/main/ml_dashboard/app.py): `ml_dashboard/app.py`

### Other components

- **Learner**
- **Educator**
- **Administrator**

## Connections

- Learner → Role router: opens
- Educator → Role router: opens
- Administrator → Role router: opens
- Role router → Login and registration: routes to (evidence: `frontend/src/App.jsx`)
- Role router → Route guards: guards routes (evidence: `frontend/src/App.jsx`)
- Role router → Student dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Role router → Educator dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Role router → Admin dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Login and registration → Auth service: uses (evidence: `frontend/src/pages/Login.jsx`)
- Route guards → Auth service: checks identity (evidence: `frontend/src/routes/ProtectedRoute.jsx`)
- Login and registration → OAuth verification: offers verification (evidence: `frontend/src/pages/Login.jsx`)
- OAuth verification → Shared browser database: registers student (evidence: `frontend/src/components/OAuthVerification.jsx`)
- Student dashboard → Quiz catalog data: reads quiz data (evidence: `frontend/src/components/Dashboard.jsx`)
- Student dashboard → Quiz and progress views: renders (evidence: `frontend/src/components/Dashboard.jsx`)
- Student dashboard → Shared browser database: uses (evidence: `frontend/src/components/Dashboard.jsx`)
- Educator dashboard → Educator quiz and cohort data: uses (evidence: `frontend/src/pages/EducatorDashboard.jsx`)
- Educator dashboard → Educator management views: renders (evidence: `frontend/src/pages/EducatorDashboard.jsx`)
- Educator dashboard → Shared browser database: updates cohort (evidence: `frontend/src/pages/EducatorDashboard.jsx`)
- Admin dashboard → Admin management views: renders (evidence: `frontend/src/pages/AdminDashboard.jsx`)
- Admin dashboard → Shared browser database: registers educator (evidence: `frontend/src/pages/AdminDashboard.jsx`)
- Shared browser database → Educator quiz and cohort data: loads initial data (evidence: `frontend/src/services/sharedDatabase.js`)
- Shared browser database → Quiz catalog data: loads catalog (evidence: `frontend/src/services/sharedDatabase.js`)
