# ivanrubert/cuestionario-examenes architecture

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

- Interactive diagram: https://gitdiagram.com/ivanrubert/cuestionario-examenes
- Repository: https://github.com/ivanrubert/cuestionario-examenes

## Overview

This is a browser-based exam quiz app: users choose a subject, unit, topics, and question type, answer a session, then review scored results. Subject question banks supply the content; the quiz engine selects questions, tracks answers and timing, and computes summaries, while the UI presents each stage. Theme and Spanish/Valencian language preferences are persisted locally. The source excerpts show the main calls; index.html was not sampled, so its page-loading wiring is not mapped.

Main entry points: [`js/ui.js`](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/ui.js) (Quiz setup), [`js/data/bank.js`](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/data/bank.js) (Question registry), [`js/quiz.js`](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/quiz.js) (Quiz engine), [`js/app.js`](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/app.js) (App bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Quiz experience"]
  node_app_entry["App bootstrap<br/>[app.js]"]
  node_setup["Quiz setup<br/>[ui.js]"]
  node_question_ui["Question interaction<br/>[ui.js]"]
  node_results_ui["Results review<br/>[ui.js]"]
  node_engine["Quiz engine<br/>[quiz.js]"]
end

subgraph group_content["Question content"]
  node_bank["Question registry<br/>[bank.js]"]
  node_daw["Web deployment<br/>[daw.js]"]
  node_cloud["Cloud introduction"]
  node_bank_example["Bank example<br/>[bank.js]"]
end

subgraph group_prefs["Interface preferences"]
  node_language["Language service<br/>[i18n.js]"]
  node_theme["Theme control<br/>[theme.js]"]
  node_store["Preference store<br/>[store.js]"]
end

node_user(("Learner"))
node_local_storage[("Browser storage")]

node_user -->|"chooses quiz"| node_setup
node_app_entry -->|"initializes"| node_theme
node_app_entry -->|"sets language"| node_language
node_app_entry -->|"initializes UI"| node_question_ui
node_setup -->|"lists subjects"| node_bank
node_setup -->|"counts questions"| node_engine
node_setup -->|"starts session"| node_question_ui
node_question_ui -->|"submits answers"| node_engine
node_question_ui -->|"shows results"| node_results_ui
node_results_ui -->|"gets summary"| node_engine
node_engine -->|"gets questions"| node_bank
node_daw -->|"registers subject"| node_bank
node_cloud -->|"registers subject"| node_bank
node_bank_example -->|"defines format"| node_bank
node_setup -->|"translates UI"| node_language
node_theme -->|"persists theme"| node_store
node_language -->|"persists language"| node_store
node_store -->|"reads and writes"| node_local_storage

click node_app_entry "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/app.js"
click node_setup "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/ui.js"
click node_question_ui "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/ui.js"
click node_results_ui "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/ui.js"
click node_engine "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/quiz.js"
click node_bank "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/data/bank.js"
click node_daw "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/data/daw.js"
click node_cloud "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/data/introduccion_nube.js"
click node_bank_example "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/data/bank.js"
click node_language "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/i18n.js"
click node_theme "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/theme.js"
click node_store "https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/store.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_app_entry,node_setup,node_question_ui,node_results_ui,node_engine toneBlue
class node_bank,node_daw,node_cloud,node_bank_example,node_local_storage toneAmber
class node_language,node_theme,node_store toneMint
class node_user toneIndigo
```

## Components

### Quiz experience

- [App bootstrap](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/app.js): `js/app.js`
- [Quiz setup](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/ui.js): `js/ui.js`
- [Question interaction](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/ui.js): `js/ui.js`
- [Results review](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/ui.js): `js/ui.js`
- [Quiz engine](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/quiz.js): `js/quiz.js`

### Question content

- [Question registry](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/data/bank.js): `js/data/bank.js`
- [Web deployment](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/data/daw.js): `js/data/daw.js`
- [Cloud introduction](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/data/introduccion_nube.js): `js/data/introduccion_nube.js`
- [Bank example](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/data/bank.js): `js/data/bank.js`

### Interface preferences

- [Language service](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/i18n.js): `js/i18n.js`
- [Theme control](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/theme.js): `js/theme.js`
- [Preference store](https://github.com/ivanrubert/cuestionario-examenes/blob/main/js/store.js): `js/store.js`

### Other components

- **Learner**
- **Browser storage**

## Connections

- Learner → Quiz setup: chooses quiz (evidence: `js/ui.js`)
- App bootstrap → Theme control: initializes (evidence: `js/app.js`)
- App bootstrap → Language service: sets language (evidence: `js/app.js`)
- App bootstrap → Question interaction: initializes UI (evidence: `js/app.js`)
- Quiz setup → Question registry: lists subjects (evidence: `js/ui.js`)
- Quiz setup → Quiz engine: counts questions (evidence: `js/ui.js`)
- Quiz setup → Question interaction: starts session (evidence: `js/ui.js`)
- Question interaction → Quiz engine: submits answers (evidence: `js/ui.js`)
- Question interaction → Results review: shows results (evidence: `js/ui.js`)
- Results review → Quiz engine: gets summary (evidence: `js/ui.js`)
- Quiz engine → Question registry: gets questions (evidence: `js/quiz.js`)
- Web deployment → Question registry: registers subject (evidence: `js/data/daw.js`)
- Cloud introduction → Question registry: registers subject (evidence: `js/data/introduccion_nube.js`)
- Bank example → Question registry: defines format (evidence: `js/data/bank.js`)
- Quiz setup → Language service: translates UI (evidence: `js/ui.js`)
- Theme control → Preference store: persists theme (evidence: `js/theme.js`)
- Language service → Preference store: persists language (evidence: `js/i18n.js`)
- Preference store → Browser storage: reads and writes (evidence: `js/store.js`)
