# quirky1869/aed architecture

> Architecture diagram of the GitHub repository quirky1869/aed, 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/quirky1869/aed
- Repository: https://github.com/quirky1869/aed

## Overview

AED is a terminal disk-space explorer. The user enters a path and exclusions, starts a recursive scan, then browses the resulting size-ranked tree with sorting, hidden-file filtering, refresh, and file-opening or shell actions. The scanner builds a tree while accounting for hardlinks and partition size; the UI model coordinates input and navigation, and the view renders the interface. Source excerpts show the main scan and UI relationships; some Bubble Tea rendering and refresh wiring is not fully shown.

Main entry points: [`ui/model.go`](https://github.com/quirky1869/aed/blob/main/ui/model.go) (UI model), [`ui/view.go`](https://github.com/quirky1869/aed/blob/main/ui/view.go) (TUI rendering), [`cmd/aed/main.go`](https://github.com/quirky1869/aed/blob/main/cmd/aed/main.go) (Program entry), [`scanner/scanner.go`](https://github.com/quirky1869/aed/blob/main/scanner/scanner.go) (Directory scanner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_control["Application control"]
  node_entry["Program entry<br/>[main.go]"]
end

subgraph group_scanning["Disk scanning"]
  node_scanner["Directory scanner<br/>[scanner.go]"]
end

subgraph group_interface["Terminal interface"]
  node_model["UI model<br/>[model.go]"]
  node_autocomplete["Path autocomplete<br/>[autocomplete.go]"]
  node_view["TUI rendering<br/>[view.go]"]
  node_language["UI language<br/>[lang.go]"]
  node_styles["Visual styles<br/>[styles.go]"]
end

node_user(("Terminal user"))
node_filesystem[("Local filesystem")]
node_graphical["OS file explorer"]
node_shell["User shell"]

node_user -->|"launches"| node_entry
node_entry -->|"initializes"| node_model
node_model -->|"starts scans"| node_scanner
node_scanner -->|"reads metadata"| node_filesystem
node_model -->|"completes paths"| node_filesystem
node_model -->|"requests suggestions"| node_autocomplete
node_model -.->|"updates display"| node_view
node_view -->|"uses text"| node_language
node_view -->|"applies styles"| node_styles
node_model -->|"opens selection"| node_graphical
node_model -->|"starts shell"| node_shell

click node_entry "https://github.com/quirky1869/aed/blob/main/cmd/aed/main.go"
click node_model "https://github.com/quirky1869/aed/blob/main/ui/model.go"
click node_scanner "https://github.com/quirky1869/aed/blob/main/scanner/scanner.go"
click node_autocomplete "https://github.com/quirky1869/aed/blob/main/ui/autocomplete.go"
click node_view "https://github.com/quirky1869/aed/blob/main/ui/view.go"
click node_language "https://github.com/quirky1869/aed/blob/main/ui/lang.go"
click node_styles "https://github.com/quirky1869/aed/blob/main/ui/styles.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_entry,node_user,node_shell toneBlue
class node_scanner,node_filesystem toneAmber
class node_model,node_autocomplete,node_view,node_language,node_styles toneMint
class node_graphical toneIndigo
```

## Components

### Application control

- [Program entry](https://github.com/quirky1869/aed/blob/main/cmd/aed/main.go): `cmd/aed/main.go`

### Disk scanning

- [Directory scanner](https://github.com/quirky1869/aed/blob/main/scanner/scanner.go): `scanner/scanner.go`

### Terminal interface

- [UI model](https://github.com/quirky1869/aed/blob/main/ui/model.go): `ui/model.go`
- [Path autocomplete](https://github.com/quirky1869/aed/blob/main/ui/autocomplete.go): `ui/autocomplete.go`
- [TUI rendering](https://github.com/quirky1869/aed/blob/main/ui/view.go): `ui/view.go`
- [UI language](https://github.com/quirky1869/aed/blob/main/ui/lang.go): `ui/lang.go`
- [Visual styles](https://github.com/quirky1869/aed/blob/main/ui/styles.go): `ui/styles.go`

### Other components

- **Terminal user**
- **Local filesystem**
- **OS file explorer**
- **User shell**

## Connections

- Terminal user → Program entry: launches (evidence: `README.md`)
- Program entry → UI model: initializes (evidence: `cmd/aed/main.go`)
- UI model → Directory scanner: starts scans (evidence: `ui/model.go`)
- Directory scanner → Local filesystem: reads metadata (evidence: `scanner/scanner.go`)
- UI model → Local filesystem: completes paths
- UI model → Path autocomplete: requests suggestions (evidence: `ui/model.go`)
- UI model → TUI rendering: updates display
- TUI rendering → UI language: uses text (evidence: `ui/view.go`)
- TUI rendering → Visual styles: applies styles (evidence: `ui/view.go`)
- UI model → OS file explorer: opens selection (evidence: `ui/model.go`)
- UI model → User shell: starts shell (evidence: `ui/model.go`)
