# radha1008/chainreaction-ewgh-2026 architecture

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

- Interactive diagram: https://gitdiagram.com/radha1008/chainreaction-ewgh-2026
- Repository: https://github.com/radha1008/chainreaction-ewgh-2026

## Overview

Chain Reaction is a browser-based, privacy-first attack-path simulator. A visitor explores fictional recon scenarios or selects everyday habits; the rules engine derives attack paths and severity, then the assessment presents the case board, lowest-cost fixes, and recovery guidance. Analyst mode adds ATT&CK and defender context, while Cipher offers rule-based explanations and habit suggestions. A separate Detection Pack maps selected chain steps to Sigma rules. The graph follows README descriptions and sampled excerpts; unsampled implementation details and detection-rule internals are not inferred.

Main entry points: [`assess.js`](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js) (Full assessment), [`app.js`](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/app.js) (Site shell), [`engine.js`](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/engine.js) (Path and scoring rules), [`data.js`](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/data.js) (Habits and scenarios)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Visitor experience"]
  node_shell["Site shell<br/>[app.js]"]
  node_recon["Recon game<br/>[home.js]"]
  node_cipher["Cipher assistant<br/>[app.js]"]
  node_scenario_library["Scenario library<br/>[app.js]"]
end

subgraph group_assessment["Assessment engine"]
  node_quick_check["Quick check<br/>[assess.js]"]
  node_habit_assessment["Full assessment<br/>[assess.js]"]
  node_path_engine["Path and scoring rules<br/>[engine.js]"]
  node_case_board["Case board<br/>[assess.js]"]
  node_fix_recovery["Fix and recovery plan<br/>[assess.js]"]
  node_analyst_view["Analyst view<br/>[assess.js]"]
end

subgraph group_content["Security content"]
  node_content_catalog["Habits and scenarios<br/>[data.js]"]
  node_chain_export["Printable chain<br/>[card.js]"]
end

subgraph group_detections["Detection pack"]
  node_sigma_rules["Sigma detections"]
end

node_visitor(("Visitor"))

node_visitor -->|"uses"| node_shell
node_shell -->|"routes to"| node_recon
node_shell -->|"routes to"| node_quick_check
node_shell -->|"routes to"| node_habit_assessment
node_visitor -->|"plays"| node_recon
node_visitor -->|"answers"| node_quick_check
node_visitor -->|"selects habits"| node_habit_assessment
node_visitor -->|"browses"| node_scenario_library
node_scenario_library -->|"opens assessment"| node_habit_assessment
node_shell -->|"hosts"| node_cipher
node_cipher -->|"adds habits"| node_habit_assessment
node_quick_check -->|"builds paths"| node_path_engine
node_habit_assessment -->|"builds paths"| node_path_engine
node_path_engine -->|"uses rules data"| node_content_catalog
node_path_engine -->|"supplies paths"| node_case_board
node_case_board -->|"guides fixes"| node_fix_recovery
node_habit_assessment -->|"adds analysis"| node_analyst_view
node_habit_assessment -->|"exports result"| node_chain_export
node_content_catalog -->|"maps chain steps"| node_sigma_rules

click node_shell "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/app.js"
click node_recon "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/home.js"
click node_cipher "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/app.js"
click node_scenario_library "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/app.js"
click node_quick_check "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js"
click node_habit_assessment "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js"
click node_path_engine "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/engine.js"
click node_case_board "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js"
click node_fix_recovery "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js"
click node_analyst_view "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js"
click node_content_catalog "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/data.js"
click node_chain_export "https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/card.js"
click node_sigma_rules "https://github.com/radha1008/chainreaction-ewgh-2026/tree/main/detections/rules"

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_shell,node_recon,node_cipher,node_scenario_library toneBlue
class node_quick_check,node_habit_assessment,node_path_engine,node_case_board,node_fix_recovery,node_analyst_view toneAmber
class node_content_catalog,node_chain_export toneMint
class node_sigma_rules toneRose
class node_visitor toneIndigo
```

## Components

### Visitor experience

- [Site shell](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/app.js): `app.js`
- [Recon game](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/home.js): `home.js`
- [Cipher assistant](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/app.js): `app.js`
- [Scenario library](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/app.js): `app.js`

### Assessment engine

- [Quick check](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js): `assess.js`
- [Full assessment](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js): `assess.js`
- [Path and scoring rules](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/engine.js): `engine.js`
- [Case board](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js): `assess.js`
- [Fix and recovery plan](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js): `assess.js`
- [Analyst view](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/assess.js): `assess.js`

### Security content

- [Habits and scenarios](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/data.js): `data.js`
- [Printable chain](https://github.com/radha1008/chainreaction-ewgh-2026/blob/main/card.js): `card.js`

### Detection pack

- [Sigma detections](https://github.com/radha1008/chainreaction-ewgh-2026/tree/main/detections/rules): `detections/rules`

### Other components

- **Visitor**

## Connections

- Visitor → Site shell: uses (evidence: `README.md`)
- Site shell → Recon game: routes to (evidence: `README.md`)
- Site shell → Quick check: routes to (evidence: `README.md`)
- Site shell → Full assessment: routes to (evidence: `README.md`)
- Visitor → Recon game: plays (evidence: `README.md`)
- Visitor → Quick check: answers (evidence: `README.md`)
- Visitor → Full assessment: selects habits (evidence: `README.md`)
- Visitor → Scenario library: browses (evidence: `README.md`)
- Scenario library → Full assessment: opens assessment (evidence: `app.js`)
- Site shell → Cipher assistant: hosts (evidence: `README.md`)
- Cipher assistant → Full assessment: adds habits (evidence: `app.js`)
- Quick check → Path and scoring rules: builds paths (evidence: `README.md`)
- Full assessment → Path and scoring rules: builds paths (evidence: `README.md`)
- Path and scoring rules → Habits and scenarios: uses rules data (evidence: `engine.js`)
- Path and scoring rules → Case board: supplies paths (evidence: `README.md`)
- Case board → Fix and recovery plan: guides fixes (evidence: `README.md`)
- Full assessment → Analyst view: adds analysis (evidence: `README.md`)
- Full assessment → Printable chain: exports result (evidence: `assess.js`)
- Habits and scenarios → Sigma detections: maps chain steps (evidence: `README.md`)
