# mosalem149/online-exam-platform_debi-project architecture

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

- Interactive diagram: https://gitdiagram.com/mosalem149/online-exam-platform_debi-project
- Repository: https://github.com/mosalem149/online-exam-platform_debi-project

## Overview

This is a browser-based online exam platform. A student signs up and logs in, proceeds through a welcome page, takes a timed exam, and sees a score on the result page; an expired timer sends them to a timeout page. Exam questions come from a JSON file, while student details, answers, progress-related state, and scores use browser localStorage. The README documents the major capabilities; detailed connections below are limited to those documented or visible in the sampled JavaScript.

Main entry points: [`js/exam.js`](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/exam.js) (Exam controller), [`js/signupLoginForm.js`](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/signupLoginForm.js) (Signup and login), [`welcome.html`](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/welcome.html) (Welcome page), [`index.html`](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/index.html) (Signup page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Student access"]
  node_signup_login["Signup and login<br/>[signupLoginForm.js]"]
  node_entry_page["Signup page<br/>[index.html]"]
  node_welcome["Welcome page<br/>[welcome.html]"]
end

subgraph group_exam["Exam experience"]
  node_exam_page["Exam page<br/>[exam.html]"]
  node_exam_logic["Exam controller<br/>[exam.js]"]
  node_question_data["Question data<br/>[exam_api.json]"]
  node_timer["Countdown timer<br/>[exam.js]"]
  node_progress["Progress tracking<br/>[exam.js]"]
  node_flagging["Question flagging<br/>[exam.js]"]
end

subgraph group_outcomes["Results and persistence"]
  node_browser_storage[("Browser storage")]
  node_timeout["Timeout page<br/>[timeout.html]"]
  node_result_logic["Score display<br/>[result.js]"]
  node_result_page["Result page<br/>[result.html]"]
end

node_student(("Student"))

node_student -->|"opens"| node_entry_page
node_entry_page -->|"validates forms"| node_signup_login
node_signup_login -->|"stores student data"| node_browser_storage
node_signup_login -->|"redirects after login"| node_welcome
node_student -->|"starts exam"| node_welcome
node_welcome -->|"opens exam"| node_exam_page
node_exam_page -->|"runs exam"| node_exam_logic
node_exam_logic -->|"fetches questions"| node_question_data
node_exam_logic -->|"saves answers"| node_browser_storage
node_exam_logic -->|"starts timer"| node_timer
node_exam_logic -->|"updates progress"| node_progress
node_exam_logic -->|"manages flags"| node_flagging
node_timer -->|"redirects on expiry"| node_timeout
node_exam_logic -->|"stores score"| node_browser_storage
node_exam_logic -->|"redirects on submit"| node_result_page
node_result_page -->|"displays score"| node_result_logic
node_result_logic -->|"reads result data"| node_browser_storage

click node_signup_login "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/signupLoginForm.js"
click node_entry_page "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/index.html"
click node_welcome "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/welcome.html"
click node_exam_page "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/exam.html"
click node_exam_logic "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/exam.js"
click node_question_data "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/api/exam_api.json"
click node_timer "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/exam.js"
click node_progress "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/exam.js"
click node_flagging "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/exam.js"
click node_timeout "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/timeout.html"
click node_result_logic "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/result.js"
click node_result_page "https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/result.html"

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_signup_login,node_entry_page,node_welcome toneBlue
class node_exam_page,node_exam_logic,node_question_data,node_timer,node_progress,node_flagging toneAmber
class node_browser_storage,node_timeout,node_result_logic,node_result_page toneMint
class node_student toneIndigo
```

## Components

### Student access

- [Signup and login](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/signupLoginForm.js): `js/signupLoginForm.js`
- [Signup page](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/index.html): `index.html`
- [Welcome page](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/welcome.html): `welcome.html`

### Exam experience

- [Exam page](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/exam.html): `exam.html`
- [Exam controller](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/exam.js): `js/exam.js`
- [Question data](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/api/exam_api.json): `api/exam_api.json`
- [Countdown timer](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/exam.js): `js/exam.js`
- [Progress tracking](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/exam.js): `js/exam.js`
- [Question flagging](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/exam.js): `js/exam.js`

### Results and persistence

- **Browser storage**
- [Timeout page](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/timeout.html): `timeout.html`
- [Score display](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/js/result.js): `js/result.js`
- [Result page](https://github.com/mosalem149/online-exam-platform_debi-project/blob/main/result.html): `result.html`

### Other components

- **Student**

## Connections

- Student → Signup page: opens (evidence: `README.md`)
- Signup page → Signup and login: validates forms (evidence: `README.md`)
- Signup and login → Browser storage: stores student data (evidence: `js/signupLoginForm.js`)
- Signup and login → Welcome page: redirects after login (evidence: `js/signupLoginForm.js`)
- Student → Welcome page: starts exam (evidence: `README.md`)
- Welcome page → Exam page: opens exam (evidence: `README.md`)
- Exam page → Exam controller: runs exam (evidence: `README.md`)
- Exam controller → Question data: fetches questions (evidence: `js/exam.js`)
- Exam controller → Browser storage: saves answers (evidence: `js/exam.js`)
- Exam controller → Countdown timer: starts timer (evidence: `js/exam.js`)
- Exam controller → Progress tracking: updates progress (evidence: `js/exam.js`)
- Exam controller → Question flagging: manages flags (evidence: `js/exam.js`)
- Countdown timer → Timeout page: redirects on expiry (evidence: `js/exam.js`)
- Exam controller → Browser storage: stores score (evidence: `js/exam.js`)
- Exam controller → Result page: redirects on submit (evidence: `js/exam.js`)
- Result page → Score display: displays score (evidence: `README.md`)
- Score display → Browser storage: reads result data (evidence: `js/result.js`)
