# dekatche099/accesseltp_sbequiz architecture

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

- Interactive diagram: https://gitdiagram.com/dekatche099/accesseltp_sbequiz
- Repository: https://github.com/dekatche099/accesseltp_sbequiz

## Overview

ELTP Quiz Hub is a static browser study platform: learners choose a track and course, then use practice quizzes, timed exams, flashcards, and a separate free-form workbook. The quiz runtime loads and validates course banks, runs study sessions, renders results, and saves progress locally; sign-in enables optional cloud sync. The graph also shows workbook storage/sync and account paths documented by the README. Source excerpts were partial, so uncertain page-level wiring and workbook internals are omitted.

Main entry points: [`engine/app.js`](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/app.js) (Quiz bootstrap), [`engine/ui-renderer.js`](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/ui-renderer.js) (Quiz renderer), [`engine/storage.js`](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/storage.js) (Local progress), [`engine/firebase-auth.js`](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/firebase-auth.js) (Firebase identity)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_learning["Quiz learning"]
  node_grad["Graduate track<br/>[grad-track.html]"]
  node_retail["Retail track<br/>[retail-track.html]"]
  node_coursepage["Course page<br/>[course.html]"]
  node_banks["Question banks"]
  node_exam["Quiz and exam<br/>[exam-engine.js]"]
  node_flash["Flashcards"]
end

subgraph group_workbooks["Practice workbooks"]
  node_workbookpage["Workbook space<br/>[workbooks.html]"]
  node_workbookdata["Workbook content<br/>[workbooks.html]"]
end

subgraph group_identity["Identity and sync"]
  node_auth["Firebase identity<br/>[firebase-auth.js]"]
  node_pinauth["PIN accounts<br/>[pin-auth.js]"]
  node_cloud["Progress sync<br/>[cloud-sync.js]"]
  node_workbooksync["Workbook sync<br/>[workbook-sync.js]"]
end

subgraph group_runtime["Shared runtime"]
  node_loader["Course loader<br/>[loader.js]"]
  node_app["Quiz bootstrap<br/>[app.js]"]
  node_state["Shared state<br/>[state.js]"]
  node_renderer["Quiz renderer<br/>[ui-renderer.js]"]
  node_analytics["Progress analytics<br/>[analytics.js]"]
  node_storage[("Local progress<br/>[storage.js]")]
end

node_learner(("Learner"))
node_hub["Login hub<br/>[index.html]"]
node_firestore[("Firestore")]

node_learner -->|"opens"| node_hub
node_learner -->|"chooses track"| node_grad
node_learner -->|"chooses track"| node_retail
node_grad -->|"opens course"| node_coursepage
node_retail -->|"opens course"| node_coursepage
node_coursepage -->|"imports"| node_app
node_app -->|"loads course"| node_loader
node_loader -->|"fetches JSON"| node_banks
node_app -->|"initializes"| node_state
node_app -->|"creates"| node_exam
node_app -->|"creates"| node_flash
node_app -->|"creates"| node_renderer
node_app -->|"creates"| node_analytics
node_app -->|"creates"| node_storage
node_exam -->|"updates"| node_state
node_exam -->|"persists"| node_storage
node_flash -->|"updates"| node_state
node_flash -->|"persists"| node_storage
node_renderer -->|"renders"| node_state
node_renderer -->|"starts sessions"| node_exam
node_renderer -->|"starts decks"| node_flash
node_renderer -->|"reads and clears"| node_storage
node_renderer -->|"logs out"| node_auth
node_analytics -->|"reads progress"| node_storage
node_learner -->|"opens"| node_workbookpage
node_workbookpage -->|"edits and saves"| node_workbookdata
node_hub -->|"account access"| node_auth
node_auth -->|"stores profiles"| node_firestore
node_auth -->|"auth state"| node_cloud
node_cloud -.->|"checks fallback"| node_pinauth
node_pinauth -.->|"manages PIN accounts"| node_firestore
node_cloud -->|"pulls and watches writes"| node_storage
node_cloud -->|"syncs progress"| node_firestore
node_workbookpage -->|"syncs workbooks"| node_workbooksync
node_workbooksync -->|"reads and writes"| node_firestore
node_workbooksync -->|"uses shared project"| node_auth

click node_hub "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/index.html"
click node_grad "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/grad-track.html"
click node_retail "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/retail-track.html"
click node_coursepage "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/course.html"
click node_banks "https://github.com/dekatche099/accesseltp_sbequiz/tree/main/courses"
click node_loader "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/loader.js"
click node_app "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/app.js"
click node_state "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/state.js"
click node_exam "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/exam-engine.js"
click node_flash "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/flashcard-engine.js"
click node_renderer "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/ui-renderer.js"
click node_analytics "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/analytics.js"
click node_storage "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/storage.js"
click node_workbookpage "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/workbooks.html"
click node_workbookdata "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/workbooks.html"
click node_auth "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/firebase-auth.js"
click node_pinauth "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/pin-auth.js"
click node_cloud "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/cloud-sync.js"
click node_workbooksync "https://github.com/dekatche099/accesseltp_sbequiz/blob/main/workbook-sync.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_grad,node_retail,node_coursepage,node_banks,node_exam,node_flash toneBlue
class node_workbookpage,node_workbookdata,node_firestore toneAmber
class node_auth,node_pinauth,node_cloud,node_workbooksync toneMint
class node_loader,node_app,node_state,node_renderer,node_analytics,node_storage toneRose
class node_learner toneIndigo
class node_hub toneTeal
```

## Components

### Quiz learning

- [Graduate track](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/grad-track.html): `grad-track.html`
- [Retail track](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/retail-track.html): `retail-track.html`
- [Course page](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/course.html): `course.html`
- [Question banks](https://github.com/dekatche099/accesseltp_sbequiz/tree/main/courses): `courses`
- [Quiz and exam](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/exam-engine.js): `engine/exam-engine.js`
- [Flashcards](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/flashcard-engine.js): `engine/flashcard-engine.js`

### Practice workbooks

- [Workbook space](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/workbooks.html): `workbooks.html`
- [Workbook content](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/workbooks.html): `workbooks.html`

### Identity and sync

- [Firebase identity](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/firebase-auth.js): `engine/firebase-auth.js`
- [PIN accounts](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/pin-auth.js): `engine/pin-auth.js`
- [Progress sync](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/cloud-sync.js): `cloud-sync.js`
- [Workbook sync](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/workbook-sync.js): `workbook-sync.js`

### Shared runtime

- [Course loader](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/loader.js): `engine/loader.js`
- [Quiz bootstrap](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/app.js): `engine/app.js`
- [Shared state](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/state.js): `engine/state.js`
- [Quiz renderer](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/ui-renderer.js): `engine/ui-renderer.js`
- [Progress analytics](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/analytics.js): `engine/analytics.js`
- [Local progress](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/engine/storage.js): `engine/storage.js`

### Other components

- **Learner**
- [Login hub](https://github.com/dekatche099/accesseltp_sbequiz/blob/main/index.html): `index.html`
- **Firestore**

## Connections

- Learner → Login hub: opens
- Learner → Graduate track: chooses track
- Learner → Retail track: chooses track
- Graduate track → Course page: opens course
- Retail track → Course page: opens course
- Course page → Quiz bootstrap: imports
- Quiz bootstrap → Course loader: loads course
- Course loader → Question banks: fetches JSON
- Quiz bootstrap → Shared state: initializes
- Quiz bootstrap → Quiz and exam: creates
- Quiz bootstrap → Flashcards: creates
- Quiz bootstrap → Quiz renderer: creates
- Quiz bootstrap → Progress analytics: creates
- Quiz bootstrap → Local progress: creates
- Quiz and exam → Shared state: updates
- Quiz and exam → Local progress: persists
- Flashcards → Shared state: updates
- Flashcards → Local progress: persists
- Quiz renderer → Shared state: renders
- Quiz renderer → Quiz and exam: starts sessions
- Quiz renderer → Flashcards: starts decks
- Quiz renderer → Local progress: reads and clears
- Quiz renderer → Firebase identity: logs out
- Progress analytics → Local progress: reads progress
- Learner → Workbook space: opens
- Workbook space → Workbook content: edits and saves
- Login hub → Firebase identity: account access
- Firebase identity → Firestore: stores profiles
- Firebase identity → Progress sync: auth state
- Progress sync → PIN accounts: checks fallback
- PIN accounts → Firestore: manages PIN accounts
- Progress sync → Local progress: pulls and watches writes
- Progress sync → Firestore: syncs progress
- Workbook space → Workbook sync: syncs workbooks
- Workbook sync → Firestore: reads and writes
- Workbook sync → Firebase identity: uses shared project
