# stephenlthorn/auto-identity-remove architecture

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

- Interactive diagram: https://gitdiagram.com/stephenlthorn/auto-identity-remove
- Repository: https://github.com/stephenlthorn/auto-identity-remove

## Overview

auto-identity-remove automates recurring data-broker opt-outs and provides follow-up privacy tools through a CLI and optional local dashboard. The main workflow configures personal details, searches brokers, finds a matching listing where needed, fills and submits an opt-out, tracks outcomes, and reports results. The graph also captures documented verification, exposure, breach, legal-request, scheduling, and broker-coverage capabilities. Some mode implementations were not sampled, so those branches use README evidence rather than inferred internal call chains.

Main entry points: [`watcher.js`](https://github.com/stephenlthorn/auto-identity-remove/blob/main/watcher.js) (Run orchestrator), [`lib/broker-runner.js`](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/broker-runner.js) (Broker opt-outs), [`bin/aidr.js`](https://github.com/stephenlthorn/auto-identity-remove/blob/main/bin/aidr.js) (CLI dispatcher), [`dashboard/server.js`](https://github.com/stephenlthorn/auto-identity-remove/blob/main/dashboard/server.js) (Web dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_run["Opt-out runs"]
  node_watcher["Run orchestrator<br/>[watcher.js]"]
  node_brokerflow["Broker opt-outs<br/>[broker-runner.js]"]
  node_generic["Generic broker runner<br/>[generic-runner.js]"]
  node_captcha["CAPTCHA solving<br/>[captcha.js]"]
  node_notify["Run notifications<br/>[notify.js]"]
  node_relay["Masked email relay<br/>[relay.js]"]
end

subgraph group_state["Configuration and state"]
  node_config[("Config and state<br/>[config.js]")]
end

subgraph group_followup["Privacy follow-up"]
  node_verify["Removal verification<br/>[verify-loop.js]"]
  node_serp["Search visibility scan<br/>[serp-scan.js]"]
  node_serpwatch["New-listing watch<br/>[serp-watch.js]"]
  node_exposure["Exposure scoring<br/>[exposure.js]"]
  node_hibp["Breach check<br/>[hibp.js]"]
  node_freeze["Freeze checklist<br/>[freeze.js]"]
  node_know["Right-to-know requests<br/>[right-to-know.js]"]
  node_complaint["Regulator complaints<br/>[complaint.js]"]
  node_report["Monthly report<br/>[report.js]"]
end

subgraph group_interface["User interfaces"]
  node_cli["CLI dispatcher<br/>[aidr.js]"]
  node_dashboard["Web dashboard<br/>[server.js]"]
  node_setup["First-run setup<br/>[setup.js]"]
end

subgraph group_coverage["Coverage and scheduling"]
  node_brokers["Broker catalog<br/>[brokers.js]"]
  node_scheduler["Monthly scheduler<br/>[scheduler.js]"]
  node_feeds["Registry updates<br/>[feeds.js]"]
  node_allowlist["Broker allowlist<br/>[allowlist-edit.js]"]
end

node_user(("User"))
node_broker_sites(("Broker websites"))
node_capsolver(("CapSolver"))
node_search_engines(("Search engines"))
node_hibp_service(("Have I Been Pwned"))

node_user -->|"runs commands"| node_cli
node_cli -->|"dispatches runs"| node_watcher
node_cli -->|"starts dashboard"| node_dashboard
node_user -->|"provides details"| node_setup
node_setup -->|"creates config"| node_config
node_setup -->|"installs schedule"| node_scheduler
node_watcher -->|"loads state"| node_config
node_watcher -->|"uses broker list"| node_brokers
node_watcher -->|"runs broker opt-outs"| node_brokerflow
node_brokerflow -->|"solves challenges"| node_captcha
node_brokerflow -->|"submits requests"| node_broker_sites
node_captcha -->|"requests solutions"| node_capsolver
node_watcher -.->|"processes generic sites"| node_generic
node_watcher -->|"sends results"| node_notify
node_watcher -->|"runs verification"| node_verify
node_watcher -->|"runs visibility scan"| node_serp
node_serpwatch -->|"scans engines"| node_serp
node_serpwatch -->|"alerts on new domains"| node_notify
node_serp -->|"searches results"| node_search_engines
node_watcher -->|"calculates score"| node_exposure
node_watcher -->|"checks breaches"| node_hibp
node_hibp -->|"checks breach data"| node_hibp_service
node_watcher -->|"shows checklist"| node_freeze
node_watcher -->|"sends requests"| node_know
node_watcher -->|"builds complaints"| node_complaint
node_watcher -->|"generates report"| node_report
node_watcher -->|"uses masked email"| node_relay
node_dashboard -->|"starts runs"| node_watcher
node_dashboard -->|"reads config"| node_config
node_feeds -.->|"refreshes coverage"| node_brokers
node_allowlist -.->|"preserves listings"| node_brokers

click node_cli "https://github.com/stephenlthorn/auto-identity-remove/blob/main/bin/aidr.js"
click node_dashboard "https://github.com/stephenlthorn/auto-identity-remove/blob/main/dashboard/server.js"
click node_setup "https://github.com/stephenlthorn/auto-identity-remove/blob/main/setup.js"
click node_watcher "https://github.com/stephenlthorn/auto-identity-remove/blob/main/watcher.js"
click node_brokers "https://github.com/stephenlthorn/auto-identity-remove/blob/main/brokers.js"
click node_brokerflow "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/broker-runner.js"
click node_generic "https://github.com/stephenlthorn/auto-identity-remove/blob/main/generic-runner.js"
click node_captcha "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/captcha.js"
click node_config "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/config.js"
click node_scheduler "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/scheduler.js"
click node_verify "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/verify-loop.js"
click node_serp "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/serp-scan.js"
click node_serpwatch "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/serp-watch.js"
click node_exposure "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/exposure.js"
click node_hibp "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/hibp.js"
click node_freeze "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/freeze.js"
click node_know "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/right-to-know.js"
click node_complaint "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/complaint.js"
click node_report "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/report.js"
click node_notify "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/notify.js"
click node_relay "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/relay.js"
click node_feeds "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/feeds.js"
click node_allowlist "https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/allowlist-edit.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_watcher,node_brokerflow,node_generic,node_captcha,node_notify,node_relay,node_user toneBlue
class node_config toneAmber
class node_verify,node_serp,node_serpwatch,node_exposure,node_hibp,node_freeze,node_know,node_complaint,node_report toneMint
class node_cli,node_dashboard,node_setup toneRose
class node_brokers,node_scheduler,node_feeds,node_allowlist,node_broker_sites,node_capsolver,node_search_engines,node_hibp_service toneIndigo
```

## Components

### Opt-out runs

- [Run orchestrator](https://github.com/stephenlthorn/auto-identity-remove/blob/main/watcher.js): `watcher.js`
- [Broker opt-outs](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/broker-runner.js): `lib/broker-runner.js`
- [Generic broker runner](https://github.com/stephenlthorn/auto-identity-remove/blob/main/generic-runner.js): `generic-runner.js`
- [CAPTCHA solving](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/captcha.js): `lib/captcha.js`
- [Run notifications](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/notify.js): `lib/notify.js`
- [Masked email relay](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/relay.js): `lib/relay.js`

### Configuration and state

- [Config and state](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/config.js): `lib/config.js`

### Privacy follow-up

- [Removal verification](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/verify-loop.js): `lib/verify-loop.js`
- [Search visibility scan](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/serp-scan.js): `lib/serp-scan.js`
- [New-listing watch](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/serp-watch.js): `lib/serp-watch.js`
- [Exposure scoring](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/exposure.js): `lib/exposure.js`
- [Breach check](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/hibp.js): `lib/hibp.js`
- [Freeze checklist](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/freeze.js): `lib/freeze.js`
- [Right-to-know requests](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/right-to-know.js): `lib/right-to-know.js`
- [Regulator complaints](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/complaint.js): `lib/complaint.js`
- [Monthly report](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/report.js): `lib/report.js`

### User interfaces

- [CLI dispatcher](https://github.com/stephenlthorn/auto-identity-remove/blob/main/bin/aidr.js): `bin/aidr.js`
- [Web dashboard](https://github.com/stephenlthorn/auto-identity-remove/blob/main/dashboard/server.js): `dashboard/server.js`
- [First-run setup](https://github.com/stephenlthorn/auto-identity-remove/blob/main/setup.js): `setup.js`

### Coverage and scheduling

- [Broker catalog](https://github.com/stephenlthorn/auto-identity-remove/blob/main/brokers.js): `brokers.js`
- [Monthly scheduler](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/scheduler.js): `lib/scheduler.js`
- [Registry updates](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/feeds.js): `lib/feeds.js`
- [Broker allowlist](https://github.com/stephenlthorn/auto-identity-remove/blob/main/lib/allowlist-edit.js): `lib/allowlist-edit.js`

### Other components

- **User**
- **Broker websites**
- **CapSolver**
- **Search engines**
- **Have I Been Pwned**

## Connections

- User → CLI dispatcher: runs commands (evidence: `README.md`)
- CLI dispatcher → Run orchestrator: dispatches runs (evidence: `bin/aidr.js`)
- CLI dispatcher → Web dashboard: starts dashboard (evidence: `bin/aidr.js`)
- User → First-run setup: provides details (evidence: `README.md`)
- First-run setup → Config and state: creates config (evidence: `setup.js`)
- First-run setup → Monthly scheduler: installs schedule (evidence: `setup.js`)
- Run orchestrator → Config and state: loads state (evidence: `watcher.js`)
- Run orchestrator → Broker catalog: uses broker list (evidence: `watcher.js`)
- Run orchestrator → Broker opt-outs: runs broker opt-outs (evidence: `watcher.js`)
- Broker opt-outs → CAPTCHA solving: solves challenges (evidence: `lib/broker-runner.js`)
- Broker opt-outs → Broker websites: submits requests (evidence: `README.md`)
- CAPTCHA solving → CapSolver: requests solutions (evidence: `lib/captcha.js`)
- Run orchestrator → Generic broker runner: processes generic sites (evidence: `watcher.js`)
- Run orchestrator → Run notifications: sends results (evidence: `watcher.js`)
- Run orchestrator → Removal verification: runs verification (evidence: `README.md`)
- Run orchestrator → Search visibility scan: runs visibility scan (evidence: `README.md`)
- New-listing watch → Search visibility scan: scans engines (evidence: `lib/serp-watch.js`)
- New-listing watch → Run notifications: alerts on new domains (evidence: `lib/serp-watch.js`)
- Search visibility scan → Search engines: searches results (evidence: `README.md`)
- Run orchestrator → Exposure scoring: calculates score (evidence: `README.md`)
- Run orchestrator → Breach check: checks breaches (evidence: `README.md`)
- Breach check → Have I Been Pwned: checks breach data (evidence: `README.md`)
- Run orchestrator → Freeze checklist: shows checklist (evidence: `README.md`)
- Run orchestrator → Right-to-know requests: sends requests (evidence: `README.md`)
- Run orchestrator → Regulator complaints: builds complaints (evidence: `watcher.js`)
- Run orchestrator → Monthly report: generates report (evidence: `README.md`)
- Run orchestrator → Masked email relay: uses masked email (evidence: `watcher.js`)
- Web dashboard → Run orchestrator: starts runs (evidence: `dashboard/server.js`)
- Web dashboard → Config and state: reads config (evidence: `dashboard/server.js`)
- Registry updates → Broker catalog: refreshes coverage (evidence: `README.md`)
- Broker allowlist → Broker catalog: preserves listings (evidence: `README.md`)
