# cole1366/surveyapp architecture

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

- Interactive diagram: https://gitdiagram.com/cole1366/surveyapp
- Repository: https://github.com/cole1366/surveyapp

## Overview

Kadikomu is an offline browser questionnaire for creating and completing interviews, saving progress locally, reviewing answers, and exporting them as a PDF. The main flow is user → interview UI → JavaScript controller, which loads question data, persists answers and progress, and builds the summary and PDF. The README documents these capabilities; the sampled controller confirms the runtime behavior, while UI structure is represented by the existing HTML file.

Main entry points: [`script.js`](https://github.com/cole1366/surveyapp/blob/main/script.js) (Interview controller), [`index.html`](https://github.com/cole1366/surveyapp/blob/main/index.html) (App views and controls), [`data/questions.json`](https://github.com/cole1366/surveyapp/blob/main/data/questions.json) (Question set)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Questionnaire interface"]
  node_ui["App views and controls<br/>[index.html]"]
  node_interview["Question and progress UI<br/>[index.html]"]
  node_summary["Answer summary<br/>[index.html]"]
end

subgraph group_flow["Interview flow"]
  node_controller["Interview controller<br/>[script.js]"]
  node_questions["Question set<br/>[questions.json]"]
end

subgraph group_data_export["Data and export"]
  node_saved_state[("Saved answers and progress")]
  node_pdf_export["PDF generation<br/>[script.js]"]
  node_jspdf["jsPDF library"]
  node_pdf_file["Downloaded answer PDF"]
end

node_user(("Interview user"))

node_user -->|"uses"| node_ui
node_ui -->|"triggers actions"| node_controller
node_controller -->|"loads questions"| node_questions
node_controller -->|"renders questions"| node_interview
node_interview -->|"submits answers"| node_controller
node_controller -->|"reads and writes"| node_saved_state
node_controller -->|"renders answers"| node_summary
node_controller -->|"builds PDF"| node_pdf_export
node_pdf_export -->|"uses"| node_jspdf
node_pdf_export -->|"downloads"| node_pdf_file
node_user -->|"downloads"| node_pdf_file

click node_ui "https://github.com/cole1366/surveyapp/blob/main/index.html"
click node_controller "https://github.com/cole1366/surveyapp/blob/main/script.js"
click node_questions "https://github.com/cole1366/surveyapp/blob/main/data/questions.json"
click node_interview "https://github.com/cole1366/surveyapp/blob/main/index.html"
click node_summary "https://github.com/cole1366/surveyapp/blob/main/index.html"
click node_pdf_export "https://github.com/cole1366/surveyapp/blob/main/script.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_ui,node_interview,node_summary,node_user toneBlue
class node_controller,node_questions toneAmber
class node_saved_state,node_pdf_export,node_jspdf,node_pdf_file toneMint
```

## Components

### Questionnaire interface

- [App views and controls](https://github.com/cole1366/surveyapp/blob/main/index.html): `index.html`
- [Question and progress UI](https://github.com/cole1366/surveyapp/blob/main/index.html): `index.html`
- [Answer summary](https://github.com/cole1366/surveyapp/blob/main/index.html): `index.html`

### Interview flow

- [Interview controller](https://github.com/cole1366/surveyapp/blob/main/script.js): `script.js`
- [Question set](https://github.com/cole1366/surveyapp/blob/main/data/questions.json): `data/questions.json`

### Data and export

- **Saved answers and progress**
- [PDF generation](https://github.com/cole1366/surveyapp/blob/main/script.js): `script.js`
- **jsPDF library**
- **Downloaded answer PDF**

### Other components

- **Interview user**

## Connections

- Interview user → App views and controls: uses
- App views and controls → Interview controller: triggers actions
- Interview controller → Question set: loads questions
- Interview controller → Question and progress UI: renders questions
- Question and progress UI → Interview controller: submits answers
- Interview controller → Saved answers and progress: reads and writes
- Interview controller → Answer summary: renders answers
- Interview controller → PDF generation: builds PDF
- PDF generation → jsPDF library: uses
- PDF generation → Downloaded answer PDF: downloads
- Interview user → Downloaded answer PDF: downloads
