# tbillington/kondo architecture

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

- Interactive diagram: https://gitdiagram.com/tbillington/kondo
- Repository: https://github.com/tbillington/kondo

## Overview

Kondo finds supported project types and removes their generated artifacts through either a command-line or graphical interface. The CLI discovers projects, applies age and traversal filters, presents candidates for confirmation (or dry-run/automatic cleaning), then reports reclaimed space. The GUI provides project discovery, list sorting, project details, and an artifact-deletion action. Both interfaces use the shared library for project behavior. The README documents broad project-type support; some GUI scanning and library internals are not shown in the excerpts, so uncertain links are omitted or marked unverified.

Main entry points: [`kondo-ui/src/game.rs`](https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs) (GUI systems), [`kondo/src/main.rs`](https://github.com/tbillington/kondo/blob/master/kondo/src/main.rs) (CLI discovery), [`kondo-lib/src/lib.rs`](https://github.com/tbillington/kondo/blob/master/kondo-lib/src/lib.rs) (Project scanning), [`kondo-ui/src/main.rs`](https://github.com/tbillington/kondo/blob/master/kondo-ui/src/main.rs) (GUI app setup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interfaces["User interfaces"]
  node_cli["CLI workflow<br/>[main.rs]"]
  node_cli_review["Review candidates<br/>[main.rs]"]
  node_cli_delete["CLI deletion<br/>[main.rs]"]
end

subgraph group_discovery["Project discovery"]
  node_cli_discovery["CLI discovery<br/>[main.rs]"]
  node_project_scan["Project scanning<br/>[lib.rs]"]
  node_project_types["Project type detection<br/>[lib.rs]"]
end

subgraph group_domain["Project operations"]
  node_project_analysis["Project analysis<br/>[lib.rs]"]
  node_artifact_clean["Artifact cleanup<br/>[lib.rs]"]
end

subgraph group_gui["GUI experience"]
  node_gui_app["GUI app setup<br/>[main.rs]"]
  node_gui_game["GUI systems<br/>[game.rs]"]
  node_gui_list["Project list<br/>[game.rs]"]
  node_gui_details["Project details<br/>[game.rs]"]
  node_gui_sort["List sorting<br/>[game.rs]"]
  node_gui_delete["GUI deletion<br/>[game.rs]"]
end

node_cli_user(("CLI user"))
node_gui_user(("GUI user"))

node_cli_user -->|"runs"| node_cli
node_cli -->|"starts"| node_cli_discovery
node_cli_discovery -->|"scans"| node_project_scan
node_cli_discovery -->|"sizes and filters"| node_project_analysis
node_cli_discovery -->|"sends candidates"| node_cli_review
node_cli_review -->|"queues approved"| node_cli_delete
node_cli_delete -->|"cleans"| node_artifact_clean
node_gui_user -->|"opens"| node_gui_app
node_gui_app -->|"registers plugin"| node_gui_game
node_gui_game -->|"builds"| node_gui_list
node_gui_game -->|"updates"| node_gui_details
node_gui_game -->|"dispatches"| node_gui_sort
node_gui_game -->|"dispatches"| node_gui_delete
node_gui_delete -->|"cleans"| node_artifact_clean
node_gui_game -.->|"discovers projects"| node_project_scan
node_project_scan -.->|"identifies types"| node_project_types

click node_cli "https://github.com/tbillington/kondo/blob/master/kondo/src/main.rs"
click node_cli_discovery "https://github.com/tbillington/kondo/blob/master/kondo/src/main.rs"
click node_cli_review "https://github.com/tbillington/kondo/blob/master/kondo/src/main.rs"
click node_cli_delete "https://github.com/tbillington/kondo/blob/master/kondo/src/main.rs"
click node_project_scan "https://github.com/tbillington/kondo/blob/master/kondo-lib/src/lib.rs"
click node_project_types "https://github.com/tbillington/kondo/blob/master/kondo-lib/src/lib.rs"
click node_project_analysis "https://github.com/tbillington/kondo/blob/master/kondo-lib/src/lib.rs"
click node_artifact_clean "https://github.com/tbillington/kondo/blob/master/kondo-lib/src/lib.rs"
click node_gui_app "https://github.com/tbillington/kondo/blob/master/kondo-ui/src/main.rs"
click node_gui_game "https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs"
click node_gui_list "https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs"
click node_gui_details "https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs"
click node_gui_sort "https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs"
click node_gui_delete "https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs"

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_cli_review,node_cli_delete,node_cli_user,node_gui_user toneBlue
class node_cli_discovery,node_project_scan,node_project_types toneAmber
class node_project_analysis,node_artifact_clean toneMint
class node_gui_app,node_gui_game,node_gui_list,node_gui_details,node_gui_sort,node_gui_delete toneRose
```

## Components

### User interfaces

- [CLI workflow](https://github.com/tbillington/kondo/blob/master/kondo/src/main.rs): `kondo/src/main.rs`
- [Review candidates](https://github.com/tbillington/kondo/blob/master/kondo/src/main.rs): `kondo/src/main.rs`
- [CLI deletion](https://github.com/tbillington/kondo/blob/master/kondo/src/main.rs): `kondo/src/main.rs`

### Project discovery

- [CLI discovery](https://github.com/tbillington/kondo/blob/master/kondo/src/main.rs): `kondo/src/main.rs`
- [Project scanning](https://github.com/tbillington/kondo/blob/master/kondo-lib/src/lib.rs): `kondo-lib/src/lib.rs`
- [Project type detection](https://github.com/tbillington/kondo/blob/master/kondo-lib/src/lib.rs): `kondo-lib/src/lib.rs`

### Project operations

- [Project analysis](https://github.com/tbillington/kondo/blob/master/kondo-lib/src/lib.rs): `kondo-lib/src/lib.rs`
- [Artifact cleanup](https://github.com/tbillington/kondo/blob/master/kondo-lib/src/lib.rs): `kondo-lib/src/lib.rs`

### GUI experience

- [GUI app setup](https://github.com/tbillington/kondo/blob/master/kondo-ui/src/main.rs): `kondo-ui/src/main.rs`
- [GUI systems](https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs): `kondo-ui/src/game.rs`
- [Project list](https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs): `kondo-ui/src/game.rs`
- [Project details](https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs): `kondo-ui/src/game.rs`
- [List sorting](https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs): `kondo-ui/src/game.rs`
- [GUI deletion](https://github.com/tbillington/kondo/blob/master/kondo-ui/src/game.rs): `kondo-ui/src/game.rs`

### Other components

- **CLI user**
- **GUI user**

## Connections

- CLI user → CLI workflow: runs (evidence: `README.md`)
- CLI workflow → CLI discovery: starts (evidence: `kondo/src/main.rs`)
- CLI discovery → Project scanning: scans (evidence: `kondo/src/main.rs`)
- CLI discovery → Project analysis: sizes and filters (evidence: `kondo/src/main.rs`)
- CLI discovery → Review candidates: sends candidates (evidence: `kondo/src/main.rs`)
- Review candidates → CLI deletion: queues approved (evidence: `kondo/src/main.rs`)
- CLI deletion → Artifact cleanup: cleans (evidence: `kondo/src/main.rs`)
- GUI user → GUI app setup: opens (evidence: `README.md`)
- GUI app setup → GUI systems: registers plugin (evidence: `kondo-ui/src/main.rs`)
- GUI systems → Project list: builds (evidence: `kondo-ui/src/game.rs`)
- GUI systems → Project details: updates (evidence: `kondo-ui/src/game.rs`)
- GUI systems → List sorting: dispatches (evidence: `kondo-ui/src/game.rs`)
- GUI systems → GUI deletion: dispatches (evidence: `kondo-ui/src/game.rs`)
- GUI deletion → Artifact cleanup: cleans (evidence: `kondo-ui/src/game.rs`)
- GUI systems → Project scanning: discovers projects
- Project scanning → Project type detection: identifies types (evidence: `kondo-lib/src/lib.rs`)
