# ironlegit/reducktor architecture

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

- Interactive diagram: https://gitdiagram.com/ironlegit/reducktor
- Repository: https://github.com/ironlegit/reducktor

## Overview

ReDucktor is a browser-based text redaction tool. Users enter text, apply custom or thematic redactors, then use the displayed output for copying or sharing. The thematic options cover names, organizations, emails, places, dates, and phone patterns; an experimental name-list redactor is also present. The graph shows the UI controls, redaction logic, and name-list data. Source excerpts establish the JavaScript interactions; README statements document the product capabilities and NLP dependencies. The name-list selection path and page wiring are not shown, so those links are omitted.

Main entry points: [`js/main.js`](https://github.com/ironlegit/reducktor/blob/main/js/main.js) (Redaction engine), [`js/button.js`](https://github.com/ironlegit/reducktor/blob/main/js/button.js) (UI controls), [`data`](https://github.com/ironlegit/reducktor/tree/main/data) (Regional name lists)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Text interface"]
  node_controls["UI controls<br/>[button.js]"]
end

subgraph group_redaction["Redaction logic"]
  node_redactor["Redaction engine<br/>[main.js]"]
  node_nlp["Compromise NLP"]
  node_date_nlp["Date plugin"]
end

subgraph group_name_data["Name data"]
  node_name_lists["Regional name lists"]
end

node_user(("User"))

node_user -->|"uses"| node_controls
node_controls -->|"clears output"| node_redactor
node_redactor -->|"switches view"| node_controls
node_redactor -->|"extracts entities"| node_nlp
node_redactor -->|"uses dates"| node_date_nlp
node_redactor -->|"loads names"| node_name_lists

click node_controls "https://github.com/ironlegit/reducktor/blob/main/js/button.js"
click node_redactor "https://github.com/ironlegit/reducktor/blob/main/js/main.js"
click node_name_lists "https://github.com/ironlegit/reducktor/tree/main/data"

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_controls,node_user toneBlue
class node_redactor,node_nlp,node_date_nlp toneAmber
class node_name_lists toneMint
```

## Components

### Text interface

- [UI controls](https://github.com/ironlegit/reducktor/blob/main/js/button.js): `js/button.js`

### Redaction logic

- [Redaction engine](https://github.com/ironlegit/reducktor/blob/main/js/main.js): `js/main.js`
- **Compromise NLP**
- **Date plugin**

### Name data

- [Regional name lists](https://github.com/ironlegit/reducktor/tree/main/data): `data`

### Other components

- **User**

## Connections

- User → UI controls: uses (evidence: `README.md`)
- UI controls → Redaction engine: clears output (evidence: `js/button.js`)
- Redaction engine → UI controls: switches view (evidence: `js/main.js`)
- Redaction engine → Compromise NLP: extracts entities (evidence: `js/main.js`)
- Redaction engine → Date plugin: uses dates (evidence: `js/main.js`)
- Redaction engine → Regional name lists: loads names (evidence: `js/main.js`)
