# examplanner/exam-planner architecture

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

- Interactive diagram: https://gitdiagram.com/examplanner/exam-planner
- Repository: https://github.com/examplanner/exam-planner

## Overview

ExamPlanner is a competitive-exam practice and analytics platform. Students select previous-year papers or mock tests, take an exam, review solutions, and receive performance reports. Staff upload exam PDFs for AI-assisted question extraction and human review before publication. The graph also preserves the documented teacher, admin, and separate Super Admin surfaces. Source excerpts confirm exam-question loading, post-submission evaluation, review-service behavior, and key integrations; other links are limited to relationships documented in the README, so unsampled details are not inferred.

Main entry points: [`apps/backend/app/fastapi_server.py`](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/fastapi_server.py) (API server), [`apps/backend/app/routers/attempts.py`](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/routers/attempts.py) (Exam endpoints), [`apps/backend/app/engine/post_submission_pipeline.py`](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/engine/post_submission_pipeline.py) (Submission analytics), [`apps/backend/app/routers/pipeline.py`](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/routers/pipeline.py) (Pipeline controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_student["Student experience"]
  node_exam_ui["Exam runner<br/>[ExamEnginePage.tsx]"]
  node_report_ui["Performance reports"]
end

subgraph group_api["Backend API"]
  node_api_server["API server<br/>[fastapi_server.py]"]
  node_exam_routes["Exam endpoints<br/>[attempts.py]"]
  node_auth_routes["Authentication<br/>[auth.py]"]
  node_exam_service["Exam services<br/>[exam_service.py]"]
  node_submission["Submission analytics"]
  node_analytics["Analytics aggregation"]
  node_database[("Application database<br/>[session.py]")]
end

subgraph group_ingestion["Exam ingestion"]
  node_pipeline_routes["Pipeline controls<br/>[pipeline.py]"]
  node_extract["PDF question extraction"]
  node_pipeline_state["Pipeline tracking"]
end

subgraph group_operations["Staff operations"]
  node_review["Question review<br/>[review_service.py]"]
  node_admin["Admin console<br/>[AdminPage.tsx]"]
  node_teacher["Teacher portal<br/>[TeacherPage.tsx]"]
  node_superadmin["Super Admin portal<br/>[App.tsx]"]
end

subgraph group_public["Public web"]
  node_marketing["Marketing pages"]
end

node_student(("Students"))
node_staff(("Staff"))

node_student -->|"takes exams"| node_exam_ui
node_exam_ui -.->|"requests exam data"| node_exam_routes
node_exam_routes -.->|"handles exams"| node_exam_service
node_exam_routes -.->|"submits attempt"| node_submission
node_submission -->|"aggregates results"| node_analytics
node_submission -->|"records evaluation"| node_database
node_analytics -.->|"powers reports"| node_report_ui
node_staff -->|"uploads exam PDFs"| node_pipeline_routes
node_pipeline_routes -->|"starts extraction"| node_extract
node_pipeline_routes -->|"tracks pipeline"| node_pipeline_state
node_extract -->|"prepares questions"| node_review
node_staff -->|"reviews questions"| node_review
node_review -->|"updates questions"| node_database
node_admin -.->|"uses API"| node_api_server
node_teacher -.->|"uses API"| node_api_server
node_superadmin -.->|"uses API"| node_api_server
node_marketing -.->|"loads public content"| node_api_server
node_student -->|"signs in"| node_auth_routes
node_api_server -.->|"routes requests"| node_exam_routes

click node_exam_ui "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/frontend/src/pages/ExamEnginePage.tsx"
click node_report_ui "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/frontend/src/components/student/PsychometricReportView.tsx"
click node_api_server "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/fastapi_server.py"
click node_exam_routes "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/routers/attempts.py"
click node_auth_routes "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/routers/auth.py"
click node_exam_service "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/services/exam_service.py"
click node_submission "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/engine/post_submission_pipeline.py"
click node_analytics "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/engine/cumulative_analytics_aggregator.py"
click node_database "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/db/session.py"
click node_pipeline_routes "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/routers/pipeline.py"
click node_extract "https://github.com/examplanner/exam-planner/tree/release/0.0.1/apps/backend/app/pipeline"
click node_pipeline_state "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/services/pipeline_management_service.py"
click node_review "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/hitl/review_service.py"
click node_admin "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/frontend/src/pages/AdminPage.tsx"
click node_teacher "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/frontend/src/pages/TeacherPage.tsx"
click node_superadmin "https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/superadmin/src/App.tsx"
click node_marketing "https://github.com/examplanner/exam-planner/tree/release/0.0.1/apps/marketing/src"

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_exam_ui,node_report_ui toneBlue
class node_api_server,node_exam_routes,node_auth_routes,node_exam_service,node_submission,node_analytics,node_database toneAmber
class node_pipeline_routes,node_extract,node_pipeline_state toneMint
class node_review,node_admin,node_teacher,node_superadmin toneRose
class node_marketing,node_student,node_staff toneIndigo
```

## Components

### Student experience

- [Exam runner](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/frontend/src/pages/ExamEnginePage.tsx): `apps/frontend/src/pages/ExamEnginePage.tsx`
- [Performance reports](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/frontend/src/components/student/PsychometricReportView.tsx): `apps/frontend/src/components/student/PsychometricReportView.tsx`

### Backend API

- [API server](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/fastapi_server.py): `apps/backend/app/fastapi_server.py`
- [Exam endpoints](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/routers/attempts.py): `apps/backend/app/routers/attempts.py`
- [Authentication](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/routers/auth.py): `apps/backend/app/routers/auth.py`
- [Exam services](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/services/exam_service.py): `apps/backend/app/services/exam_service.py`
- [Submission analytics](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/engine/post_submission_pipeline.py): `apps/backend/app/engine/post_submission_pipeline.py`
- [Analytics aggregation](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/engine/cumulative_analytics_aggregator.py): `apps/backend/app/engine/cumulative_analytics_aggregator.py`
- [Application database](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/db/session.py): `apps/backend/app/db/session.py`

### Exam ingestion

- [Pipeline controls](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/routers/pipeline.py): `apps/backend/app/routers/pipeline.py`
- [PDF question extraction](https://github.com/examplanner/exam-planner/tree/release/0.0.1/apps/backend/app/pipeline): `apps/backend/app/pipeline`
- [Pipeline tracking](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/services/pipeline_management_service.py): `apps/backend/app/services/pipeline_management_service.py`

### Staff operations

- [Question review](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/backend/app/hitl/review_service.py): `apps/backend/app/hitl/review_service.py`
- [Admin console](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/frontend/src/pages/AdminPage.tsx): `apps/frontend/src/pages/AdminPage.tsx`
- [Teacher portal](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/frontend/src/pages/TeacherPage.tsx): `apps/frontend/src/pages/TeacherPage.tsx`
- [Super Admin portal](https://github.com/examplanner/exam-planner/blob/release/0.0.1/apps/superadmin/src/App.tsx): `apps/superadmin/src/App.tsx`

### Public web

- [Marketing pages](https://github.com/examplanner/exam-planner/tree/release/0.0.1/apps/marketing/src): `apps/marketing/src`

### Other components

- **Students**
- **Staff**

## Connections

- Students → Exam runner: takes exams
- Exam runner → Exam endpoints: requests exam data
- Exam endpoints → Exam services: handles exams
- Exam endpoints → Submission analytics: submits attempt
- Submission analytics → Analytics aggregation: aggregates results (evidence: `apps/backend/app/engine/post_submission_pipeline.py`)
- Submission analytics → Application database: records evaluation (evidence: `apps/backend/app/engine/post_submission_pipeline.py`)
- Analytics aggregation → Performance reports: powers reports
- Staff → Pipeline controls: uploads exam PDFs
- Pipeline controls → PDF question extraction: starts extraction (evidence: `apps/backend/app/routers/pipeline.py`)
- Pipeline controls → Pipeline tracking: tracks pipeline (evidence: `apps/backend/app/routers/pipeline.py`)
- PDF question extraction → Question review: prepares questions (evidence: `apps/backend/app/hitl/review_service.py`)
- Staff → Question review: reviews questions
- Question review → Application database: updates questions (evidence: `apps/backend/app/hitl/review_service.py`)
- Admin console → API server: uses API
- Teacher portal → API server: uses API
- Super Admin portal → API server: uses API
- Marketing pages → API server: loads public content
- Students → Authentication: signs in
- API server → Exam endpoints: routes requests
