# krutik0806/assessment-hub architecture

> Architecture diagram of the GitHub repository krutik0806/assessment-hub, 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/krutik0806/assessment-hub
- Repository: https://github.com/krutik0806/assessment-hub

## Overview

Assessment Hub lets learners authenticate, choose a test, take it in practice or proctored exam mode, and review results; admins manage tests, users, and question imports. The React app calls Django APIs, whose views coordinate serializers, domain records, analytics, and PDF extraction. The README documents broader capabilities than the sampled implementation excerpts; those branches are included where paths and relationships are supported, with evidence limits reflected in omitted or dashed edges.

Main entry points: [`src/App.jsx`](https://github.com/krutik0806/assessment-hub/blob/main/src/App.jsx) (App Workflow), [`backend/quiz/views.py`](https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/views.py) (API Endpoints), [`src/api.js`](https://github.com/krutik0806/assessment-hub/blob/main/src/api.js) (API Client), [`src/components/AuthPage.jsx`](https://github.com/krutik0806/assessment-hub/blob/main/src/components/AuthPage.jsx) (Sign-in UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Learner Experience"]
  node_app["App Workflow<br/>[App.jsx]"]
  node_auth_ui["Sign-in UI<br/>[AuthPage.jsx]"]
  node_home["Test Catalog<br/>[Home.jsx]"]
  node_quiz["Quiz Session<br/>[Quiz.jsx]"]
  node_proctor["Exam Proctor<br/>[ExamProctor.jsx]"]
  node_results["Results Review<br/>[Results.jsx]"]
  node_leaderboard["Leaderboard<br/>[Leaderboard.jsx]"]
  node_api_client["API Client<br/>[api.js]"]
end

subgraph group_backend["Assessment Services"]
  node_api_views["API Endpoints<br/>[views.py]"]
  node_serializers["API Serializers<br/>[serializers.py]"]
  node_pdf_import["PDF Extraction<br/>[pdf_extractor.py]"]
end

subgraph group_data["Assessment Records"]
  node_records[("Assessment Records<br/>[models.py]")]
  node_question_loader["Question Loader<br/>[load_questions.py]"]
end

subgraph group_admin["Administration"]
  node_admin_ui["Admin Console<br/>[AdminPage.jsx]"]
  node_django_admin["Django Admin<br/>[admin.py]"]
end

subgraph group_security["Identity and Integrity"]
  node_identity["Auth and Tokens<br/>[views.py]"]
  node_integrity["Proctoring Controls<br/>[models.py]"]
end

node_learner(("Learner"))
node_google["Google OAuth"]
node_gemini["AI Providers"]

node_learner -->|"uses"| node_app
node_app -->|"renders"| node_auth_ui
node_app -->|"renders"| node_home
node_app -->|"renders"| node_quiz
node_app -->|"wraps exam"| node_proctor
node_app -->|"renders"| node_results
node_app -->|"renders"| node_leaderboard
node_auth_ui -->|"authenticates via"| node_api_client
node_app -->|"loads identity"| node_api_client
node_home -.->|"requests tests"| node_api_client
node_quiz -->|"finishes session"| node_app
node_app -->|"submits attempt"| node_api_views
node_api_client -->|"calls API"| node_api_views
node_api_views -->|"serializes responses"| node_serializers
node_api_views -->|"reads and writes"| node_records
node_serializers -->|"serializes records"| node_records
node_api_views -->|"extracts questions"| node_pdf_import
node_pdf_import -.->|"AI fallback"| node_gemini
node_admin_ui -.->|"calls API"| node_api_client
node_admin_ui -.->|"manages tests"| node_api_views
node_admin_ui -.->|"imports PDFs"| node_pdf_import
node_django_admin -->|"administers"| node_records
node_question_loader -->|"seeds questions"| node_records
node_api_views -->|"handles auth"| node_identity
node_auth_ui -->|"gets user info"| node_google
node_auth_ui -->|"exchanges identity"| node_api_views
node_proctor -.->|"reports violations"| node_api_views
node_api_views -.->|"tracks violations"| node_integrity
node_leaderboard -.->|"loads rankings"| node_api_client
node_results -.->|"loads review"| node_api_client

click node_app "https://github.com/krutik0806/assessment-hub/blob/main/src/App.jsx"
click node_auth_ui "https://github.com/krutik0806/assessment-hub/blob/main/src/components/AuthPage.jsx"
click node_home "https://github.com/krutik0806/assessment-hub/blob/main/src/components/Home.jsx"
click node_quiz "https://github.com/krutik0806/assessment-hub/blob/main/src/components/Quiz.jsx"
click node_proctor "https://github.com/krutik0806/assessment-hub/blob/main/src/components/ExamProctor.jsx"
click node_results "https://github.com/krutik0806/assessment-hub/blob/main/src/components/Results.jsx"
click node_leaderboard "https://github.com/krutik0806/assessment-hub/blob/main/src/components/Leaderboard.jsx"
click node_api_client "https://github.com/krutik0806/assessment-hub/blob/main/src/api.js"
click node_api_views "https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/views.py"
click node_serializers "https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/serializers.py"
click node_pdf_import "https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/pdf_extractor.py"
click node_records "https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/models.py"
click node_question_loader "https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/management/commands/load_questions.py"
click node_admin_ui "https://github.com/krutik0806/assessment-hub/blob/main/src/components/AdminPage.jsx"
click node_django_admin "https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/admin.py"
click node_identity "https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/views.py"
click node_integrity "https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/models.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_auth_ui,node_home,node_quiz,node_proctor,node_results,node_leaderboard,node_api_client toneBlue
class node_api_views,node_serializers,node_pdf_import toneAmber
class node_records,node_question_loader toneMint
class node_admin_ui,node_django_admin toneRose
class node_identity,node_integrity,node_learner,node_google,node_gemini toneIndigo
```

## Components

### Learner Experience

- [App Workflow](https://github.com/krutik0806/assessment-hub/blob/main/src/App.jsx): `src/App.jsx`
- [Sign-in UI](https://github.com/krutik0806/assessment-hub/blob/main/src/components/AuthPage.jsx): `src/components/AuthPage.jsx`
- [Test Catalog](https://github.com/krutik0806/assessment-hub/blob/main/src/components/Home.jsx): `src/components/Home.jsx`
- [Quiz Session](https://github.com/krutik0806/assessment-hub/blob/main/src/components/Quiz.jsx): `src/components/Quiz.jsx`
- [Exam Proctor](https://github.com/krutik0806/assessment-hub/blob/main/src/components/ExamProctor.jsx): `src/components/ExamProctor.jsx`
- [Results Review](https://github.com/krutik0806/assessment-hub/blob/main/src/components/Results.jsx): `src/components/Results.jsx`
- [Leaderboard](https://github.com/krutik0806/assessment-hub/blob/main/src/components/Leaderboard.jsx): `src/components/Leaderboard.jsx`
- [API Client](https://github.com/krutik0806/assessment-hub/blob/main/src/api.js): `src/api.js`

### Assessment Services

- [API Endpoints](https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/views.py): `backend/quiz/views.py`
- [API Serializers](https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/serializers.py): `backend/quiz/serializers.py`
- [PDF Extraction](https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/pdf_extractor.py): `backend/quiz/pdf_extractor.py`

### Assessment Records

- [Assessment Records](https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/models.py): `backend/quiz/models.py`
- [Question Loader](https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/management/commands/load_questions.py): `backend/quiz/management/commands/load_questions.py`

### Administration

- [Admin Console](https://github.com/krutik0806/assessment-hub/blob/main/src/components/AdminPage.jsx): `src/components/AdminPage.jsx`
- [Django Admin](https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/admin.py): `backend/quiz/admin.py`

### Identity and Integrity

- [Auth and Tokens](https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/views.py): `backend/quiz/views.py`
- [Proctoring Controls](https://github.com/krutik0806/assessment-hub/blob/main/backend/quiz/models.py): `backend/quiz/models.py`

### Other components

- **Learner**
- **Google OAuth**
- **AI Providers**

## Connections

- Learner → App Workflow: uses (evidence: `src/App.jsx`)
- App Workflow → Sign-in UI: renders (evidence: `src/App.jsx`)
- App Workflow → Test Catalog: renders (evidence: `src/App.jsx`)
- App Workflow → Quiz Session: renders (evidence: `src/App.jsx`)
- App Workflow → Exam Proctor: wraps exam (evidence: `src/App.jsx`)
- App Workflow → Results Review: renders (evidence: `src/App.jsx`)
- App Workflow → Leaderboard: renders (evidence: `src/App.jsx`)
- Sign-in UI → API Client: authenticates via (evidence: `src/components/AuthPage.jsx`)
- App Workflow → API Client: loads identity (evidence: `src/App.jsx`)
- Test Catalog → API Client: requests tests
- Quiz Session → App Workflow: finishes session (evidence: `src/App.jsx`)
- App Workflow → API Endpoints: submits attempt (evidence: `src/App.jsx`)
- API Client → API Endpoints: calls API (evidence: `src/api.js`)
- API Endpoints → API Serializers: serializes responses (evidence: `backend/quiz/views.py`)
- API Endpoints → Assessment Records: reads and writes (evidence: `backend/quiz/views.py`)
- API Serializers → Assessment Records: serializes records (evidence: `backend/quiz/serializers.py`)
- API Endpoints → PDF Extraction: extracts questions (evidence: `backend/quiz/views.py`)
- PDF Extraction → AI Providers: AI fallback
- Admin Console → API Client: calls API
- Admin Console → API Endpoints: manages tests
- Admin Console → PDF Extraction: imports PDFs
- Django Admin → Assessment Records: administers (evidence: `backend/quiz/admin.py`)
- Question Loader → Assessment Records: seeds questions (evidence: `backend/quiz/management/commands/load_questions.py`)
- API Endpoints → Auth and Tokens: handles auth (evidence: `backend/quiz/views.py`)
- Sign-in UI → Google OAuth: gets user info (evidence: `src/components/AuthPage.jsx`)
- Sign-in UI → API Endpoints: exchanges identity (evidence: `src/components/AuthPage.jsx`)
- Exam Proctor → API Endpoints: reports violations
- API Endpoints → Proctoring Controls: tracks violations (evidence: `backend/quiz/views.py`)
- Leaderboard → API Client: loads rankings
- Results Review → API Client: loads review
