# ylaghdas/eraser architecture

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

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

## Overview

Eraser is a privacy-removal tool with CLI and web entry points. Its core workflow is to load a user profile and broker directory, prepare and send removal emails, record progress, and monitor broker replies for confirmations or manual follow-up. The browser automation and web pipeline support those follow-up steps. The excerpts establish some concrete calls and routes; where the sampled evidence does not show wiring, links are omitted or marked unverified rather than inferred as a definite call.

Main entry points: [`cmd/eraser/main.go`](https://github.com/ylaghdas/eraser/blob/main/cmd/eraser/main.go) (CLI Commands), [`internal/web/server.go`](https://github.com/ylaghdas/eraser/blob/main/internal/web/server.go) (Web Routes), [`internal/browser/browser.go`](https://github.com/ylaghdas/eraser/blob/main/internal/browser/browser.go) (Form Browser), [`internal/inbox/monitor.go`](https://github.com/ylaghdas/eraser/blob/main/internal/inbox/monitor.go) (Inbox Monitor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Entry Points"]
  node_cli["CLI Commands<br/>[main.go]"]
  node_config["Profile Config<br/>[config.go]"]
end

subgraph group_requests["Removal Requests"]
  node_brokers["Broker Directory<br/>[broker.go]"]
  node_templates["Request Templates<br/>[template.go]"]
  node_email["Email Sender<br/>[sender.go]"]
  node_smtp["SMTP Transport<br/>[smtp.go]"]
end

subgraph group_responses["Replies And Follow-up"]
  node_history[("Request History<br/>[history.go]")]
  node_monitor["Inbox Monitor<br/>[monitor.go]"]
  node_classifier["Reply Classification<br/>[classifier.go]"]
  node_parser["Link And Bounce Parsing<br/>[parser.go]"]
  node_browser["Form Browser<br/>[browser.go]"]
  node_filler["Form Filler<br/>[filler.go]"]
  node_captcha["CAPTCHA Handling<br/>[captcha.go]"]
  node_confirmation["Confirmation Links<br/>[confirm.go]"]
end

subgraph group_web["Web Experience"]
  node_webserver["Web Routes<br/>[server.go]"]
  node_sessions["Wizard Sessions<br/>[session.go]"]
  node_jobs["Send Jobs<br/>[job.go]"]
end

node_user(("User"))

node_user -->|"runs commands"| node_cli
node_user -->|"uses interface"| node_webserver
node_cli -->|"loads and updates"| node_brokers
node_cli -.->|"renders requests"| node_templates
node_cli -->|"sends requests"| node_email
node_email -->|"dispatches via"| node_smtp
node_cli -->|"records sends"| node_history
node_cli -->|"checks inbox"| node_monitor
node_monitor -.->|"classifies replies"| node_classifier
node_monitor -.->|"extracts links"| node_parser
node_webserver -->|"gets or creates"| node_sessions
node_webserver -->|"reads responses"| node_history
node_webserver -.->|"manages jobs"| node_jobs
node_webserver -->|"lists brokers"| node_brokers
node_browser -->|"fills fields"| node_filler
node_browser -.->|"detects challenges"| node_captcha
node_browser -.->|"handles confirmations"| node_confirmation
node_user -.->|"completes follow-up"| node_browser

click node_cli "https://github.com/ylaghdas/eraser/blob/main/cmd/eraser/main.go"
click node_config "https://github.com/ylaghdas/eraser/blob/main/internal/config/config.go"
click node_webserver "https://github.com/ylaghdas/eraser/blob/main/internal/web/server.go"
click node_sessions "https://github.com/ylaghdas/eraser/blob/main/internal/web/session.go"
click node_jobs "https://github.com/ylaghdas/eraser/blob/main/internal/web/job.go"
click node_brokers "https://github.com/ylaghdas/eraser/blob/main/internal/broker/broker.go"
click node_templates "https://github.com/ylaghdas/eraser/blob/main/internal/template/template.go"
click node_email "https://github.com/ylaghdas/eraser/blob/main/internal/email/sender.go"
click node_smtp "https://github.com/ylaghdas/eraser/blob/main/internal/email/smtp.go"
click node_history "https://github.com/ylaghdas/eraser/blob/main/internal/history/history.go"
click node_monitor "https://github.com/ylaghdas/eraser/blob/main/internal/inbox/monitor.go"
click node_classifier "https://github.com/ylaghdas/eraser/blob/main/internal/inbox/classifier.go"
click node_parser "https://github.com/ylaghdas/eraser/blob/main/internal/inbox/parser.go"
click node_browser "https://github.com/ylaghdas/eraser/blob/main/internal/browser/browser.go"
click node_filler "https://github.com/ylaghdas/eraser/blob/main/internal/browser/filler.go"
click node_captcha "https://github.com/ylaghdas/eraser/blob/main/internal/browser/captcha.go"
click node_confirmation "https://github.com/ylaghdas/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_config,node_user toneBlue
class node_brokers,node_templates,node_email,node_smtp toneAmber
class node_history,node_monitor,node_classifier,node_parser,node_browser,node_filler,node_captcha,node_confirmation toneMint
class node_webserver,node_sessions,node_jobs toneRose
```

## Components

### Entry Points

- [CLI Commands](https://github.com/ylaghdas/eraser/blob/main/cmd/eraser/main.go): `cmd/eraser/main.go`
- [Profile Config](https://github.com/ylaghdas/eraser/blob/main/internal/config/config.go): `internal/config/config.go`

### Removal Requests

- [Broker Directory](https://github.com/ylaghdas/eraser/blob/main/internal/broker/broker.go): `internal/broker/broker.go`
- [Request Templates](https://github.com/ylaghdas/eraser/blob/main/internal/template/template.go): `internal/template/template.go`
- [Email Sender](https://github.com/ylaghdas/eraser/blob/main/internal/email/sender.go): `internal/email/sender.go`
- [SMTP Transport](https://github.com/ylaghdas/eraser/blob/main/internal/email/smtp.go): `internal/email/smtp.go`

### Replies And Follow-up

- [Request History](https://github.com/ylaghdas/eraser/blob/main/internal/history/history.go): `internal/history/history.go`
- [Inbox Monitor](https://github.com/ylaghdas/eraser/blob/main/internal/inbox/monitor.go): `internal/inbox/monitor.go`
- [Reply Classification](https://github.com/ylaghdas/eraser/blob/main/internal/inbox/classifier.go): `internal/inbox/classifier.go`
- [Link And Bounce Parsing](https://github.com/ylaghdas/eraser/blob/main/internal/inbox/parser.go): `internal/inbox/parser.go`
- [Form Browser](https://github.com/ylaghdas/eraser/blob/main/internal/browser/browser.go): `internal/browser/browser.go`
- [Form Filler](https://github.com/ylaghdas/eraser/blob/main/internal/browser/filler.go): `internal/browser/filler.go`
- [CAPTCHA Handling](https://github.com/ylaghdas/eraser/blob/main/internal/browser/captcha.go): `internal/browser/captcha.go`
- [Confirmation Links](https://github.com/ylaghdas/eraser/blob/main/internal/browser/confirm.go): `internal/browser/confirm.go`

### Web Experience

- [Web Routes](https://github.com/ylaghdas/eraser/blob/main/internal/web/server.go): `internal/web/server.go`
- [Wizard Sessions](https://github.com/ylaghdas/eraser/blob/main/internal/web/session.go): `internal/web/session.go`
- [Send Jobs](https://github.com/ylaghdas/eraser/blob/main/internal/web/job.go): `internal/web/job.go`

### Other components

- **User**

## Connections

- User → CLI Commands: runs commands (evidence: `README.md`)
- User → Web Routes: uses interface (evidence: `README.md`)
- CLI Commands → Broker Directory: loads and updates (evidence: `cmd/eraser/main.go`)
- CLI Commands → Request Templates: renders requests
- CLI Commands → Email Sender: sends requests (evidence: `cmd/eraser/main.go`)
- Email Sender → SMTP Transport: dispatches via (evidence: `internal/email/sender.go`)
- CLI Commands → Request History: records sends (evidence: `cmd/eraser/main.go`)
- CLI Commands → Inbox Monitor: checks inbox (evidence: `cmd/eraser/main.go`)
- Inbox Monitor → Reply Classification: classifies replies
- Inbox Monitor → Link And Bounce Parsing: extracts links
- Web Routes → Wizard Sessions: gets or creates (evidence: `internal/web/server.go`)
- Web Routes → Request History: reads responses (evidence: `internal/web/server.go`)
- Web Routes → Send Jobs: manages jobs
- Web Routes → Broker Directory: lists brokers (evidence: `internal/web/server.go`)
- Form Browser → Form Filler: fills fields (evidence: `internal/browser/browser.go`)
- Form Browser → CAPTCHA Handling: detects challenges
- Form Browser → Confirmation Links: handles confirmations
- User → Form Browser: completes follow-up
