# awsaimlkenyaug/exam-simulator-js architecture

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

- Interactive diagram: https://gitdiagram.com/awsaimlkenyaug/exam-simulator-js
- Repository: https://github.com/awsaimlkenyaug/exam-simulator-js

## Overview

Exam Simulator is a browser-based study and timed-exam application. A user selects a mode and uploads a VCE or PDF; the application delegates parsing and exam state to the simulator, then presents questions, feedback, timing, and results. Separate VCE-to-PDF conversion and downloadable exam-result PDFs are also documented. The sampled source supports the principal calls shown; some UI markup and PDF-result generation details are only partially excerpted, so their internal wiring is not expanded.

Main entry points: [`js/app.js`](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/app.js) (Application controller), [`js/vce-to-pdf.js`](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/vce-to-pdf.js) (VCE-to-PDF converter), [`js/exam-simulator.js`](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/exam-simulator.js) (Exam simulator), [`index.html`](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/index.html) (Web interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Exam experience"]
  node_webui["Web interface<br/>[index.html]"]
  node_app["Application controller<br/>[app.js]"]
end

subgraph group_exam["Exam runtime"]
  node_simulator["Exam simulator<br/>[exam-simulator.js]"]
  node_study["Study feedback<br/>[exam-simulator.js]"]
  node_timing["Exam timing<br/>[exam-simulator.js]"]
  node_review["Review and scoring<br/>[exam-simulator.js]"]
end

subgraph group_ingestion["Question ingestion"]
  node_vce["VCE parser<br/>[vce-parser.js]"]
  node_pdfparser["PDF parser<br/>[pdf-parser.js]"]
end

subgraph group_exports["PDF exports"]
  node_converter["VCE-to-PDF converter<br/>[vce-to-pdf.js]"]
end

node_learner(("Learner"))
node_pdfjs["PDF.js"]
node_jspdf["jsPDF"]
node_download["Browser download"]

node_learner -->|"uses"| node_webui
node_webui -->|"drives"| node_app
node_app -->|"loads and starts"| node_simulator
node_simulator -->|"parses VCE"| node_vce
node_simulator -->|"parses PDF"| node_pdfparser
node_pdfparser -->|"extracts text"| node_pdfjs
node_app -->|"renders feedback"| node_study
node_app -->|"updates timer"| node_timing
node_app -->|"shows results"| node_review
node_app -->|"requests PDF"| node_converter
node_converter -->|"parses VCE"| node_vce
node_converter -->|"generates document"| node_jspdf
node_app -->|"downloads results PDF"| node_converter
node_converter -->|"triggers download"| node_download

click node_webui "https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/index.html"
click node_app "https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/app.js"
click node_simulator "https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/exam-simulator.js"
click node_study "https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/exam-simulator.js"
click node_timing "https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/exam-simulator.js"
click node_review "https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/exam-simulator.js"
click node_vce "https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/vce-parser.js"
click node_pdfparser "https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/pdf-parser.js"
click node_converter "https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/vce-to-pdf.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_webui,node_app,node_download toneBlue
class node_simulator,node_study,node_timing,node_review toneAmber
class node_vce,node_pdfparser toneMint
class node_converter toneRose
class node_learner,node_pdfjs,node_jspdf toneIndigo
```

## Components

### Exam experience

- [Web interface](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/index.html): `index.html`
- [Application controller](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/app.js): `js/app.js`

### Exam runtime

- [Exam simulator](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/exam-simulator.js): `js/exam-simulator.js`
- [Study feedback](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/exam-simulator.js): `js/exam-simulator.js`
- [Exam timing](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/exam-simulator.js): `js/exam-simulator.js`
- [Review and scoring](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/exam-simulator.js): `js/exam-simulator.js`

### Question ingestion

- [VCE parser](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/vce-parser.js): `js/vce-parser.js`
- [PDF parser](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/pdf-parser.js): `js/pdf-parser.js`

### PDF exports

- [VCE-to-PDF converter](https://github.com/awsaimlkenyaug/exam-simulator-js/blob/master/js/vce-to-pdf.js): `js/vce-to-pdf.js`

### Other components

- **Learner**
- **PDF.js**
- **jsPDF**
- **Browser download**

## Connections

- Learner → Web interface: uses (evidence: `README.md`)
- Web interface → Application controller: drives (evidence: `js/app.js`)
- Application controller → Exam simulator: loads and starts (evidence: `js/app.js`)
- Exam simulator → VCE parser: parses VCE (evidence: `js/exam-simulator.js`)
- Exam simulator → PDF parser: parses PDF (evidence: `js/exam-simulator.js`)
- PDF parser → PDF.js: extracts text (evidence: `js/pdf-parser.js`)
- Application controller → Study feedback: renders feedback (evidence: `js/app.js`)
- Application controller → Exam timing: updates timer (evidence: `js/app.js`)
- Application controller → Review and scoring: shows results (evidence: `js/app.js`)
- Application controller → VCE-to-PDF converter: requests PDF (evidence: `js/app.js`)
- VCE-to-PDF converter → VCE parser: parses VCE (evidence: `js/vce-to-pdf.js`)
- VCE-to-PDF converter → jsPDF: generates document (evidence: `js/vce-to-pdf.js`)
- Application controller → VCE-to-PDF converter: downloads results PDF (evidence: `js/app.js`)
- VCE-to-PDF converter → Browser download: triggers download (evidence: `js/vce-to-pdf.js`)
