# digisamroc/eraser architecture

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

- Interactive diagram: https://gitdiagram.com/digisamroc/eraser
- Repository: https://github.com/digisamroc/eraser

## Overview

Eraser is a privacy tool that sends personal-data removal requests to data brokers and tracks their replies and any manual follow-up. The main workflow is: configure a profile and email account, select brokers, render and send requests, then monitor broker emails and surface confirmation links, forms, or verification tasks. It offers both a CLI and browser-based interface, plus automated browser form filling. The README documents these capabilities; some connections to unsampled web and browser paths are therefore documented rather than source-verified.

Main entry points: [`cmd/eraser/main.go`](https://github.com/digisamroc/eraser/blob/main/cmd/eraser/main.go) (CLI commands), [`internal/web/server.go`](https://github.com/digisamroc/eraser/blob/main/internal/web/server.go) (Web interface), [`internal/inbox/monitor.go`](https://github.com/digisamroc/eraser/blob/main/internal/inbox/monitor.go) (Inbox monitor), [`internal/browser/browser.go`](https://github.com/digisamroc/eraser/blob/main/internal/browser/browser.go) (Browser automation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["User interfaces"]
  node_cli["CLI commands<br/>[main.go]"]
  node_web["Web interface<br/>[server.go]"]
  node_sessions["Setup sessions<br/>[session.go]"]
end

subgraph group_requests["Removal requests"]
  node_templates["Request templates<br/>[template.go]"]
  node_email["Email sender<br/>[sender.go]"]
  node_smtp["SMTP transport<br/>[smtp.go]"]
end

subgraph group_followup["Reply and follow-up"]
  node_inbox["Inbox monitor<br/>[monitor.go]"]
  node_classifier["Reply classifier<br/>[classifier.go]"]
  node_parser["Link parser<br/>[parser.go]"]
  node_pipeline["Manual follow-up<br/>[history.go]"]
  node_browser["Browser automation<br/>[browser.go]"]
  node_formfiller["Form filler<br/>[filler.go]"]
  node_captcha["CAPTCHA handling<br/>[captcha.go]"]
  node_confirmation["Confirmation handling<br/>[confirm.go]"]
end

subgraph group_foundation["Shared services"]
  node_config["Profile and settings<br/>[config.go]"]
  node_brokers["Broker directory<br/>[broker.go]"]
  node_history[("Request history<br/>[history.go]")]
end

node_user(("User"))
node_broker(("Data brokers"))
node_mailbox(("Email provider"))

node_user -->|"runs commands"| node_cli
node_user -->|"uses interface"| node_web
node_cli -->|"loads settings"| node_config
node_web -->|"manages setup"| node_sessions
node_web -->|"reads settings"| node_config
node_cli -->|"selects brokers"| node_brokers
node_web -->|"lists brokers"| node_brokers
node_cli -->|"renders requests"| node_templates
node_cli -->|"sends requests"| node_email
node_email -->|"uses transport"| node_smtp
node_smtp -->|"delivers email"| node_mailbox
node_email -->|"sends removal request"| node_broker
node_cli -->|"records results"| node_history
node_web -->|"shows request status"| node_history
node_mailbox -->|"provides replies"| node_inbox
node_cli -->|"fetches broker mail"| node_inbox
node_inbox -.->|"classifies replies"| node_classifier
node_inbox -.->|"extracts links"| node_parser
node_inbox -.->|"stores responses"| node_history
node_history -->|"tracks pending tasks"| node_pipeline
node_web -->|"presents follow-up"| node_pipeline
node_cli -->|"fills opt-out forms"| node_browser
node_browser -->|"fills fields"| node_formfiller
node_browser -.->|"checks challenges"| node_captcha
node_browser -.->|"handles confirmation"| node_confirmation
node_pipeline -->|"prompts manual action"| node_broker

click node_cli "https://github.com/digisamroc/eraser/blob/main/cmd/eraser/main.go"
click node_web "https://github.com/digisamroc/eraser/blob/main/internal/web/server.go"
click node_sessions "https://github.com/digisamroc/eraser/blob/main/internal/web/session.go"
click node_config "https://github.com/digisamroc/eraser/blob/main/internal/config/config.go"
click node_brokers "https://github.com/digisamroc/eraser/blob/main/internal/broker/broker.go"
click node_history "https://github.com/digisamroc/eraser/blob/main/internal/history/history.go"
click node_templates "https://github.com/digisamroc/eraser/blob/main/internal/template/template.go"
click node_email "https://github.com/digisamroc/eraser/blob/main/internal/email/sender.go"
click node_smtp "https://github.com/digisamroc/eraser/blob/main/internal/email/smtp.go"
click node_inbox "https://github.com/digisamroc/eraser/blob/main/internal/inbox/monitor.go"
click node_classifier "https://github.com/digisamroc/eraser/blob/main/internal/inbox/classifier.go"
click node_parser "https://github.com/digisamroc/eraser/blob/main/internal/inbox/parser.go"
click node_pipeline "https://github.com/digisamroc/eraser/blob/main/internal/history/history.go"
click node_browser "https://github.com/digisamroc/eraser/blob/main/internal/browser/browser.go"
click node_formfiller "https://github.com/digisamroc/eraser/blob/main/internal/browser/filler.go"
click node_captcha "https://github.com/digisamroc/eraser/blob/main/internal/browser/captcha.go"
click node_confirmation "https://github.com/digisamroc/eraser/blob/main/internal/browser/confirm.go"

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_cli,node_web,node_sessions,node_user toneBlue
class node_templates,node_email,node_smtp toneAmber
class node_inbox,node_classifier,node_parser,node_pipeline,node_browser,node_formfiller,node_captcha,node_confirmation toneMint
class node_config,node_brokers,node_history toneRose
class node_broker,node_mailbox toneIndigo
```

## Components

### User interfaces

- [CLI commands](https://github.com/digisamroc/eraser/blob/main/cmd/eraser/main.go): `cmd/eraser/main.go`
- [Web interface](https://github.com/digisamroc/eraser/blob/main/internal/web/server.go): `internal/web/server.go`
- [Setup sessions](https://github.com/digisamroc/eraser/blob/main/internal/web/session.go): `internal/web/session.go`

### Removal requests

- [Request templates](https://github.com/digisamroc/eraser/blob/main/internal/template/template.go): `internal/template/template.go`
- [Email sender](https://github.com/digisamroc/eraser/blob/main/internal/email/sender.go): `internal/email/sender.go`
- [SMTP transport](https://github.com/digisamroc/eraser/blob/main/internal/email/smtp.go): `internal/email/smtp.go`

### Reply and follow-up

- [Inbox monitor](https://github.com/digisamroc/eraser/blob/main/internal/inbox/monitor.go): `internal/inbox/monitor.go`
- [Reply classifier](https://github.com/digisamroc/eraser/blob/main/internal/inbox/classifier.go): `internal/inbox/classifier.go`
- [Link parser](https://github.com/digisamroc/eraser/blob/main/internal/inbox/parser.go): `internal/inbox/parser.go`
- [Manual follow-up](https://github.com/digisamroc/eraser/blob/main/internal/history/history.go): `internal/history/history.go`
- [Browser automation](https://github.com/digisamroc/eraser/blob/main/internal/browser/browser.go): `internal/browser/browser.go`
- [Form filler](https://github.com/digisamroc/eraser/blob/main/internal/browser/filler.go): `internal/browser/filler.go`
- [CAPTCHA handling](https://github.com/digisamroc/eraser/blob/main/internal/browser/captcha.go): `internal/browser/captcha.go`
- [Confirmation handling](https://github.com/digisamroc/eraser/blob/main/internal/browser/confirm.go): `internal/browser/confirm.go`

### Shared services

- [Profile and settings](https://github.com/digisamroc/eraser/blob/main/internal/config/config.go): `internal/config/config.go`
- [Broker directory](https://github.com/digisamroc/eraser/blob/main/internal/broker/broker.go): `internal/broker/broker.go`
- [Request history](https://github.com/digisamroc/eraser/blob/main/internal/history/history.go): `internal/history/history.go`

### Other components

- **User**
- **Data brokers**
- **Email provider**

## Connections

- User → CLI commands: runs commands (evidence: `README.md`)
- User → Web interface: uses interface (evidence: `README.md`)
- CLI commands → Profile and settings: loads settings (evidence: `cmd/eraser/main.go`)
- Web interface → Setup sessions: manages setup (evidence: `internal/web/server.go`)
- Web interface → Profile and settings: reads settings (evidence: `internal/web/server.go`)
- CLI commands → Broker directory: selects brokers (evidence: `cmd/eraser/main.go`)
- Web interface → Broker directory: lists brokers (evidence: `internal/web/server.go`)
- CLI commands → Request templates: renders requests (evidence: `cmd/eraser/main.go`)
- CLI commands → Email sender: sends requests (evidence: `cmd/eraser/main.go`)
- Email sender → SMTP transport: uses transport (evidence: `internal/email/sender.go`)
- SMTP transport → Email provider: delivers email (evidence: `internal/email/smtp.go`)
- Email sender → Data brokers: sends removal request (evidence: `README.md`)
- CLI commands → Request history: records results (evidence: `cmd/eraser/main.go`)
- Web interface → Request history: shows request status (evidence: `internal/web/server.go`)
- Email provider → Inbox monitor: provides replies (evidence: `README.md`)
- CLI commands → Inbox monitor: fetches broker mail (evidence: `cmd/eraser/main.go`)
- Inbox monitor → Reply classifier: classifies replies
- Inbox monitor → Link parser: extracts links
- Inbox monitor → Request history: stores responses
- Request history → Manual follow-up: tracks pending tasks (evidence: `internal/history/history.go`)
- Web interface → Manual follow-up: presents follow-up (evidence: `internal/web/server.go`)
- CLI commands → Browser automation: fills opt-out forms (evidence: `cmd/eraser/main.go`)
- Browser automation → Form filler: fills fields (evidence: `internal/browser/browser.go`)
- Browser automation → CAPTCHA handling: checks challenges
- Browser automation → Confirmation handling: handles confirmation
- Manual follow-up → Data brokers: prompts manual action (evidence: `README.md`)
