# nigradwohl/risk_booster architecture

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

- Interactive diagram: https://gitdiagram.com/nigradwohl/risk_booster
- Repository: https://github.com/nigradwohl/risk_booster

## Overview

Science X Media Risk Booster is a browser-based risk-communication tool for journalists and readers. Its three documented experiences are text feedback, an interactive risk checklist/calculator, and a linked evidence-based wiki. Users enter or assess risk information; the tools identify communication gaps or calculate risk measures and present explanatory feedback. The graph separates those user-facing workflows from their internal analysis and content layers. The README documents the product capabilities; sampled JavaScript supports the wiki generation, shared templates, text analysis, and checklist calculations, while unsampled page wiring is not inferred.

Main entry points: [`www/scripts/handle_checklist.js`](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/handle_checklist.js) (Checklist interaction), [`www/global_scripts.js`](https://github.com/nigradwohl/risk_booster/blob/main/www/global_scripts.js) (Shared page templates), [`www/scripts/build_wiki.js`](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/build_wiki.js) (Wiki rendering), [`www/jtext_interface.html`](https://github.com/nigradwohl/risk_booster/blob/main/www/jtext_interface.html) (Text checker page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_app["Shiny app<br/>[app.R]"]
  node_textpage["Text checker page"]
  node_checkpage["Checklist page"]
  node_treatpage["Treatment checklist"]
  node_wikpage["Risk wiki page<br/>[risk_wiki.html]"]
  node_shared["Shared page templates<br/>[global_scripts.js]"]
  node_header["Header template"]
  node_footer["Footer template"]
end

subgraph group_text["Text checker"]
  node_textlogic["Text analysis<br/>[check_text.js]"]
  node_textresult["Feedback and highlights<br/>[check_text.js]"]
end

subgraph group_checklist["Risk checklist"]
  node_checklogic["Checklist interaction"]
  node_riskcalc["Risk calculations<br/>[calculate_risk.js]"]
  node_riskinputs["Risk inputs"]
  node_riskresults["Risk feedback"]
end

subgraph group_knowledge["Wiki knowledge"]
  node_wikibuilder["Wiki rendering<br/>[build_wiki.js]"]
  node_wikidata["Guidance content<br/>[info_data.js]"]
end

node_user(("Journalist / reader"))

node_user -->|"enters text"| node_textpage
node_textpage -->|"analyzes text"| node_textlogic
node_textlogic -->|"produces feedback"| node_textresult
node_textresult -->|"shows feedback"| node_user
node_user -->|"opens checklist"| node_checkpage
node_user -->|"opens treatment checklist"| node_treatpage
node_checklogic -->|"collects answers"| node_riskinputs
node_riskinputs -->|"updates tables"| node_riskcalc
node_checklogic -->|"reads risk values"| node_riskcalc
node_checklogic -->|"shows results"| node_riskresults
node_riskresults -->|"presents feedback"| node_user
node_user -->|"consults guidance"| node_wikpage
node_wikibuilder -->|"reads entries"| node_wikidata
node_wikibuilder -->|"renders content"| node_wikpage
node_shared -->|"loads template"| node_header
node_shared -->|"loads template"| node_footer

click node_app "https://github.com/nigradwohl/risk_booster/blob/main/app.R"
click node_textpage "https://github.com/nigradwohl/risk_booster/blob/main/www/jtext_interface.html"
click node_checkpage "https://github.com/nigradwohl/risk_booster/blob/main/www/checklist_main.html"
click node_treatpage "https://github.com/nigradwohl/risk_booster/blob/main/www/checklist_impftreat.html"
click node_wikpage "https://github.com/nigradwohl/risk_booster/blob/main/www/risk_wiki.html"
click node_textlogic "https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/check_text.js"
click node_textresult "https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/check_text.js"
click node_checklogic "https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/handle_checklist.js"
click node_riskcalc "https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/calculate_risk.js"
click node_riskinputs "https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/handle_checklist.js"
click node_riskresults "https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/handle_checklist.js"
click node_wikibuilder "https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/build_wiki.js"
click node_wikidata "https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/info_data.js"
click node_shared "https://github.com/nigradwohl/risk_booster/blob/main/www/global_scripts.js"
click node_header "https://github.com/nigradwohl/risk_booster/blob/main/www/header_template.html"
click node_footer "https://github.com/nigradwohl/risk_booster/blob/main/www/footer_template.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_app,node_textpage,node_checkpage,node_treatpage,node_wikpage,node_shared,node_header,node_footer toneBlue
class node_textlogic,node_textresult toneAmber
class node_checklogic,node_riskcalc,node_riskinputs,node_riskresults toneMint
class node_wikibuilder,node_wikidata toneRose
class node_user toneIndigo
```

## Components

### User interfaces

- [Shiny app](https://github.com/nigradwohl/risk_booster/blob/main/app.R): `app.R`
- [Text checker page](https://github.com/nigradwohl/risk_booster/blob/main/www/jtext_interface.html): `www/jtext_interface.html`
- [Checklist page](https://github.com/nigradwohl/risk_booster/blob/main/www/checklist_main.html): `www/checklist_main.html`
- [Treatment checklist](https://github.com/nigradwohl/risk_booster/blob/main/www/checklist_impftreat.html): `www/checklist_impftreat.html`
- [Risk wiki page](https://github.com/nigradwohl/risk_booster/blob/main/www/risk_wiki.html): `www/risk_wiki.html`
- [Shared page templates](https://github.com/nigradwohl/risk_booster/blob/main/www/global_scripts.js): `www/global_scripts.js`
- [Header template](https://github.com/nigradwohl/risk_booster/blob/main/www/header_template.html): `www/header_template.html`
- [Footer template](https://github.com/nigradwohl/risk_booster/blob/main/www/footer_template.html): `www/footer_template.html`

### Text checker

- [Text analysis](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/check_text.js): `www/scripts/check_text.js`
- [Feedback and highlights](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/check_text.js): `www/scripts/check_text.js`

### Risk checklist

- [Checklist interaction](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/handle_checklist.js): `www/scripts/handle_checklist.js`
- [Risk calculations](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/calculate_risk.js): `www/scripts/calculate_risk.js`
- [Risk inputs](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/handle_checklist.js): `www/scripts/handle_checklist.js`
- [Risk feedback](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/handle_checklist.js): `www/scripts/handle_checklist.js`

### Wiki knowledge

- [Wiki rendering](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/build_wiki.js): `www/scripts/build_wiki.js`
- [Guidance content](https://github.com/nigradwohl/risk_booster/blob/main/www/scripts/info_data.js): `www/scripts/info_data.js`

### Other components

- **Journalist / reader**

## Connections

- Journalist / reader → Text checker page: enters text
- Text checker page → Text analysis: analyzes text
- Text analysis → Feedback and highlights: produces feedback
- Feedback and highlights → Journalist / reader: shows feedback
- Journalist / reader → Checklist page: opens checklist
- Journalist / reader → Treatment checklist: opens treatment checklist
- Checklist interaction → Risk inputs: collects answers
- Risk inputs → Risk calculations: updates tables
- Checklist interaction → Risk calculations: reads risk values
- Checklist interaction → Risk feedback: shows results
- Risk feedback → Journalist / reader: presents feedback
- Journalist / reader → Risk wiki page: consults guidance
- Wiki rendering → Guidance content: reads entries
- Wiki rendering → Risk wiki page: renders content
- Shared page templates → Header template: loads template
- Shared page templates → Footer template: loads template
