# ddo/fast architecture

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

## Overview

`fast` is a terminal download-speed tester powered by Fast.com. Its workflow parses unit and silence flags, initializes the speed-test client, obtains test URLs, measures download speed, formats the result, and displays progress or the final value. The sampled entry point also uses a spinner for progress. The repository contains only this application source; the speed-test library’s internal stages are not available here, so they are represented as an external dependency rather than inferred internals.

Main entry points: [`fast.go`](https://github.com/ddo/fast/blob/master/fast.go) (CLI entry point)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI workflow"]
  node_cli["CLI entry point<br/>[fast.go]"]
end

subgraph group_measurement["Speed measurement"]
  node_speed_client["Speed-test client"]
  node_fast_service["Fast.com"]
end

subgraph group_presentation["Result presentation"]
  node_formatter["Unit formatter<br/>[fast.go]"]
  node_spinner["Spinner"]
  node_terminal_output["Terminal output<br/>[fast.go]"]
end

node_user(("Terminal user"))

node_user -->|"runs"| node_cli
node_cli -->|"initializes, discovers URLs, measures"| node_speed_client
node_speed_client -.->|"tests download speed"| node_fast_service
node_cli -->|"formats measurements"| node_formatter
node_cli -->|"starts spinner"| node_spinner
node_cli -->|"prints progress and result"| node_terminal_output
node_formatter -->|"provides formatted value"| node_terminal_output

click node_cli "https://github.com/ddo/fast/blob/master/fast.go"
click node_formatter "https://github.com/ddo/fast/blob/master/fast.go"
click node_terminal_output "https://github.com/ddo/fast/blob/master/fast.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_user toneBlue
class node_speed_client,node_fast_service toneAmber
class node_formatter,node_spinner,node_terminal_output toneMint
```

## Components

### CLI workflow

- [CLI entry point](https://github.com/ddo/fast/blob/master/fast.go): `fast.go`

### Speed measurement

- **Speed-test client**
- **Fast.com**

### Result presentation

- [Unit formatter](https://github.com/ddo/fast/blob/master/fast.go): `fast.go`
- **Spinner**
- [Terminal output](https://github.com/ddo/fast/blob/master/fast.go): `fast.go`

### Other components

- **Terminal user**

## Connections

- Terminal user → CLI entry point: runs (evidence: `README.md`)
- CLI entry point → Speed-test client: initializes, discovers URLs, measures (evidence: `fast.go`)
- Speed-test client → Fast.com: tests download speed (evidence: `README.md`)
- CLI entry point → Unit formatter: formats measurements (evidence: `fast.go`)
- CLI entry point → Spinner: starts spinner (evidence: `fast.go`)
- CLI entry point → Terminal output: prints progress and result (evidence: `fast.go`)
- Unit formatter → Terminal output: provides formatted value (evidence: `fast.go`)
