# abderrahmen-bchini/fasterfetch architecture

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

- Interactive diagram: https://gitdiagram.com/abderrahmen-bchini/fasterfetch
- Repository: https://github.com/abderrahmen-bchini/fasterfetch

## Overview

fasterfetch is a C system-information display tool for Linux and macOS. The user invokes the CLI; it loads optional configuration, gathers system and environment data, selects ASCII art and styling, then renders a terminal card. The graph preserves the documented information categories and customization features. Several implementation details are unsampled, so only documented or excerpt-supported relationships are connected; the system-interface and logo links are based on README descriptions.

Main entry points: [`src/main.c`](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/main.c) (CLI and card renderer), [`src/modules/sysinfo.c`](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c) (System info getters), [`src/modules/module_registry.c`](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/module_registry.c) (Info module registry), [`src/config.c`](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/config.c) (Config loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["CLI and rendering"]
  node_cli["CLI and card renderer<br/>[main.c]"]
end

subgraph group_info["System information"]
  node_registry["Info module registry<br/>[module_registry.c]"]
  node_sysinfo["System info getters<br/>[sysinfo.c]"]
  node_envdata["OS and session data<br/>[sysinfo.c]"]
  node_hardware["CPU, GPU, battery<br/>[sysinfo.c]"]
  node_resources["Memory, disk, packages<br/>[sysinfo.c]"]
  node_network["Local IP<br/>[sysinfo.c]"]
end

subgraph group_custom["Configuration and appearance"]
  node_config["Config loading<br/>[config.c]"]
  node_themes["Theme palettes<br/>[themes.c]"]
  node_borders["Border styles<br/>[border.c]"]
  node_logos["Built-in logos<br/>[logos.c]"]
  node_ascii["ASCII art files<br/>[utils.c]"]
end

subgraph group_support["Parsing and utilities"]
  node_json["JSON parser<br/>[json.c]"]
  node_helpers["Formatting helpers<br/>[utils.c]"]
end

node_user(("User"))
node_terminal["Terminal output"]
node_kernel["Kernel interfaces"]

node_user -->|"invokes"| node_cli
node_cli -->|"loads settings"| node_config
node_config -->|"parses config"| node_json
node_cli -->|"dispatches getters"| node_registry
node_registry -->|"maps getters"| node_sysinfo
node_sysinfo -->|"reads values"| node_envdata
node_sysinfo -->|"reads values"| node_hardware
node_sysinfo -->|"reads values"| node_resources
node_sysinfo -.->|"reads values"| node_network
node_sysinfo -->|"reads interfaces"| node_kernel
node_cli -->|"selects palette"| node_themes
node_cli -->|"selects border"| node_borders
node_cli -->|"selects logo"| node_logos
node_cli -->|"loads art"| node_ascii
node_cli -->|"formats layout"| node_helpers
node_cli -->|"renders card"| node_terminal

click node_cli "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/main.c"
click node_registry "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/module_registry.c"
click node_sysinfo "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c"
click node_envdata "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c"
click node_hardware "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c"
click node_resources "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c"
click node_network "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c"
click node_config "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/config.c"
click node_themes "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/themes.c"
click node_borders "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/border.c"
click node_logos "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/logos.c"
click node_ascii "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/utils/utils.c"
click node_json "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/utils/json.c"
click node_helpers "https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/utils/utils.c"

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_registry,node_sysinfo,node_envdata,node_hardware,node_resources,node_network toneAmber
class node_config,node_themes,node_borders,node_logos,node_ascii toneMint
class node_json,node_helpers toneRose
class node_terminal,node_kernel toneIndigo
```

## Components

### CLI and rendering

- [CLI and card renderer](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/main.c): `src/main.c`

### System information

- [Info module registry](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/module_registry.c): `src/modules/module_registry.c`
- [System info getters](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c): `src/modules/sysinfo.c`
- [OS and session data](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c): `src/modules/sysinfo.c`
- [CPU, GPU, battery](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c): `src/modules/sysinfo.c`
- [Memory, disk, packages](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c): `src/modules/sysinfo.c`
- [Local IP](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/sysinfo.c): `src/modules/sysinfo.c`

### Configuration and appearance

- [Config loading](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/config.c): `src/config.c`
- [Theme palettes](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/themes.c): `src/modules/themes.c`
- [Border styles](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/border.c): `src/modules/border.c`
- [Built-in logos](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/modules/logos.c): `src/modules/logos.c`
- [ASCII art files](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/utils/utils.c): `src/utils/utils.c`

### Parsing and utilities

- [JSON parser](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/utils/json.c): `src/utils/json.c`
- [Formatting helpers](https://github.com/abderrahmen-bchini/fasterfetch/blob/main/src/utils/utils.c): `src/utils/utils.c`

### Other components

- **User**
- **Terminal output**
- **Kernel interfaces**

## Connections

- User → CLI and card renderer: invokes (evidence: `README.md`)
- CLI and card renderer → Config loading: loads settings (evidence: `README.md`)
- Config loading → JSON parser: parses config (evidence: `src/config.c`)
- CLI and card renderer → Info module registry: dispatches getters (evidence: `src/main.c`)
- Info module registry → System info getters: maps getters (evidence: `src/modules/module_registry.c`)
- System info getters → OS and session data: reads values (evidence: `README.md`)
- System info getters → CPU, GPU, battery: reads values (evidence: `README.md`)
- System info getters → Memory, disk, packages: reads values (evidence: `README.md`)
- System info getters → Local IP: reads values (evidence: `src/modules/sysinfo.c`)
- System info getters → Kernel interfaces: reads interfaces (evidence: `README.md`)
- CLI and card renderer → Theme palettes: selects palette (evidence: `src/main.c`)
- CLI and card renderer → Border styles: selects border (evidence: `src/main.c`)
- CLI and card renderer → Built-in logos: selects logo (evidence: `README.md`)
- CLI and card renderer → ASCII art files: loads art (evidence: `src/main.c`)
- CLI and card renderer → Formatting helpers: formats layout (evidence: `src/main.c`)
- CLI and card renderer → Terminal output: renders card (evidence: `src/main.c`)
