# tonycth7/arcfetch architecture

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

- Interactive diagram: https://gitdiagram.com/tonycth7/arcfetch
- Repository: https://github.com/tonycth7/arcfetch

## Overview

arcfetch is a Rust terminal system-information display with configurable layouts and multiple animated or procedural-art modes. The usual workflow is CLI invocation, configuration and display-mode selection, system-info collection, then rendering alongside a logo or animation. The README documents these capabilities; source excerpts and the SOURCE INDEX show several internal dependencies, but do not expose every runtime call, so some documented links use README evidence.

Main entry points: [`src/main.rs`](https://github.com/tonycth7/arcfetch/blob/main/src/main.rs) (CLI Orchestrator), [`src/info.rs`](https://github.com/tonycth7/arcfetch/blob/main/src/info.rs) (System Info), [`src/fastfetch.rs`](https://github.com/tonycth7/arcfetch/blob/main/src/fastfetch.rs) (Fastfetch Adapter), [`src/config.rs`](https://github.com/tonycth7/arcfetch/blob/main/src/config.rs) (Config Loader)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and Configuration"]
  node_cli["CLI Orchestrator<br/>[main.rs]"]
  node_config["Config Loader<br/>[config.rs]"]
  node_jsonc["JSONC Parser<br/>[jsonc.rs]"]
  node_fastfetch["Fastfetch Adapter<br/>[fastfetch.rs]"]
end

subgraph group_system["System Information"]
  node_info["System Info<br/>[info.rs]"]
  node_modules["Extra Collectors<br/>[modules.rs]"]
  node_packages["Package Counts<br/>[pkgs.rs]"]
  node_network["Network Lookups<br/>[net.rs]"]
  node_cache["Two-Tier Cache<br/>[cache.rs]"]
end

subgraph group_display["Terminal Display"]
  node_logo["Logo Catalog<br/>[logos.rs]"]
  node_palette["Color Schemes<br/>[scheme.rs]"]
end

subgraph group_effects["Art and Animation"]
  node_animation["Frame Animations<br/>[anim.rs]"]
  node_blackhole["Blackhole Scene<br/>[main.rs]"]
  node_cosmic["Cosmic Scene<br/>[cosmic.rs]"]
  node_mandelbrot["Mandelbrot Logo<br/>[mandelbrot.rs]"]
end

node_user(("User"))
node_os["Host System"]
node_terminal(("Terminal"))

node_user -->|"invokes"| node_cli
node_cli -->|"loads settings"| node_config
node_config -->|"parses JSONC"| node_jsonc
node_fastfetch -->|"parses input"| node_jsonc
node_fastfetch -->|"translates settings"| node_config
node_cli -->|"accepts config"| node_fastfetch
node_cli -->|"collects info"| node_info
node_info -->|"uses collectors"| node_modules
node_info -->|"counts packages"| node_packages
node_info -.->|"fetches optional data"| node_network
node_info -->|"caches data"| node_cache
node_info -->|"reads host data"| node_os
node_cli -->|"selects logo"| node_logo
node_cli -->|"sets colors"| node_palette
node_cli -->|"plays frames"| node_animation
node_cli -->|"runs scene"| node_blackhole
node_cli -->|"runs scene"| node_cosmic
node_cli -->|"renders fractal"| node_mandelbrot
node_cli -->|"writes display"| node_terminal

click node_cli "https://github.com/tonycth7/arcfetch/blob/main/src/main.rs"
click node_config "https://github.com/tonycth7/arcfetch/blob/main/src/config.rs"
click node_jsonc "https://github.com/tonycth7/arcfetch/blob/main/src/jsonc.rs"
click node_fastfetch "https://github.com/tonycth7/arcfetch/blob/main/src/fastfetch.rs"
click node_info "https://github.com/tonycth7/arcfetch/blob/main/src/info.rs"
click node_modules "https://github.com/tonycth7/arcfetch/blob/main/src/modules.rs"
click node_packages "https://github.com/tonycth7/arcfetch/blob/main/src/pkgs.rs"
click node_network "https://github.com/tonycth7/arcfetch/blob/main/src/net.rs"
click node_cache "https://github.com/tonycth7/arcfetch/blob/main/src/cache.rs"
click node_logo "https://github.com/tonycth7/arcfetch/blob/main/src/logos.rs"
click node_palette "https://github.com/tonycth7/arcfetch/blob/main/src/scheme.rs"
click node_animation "https://github.com/tonycth7/arcfetch/blob/main/src/anim.rs"
click node_blackhole "https://github.com/tonycth7/arcfetch/blob/main/src/main.rs"
click node_cosmic "https://github.com/tonycth7/arcfetch/blob/main/src/cosmic.rs"
click node_mandelbrot "https://github.com/tonycth7/arcfetch/blob/main/src/mandelbrot.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_config,node_jsonc,node_fastfetch,node_user toneBlue
class node_info,node_modules,node_packages,node_network,node_cache toneAmber
class node_logo,node_palette toneMint
class node_animation,node_blackhole,node_cosmic,node_mandelbrot toneRose
class node_os,node_terminal toneIndigo
```

## Components

### CLI and Configuration

- [CLI Orchestrator](https://github.com/tonycth7/arcfetch/blob/main/src/main.rs): `src/main.rs`
- [Config Loader](https://github.com/tonycth7/arcfetch/blob/main/src/config.rs): `src/config.rs`
- [JSONC Parser](https://github.com/tonycth7/arcfetch/blob/main/src/jsonc.rs): `src/jsonc.rs`
- [Fastfetch Adapter](https://github.com/tonycth7/arcfetch/blob/main/src/fastfetch.rs): `src/fastfetch.rs`

### System Information

- [System Info](https://github.com/tonycth7/arcfetch/blob/main/src/info.rs): `src/info.rs`
- [Extra Collectors](https://github.com/tonycth7/arcfetch/blob/main/src/modules.rs): `src/modules.rs`
- [Package Counts](https://github.com/tonycth7/arcfetch/blob/main/src/pkgs.rs): `src/pkgs.rs`
- [Network Lookups](https://github.com/tonycth7/arcfetch/blob/main/src/net.rs): `src/net.rs`
- [Two-Tier Cache](https://github.com/tonycth7/arcfetch/blob/main/src/cache.rs): `src/cache.rs`

### Terminal Display

- [Logo Catalog](https://github.com/tonycth7/arcfetch/blob/main/src/logos.rs): `src/logos.rs`
- [Color Schemes](https://github.com/tonycth7/arcfetch/blob/main/src/scheme.rs): `src/scheme.rs`

### Art and Animation

- [Frame Animations](https://github.com/tonycth7/arcfetch/blob/main/src/anim.rs): `src/anim.rs`
- [Blackhole Scene](https://github.com/tonycth7/arcfetch/blob/main/src/main.rs): `src/main.rs`
- [Cosmic Scene](https://github.com/tonycth7/arcfetch/blob/main/src/cosmic.rs): `src/cosmic.rs`
- [Mandelbrot Logo](https://github.com/tonycth7/arcfetch/blob/main/src/mandelbrot.rs): `src/mandelbrot.rs`

### Other components

- **User**
- **Host System**
- **Terminal**

## Connections

- User → CLI Orchestrator: invokes (evidence: `README.md`)
- CLI Orchestrator → Config Loader: loads settings (evidence: `README.md`)
- Config Loader → JSONC Parser: parses JSONC (evidence: `src/config.rs`)
- Fastfetch Adapter → JSONC Parser: parses input (evidence: `src/fastfetch.rs`)
- Fastfetch Adapter → Config Loader: translates settings (evidence: `src/fastfetch.rs`)
- CLI Orchestrator → Fastfetch Adapter: accepts config (evidence: `README.md`)
- CLI Orchestrator → System Info: collects info (evidence: `README.md`)
- System Info → Extra Collectors: uses collectors (evidence: `src/info.rs`)
- System Info → Package Counts: counts packages (evidence: `src/info.rs`)
- System Info → Network Lookups: fetches optional data (evidence: `src/info.rs`)
- System Info → Two-Tier Cache: caches data (evidence: `src/info.rs`)
- System Info → Host System: reads host data (evidence: `README.md`)
- CLI Orchestrator → Logo Catalog: selects logo (evidence: `README.md`)
- CLI Orchestrator → Color Schemes: sets colors (evidence: `README.md`)
- CLI Orchestrator → Frame Animations: plays frames (evidence: `README.md`)
- CLI Orchestrator → Blackhole Scene: runs scene (evidence: `README.md`)
- CLI Orchestrator → Cosmic Scene: runs scene (evidence: `README.md`)
- CLI Orchestrator → Mandelbrot Logo: renders fractal (evidence: `README.md`)
- CLI Orchestrator → Terminal: writes display (evidence: `README.md`)
