# kiammota/egotop architecture

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

- Interactive diagram: https://gitdiagram.com/kiammota/egotop
- Repository: https://github.com/kiammota/egotop

## Overview

egotop is a Lua-scriptable animated Linux/Hyprland terminal dashboard. Its main workflow loads user configuration, collects live system telemetry, composes a configurable layout and effects, then renders an interactive terminal UI; command mode supports live changes. The graph includes major documented Lua, animation, theme, telemetry, and command capabilities. Some subsystem links are documented rather than verified in sampled implementation, so those use README evidence; unsampled internals are not asserted.

Main entry points: [`src/app.rs`](https://github.com/kiammota/egotop/blob/main/src/app.rs) (Interactive app), [`src/runtime/pipeline.rs`](https://github.com/kiammota/egotop/blob/main/src/runtime/pipeline.rs) (Resource pipeline), [`src/terminal/renderer.rs`](https://github.com/kiammota/egotop/blob/main/src/terminal/renderer.rs) (Terminal renderer), [`src/animation/timeline.rs`](https://github.com/kiammota/egotop/blob/main/src/animation/timeline.rs) (Animation timeline)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Startup and commands"]
  node_cli["CLI<br/>[mod.rs]"]
  node_app["Interactive app<br/>[app.rs]"]
  node_commands["Command mode<br/>[parser.rs]"]
end

subgraph group_config["Configuration and scripting"]
  node_config_load["Config loading<br/>[loader.rs]"]
  node_config_schema["Config schema<br/>[schema.rs]"]
  node_config_paths["Config paths<br/>[paths.rs]"]
  node_lua["Lua API and built-ins<br/>[api.rs]"]
  node_lua_canvas["Lua canvas<br/>[canvas.rs]"]
  node_lua_animation["Lua animation runtime"]
  node_animation_loader["Animation packages"]
end

subgraph group_runtime["Runtime and telemetry"]
  node_coordinator["Runtime coordinator<br/>[coordinator.rs]"]
  node_pipeline["Resource pipeline<br/>[pipeline.rs]"]
  node_system["System telemetry<br/>[mod.rs]"]
end

subgraph group_display["Animation and display"]
  node_layout["Container layout<br/>[layout.rs]"]
  node_components["UI components<br/>[components.rs]"]
  node_widgets["Dashboard widgets<br/>[widgets.rs]"]
  node_renderer["Terminal renderer<br/>[renderer.rs]"]
  node_theme["Themes and borders<br/>[theme.rs]"]
  node_backgrounds["Background effects<br/>[backgrounds.rs]"]
  node_geometry["Animation geometry<br/>[geometry.rs]"]
  node_scene["Animation scenes<br/>[scene.rs]"]
  node_text_fx["Text effects<br/>[text_fx.rs]"]
  node_timeline["Animation timeline<br/>[timeline.rs]"]
end

node_user(("Dashboard user"))

node_user -->|"starts"| node_cli
node_cli -->|"loads config"| node_config_load
node_cli -->|"launches"| node_app
node_app -->|"parses commands"| node_commands
node_app -->|"coordinates runtime"| node_coordinator
node_config_load -->|"validates"| node_config_schema
node_config_load -->|"resolves paths"| node_config_paths
node_app -->|"loads scripting"| node_lua
node_lua -->|"exposes canvas"| node_lua_canvas
node_lua -->|"provides animation"| node_lua_animation
node_lua_animation -->|"uses geometry"| node_geometry
node_lua_animation -->|"loads definitions"| node_animation_loader
node_coordinator -->|"runs pipeline"| node_pipeline
node_coordinator -.->|"samples telemetry"| node_system
node_pipeline -->|"validates resources"| node_config_schema
node_pipeline -->|"resolves themes"| node_theme
node_pipeline -->|"configures layout"| node_layout
node_pipeline -->|"loads animations"| node_animation_loader
node_renderer -.->|"renders app"| node_app
node_renderer -->|"draws widgets"| node_widgets
node_renderer -->|"renders components"| node_components
node_widgets -->|"reads snapshots"| node_system
node_widgets -->|"renders containers"| node_layout
node_components -->|"uses container model"| node_layout
node_renderer -->|"applies theme"| node_theme
node_app -->|"updates effects"| node_backgrounds
node_backgrounds -->|"uses theme"| node_theme
node_timeline -->|"evaluates tracks"| node_scene
node_timeline -->|"uses geometry"| node_geometry
node_timeline -->|"applies text effects"| node_text_fx
node_commands -->|"drives changes"| node_app
node_user -.->|"views telemetry"| node_system

click node_cli "https://github.com/kiammota/egotop/blob/main/src/cli/mod.rs"
click node_app "https://github.com/kiammota/egotop/blob/main/src/app.rs"
click node_commands "https://github.com/kiammota/egotop/blob/main/src/command/parser.rs"
click node_config_load "https://github.com/kiammota/egotop/blob/main/src/config/loader.rs"
click node_config_schema "https://github.com/kiammota/egotop/blob/main/src/config/schema.rs"
click node_config_paths "https://github.com/kiammota/egotop/blob/main/src/config/paths.rs"
click node_lua "https://github.com/kiammota/egotop/blob/main/src/lua/api.rs"
click node_lua_canvas "https://github.com/kiammota/egotop/blob/main/src/lua/canvas.rs"
click node_lua_animation "https://github.com/kiammota/egotop/blob/main/src/lua/animation_runtime.rs"
click node_animation_loader "https://github.com/kiammota/egotop/blob/main/src/config/animation_loader.rs"
click node_coordinator "https://github.com/kiammota/egotop/blob/main/src/runtime/coordinator.rs"
click node_pipeline "https://github.com/kiammota/egotop/blob/main/src/runtime/pipeline.rs"
click node_system "https://github.com/kiammota/egotop/blob/main/src/system/mod.rs"
click node_layout "https://github.com/kiammota/egotop/blob/main/src/ui/layout.rs"
click node_components "https://github.com/kiammota/egotop/blob/main/src/ui/components.rs"
click node_widgets "https://github.com/kiammota/egotop/blob/main/src/ui/widgets.rs"
click node_renderer "https://github.com/kiammota/egotop/blob/main/src/terminal/renderer.rs"
click node_theme "https://github.com/kiammota/egotop/blob/main/src/ui/theme.rs"
click node_backgrounds "https://github.com/kiammota/egotop/blob/main/src/animation/backgrounds.rs"
click node_geometry "https://github.com/kiammota/egotop/blob/main/src/animation/geometry.rs"
click node_scene "https://github.com/kiammota/egotop/blob/main/src/animation/scene.rs"
click node_text_fx "https://github.com/kiammota/egotop/blob/main/src/animation/text_fx.rs"
click node_timeline "https://github.com/kiammota/egotop/blob/main/src/animation/timeline.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_app,node_commands,node_user toneBlue
class node_config_load,node_config_schema,node_config_paths,node_lua,node_lua_canvas,node_lua_animation,node_animation_loader toneAmber
class node_coordinator,node_pipeline,node_system toneMint
class node_layout,node_components,node_widgets,node_renderer,node_theme,node_backgrounds,node_geometry,node_scene,node_text_fx,node_timeline toneRose
```

## Components

### Startup and commands

- [CLI](https://github.com/kiammota/egotop/blob/main/src/cli/mod.rs): `src/cli/mod.rs`
- [Interactive app](https://github.com/kiammota/egotop/blob/main/src/app.rs): `src/app.rs`
- [Command mode](https://github.com/kiammota/egotop/blob/main/src/command/parser.rs): `src/command/parser.rs`

### Configuration and scripting

- [Config loading](https://github.com/kiammota/egotop/blob/main/src/config/loader.rs): `src/config/loader.rs`
- [Config schema](https://github.com/kiammota/egotop/blob/main/src/config/schema.rs): `src/config/schema.rs`
- [Config paths](https://github.com/kiammota/egotop/blob/main/src/config/paths.rs): `src/config/paths.rs`
- [Lua API and built-ins](https://github.com/kiammota/egotop/blob/main/src/lua/api.rs): `src/lua/api.rs`
- [Lua canvas](https://github.com/kiammota/egotop/blob/main/src/lua/canvas.rs): `src/lua/canvas.rs`
- [Lua animation runtime](https://github.com/kiammota/egotop/blob/main/src/lua/animation_runtime.rs): `src/lua/animation_runtime.rs`
- [Animation packages](https://github.com/kiammota/egotop/blob/main/src/config/animation_loader.rs): `src/config/animation_loader.rs`

### Runtime and telemetry

- [Runtime coordinator](https://github.com/kiammota/egotop/blob/main/src/runtime/coordinator.rs): `src/runtime/coordinator.rs`
- [Resource pipeline](https://github.com/kiammota/egotop/blob/main/src/runtime/pipeline.rs): `src/runtime/pipeline.rs`
- [System telemetry](https://github.com/kiammota/egotop/blob/main/src/system/mod.rs): `src/system/mod.rs`

### Animation and display

- [Container layout](https://github.com/kiammota/egotop/blob/main/src/ui/layout.rs): `src/ui/layout.rs`
- [UI components](https://github.com/kiammota/egotop/blob/main/src/ui/components.rs): `src/ui/components.rs`
- [Dashboard widgets](https://github.com/kiammota/egotop/blob/main/src/ui/widgets.rs): `src/ui/widgets.rs`
- [Terminal renderer](https://github.com/kiammota/egotop/blob/main/src/terminal/renderer.rs): `src/terminal/renderer.rs`
- [Themes and borders](https://github.com/kiammota/egotop/blob/main/src/ui/theme.rs): `src/ui/theme.rs`
- [Background effects](https://github.com/kiammota/egotop/blob/main/src/animation/backgrounds.rs): `src/animation/backgrounds.rs`
- [Animation geometry](https://github.com/kiammota/egotop/blob/main/src/animation/geometry.rs): `src/animation/geometry.rs`
- [Animation scenes](https://github.com/kiammota/egotop/blob/main/src/animation/scene.rs): `src/animation/scene.rs`
- [Text effects](https://github.com/kiammota/egotop/blob/main/src/animation/text_fx.rs): `src/animation/text_fx.rs`
- [Animation timeline](https://github.com/kiammota/egotop/blob/main/src/animation/timeline.rs): `src/animation/timeline.rs`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → CLI: starts
- CLI → Config loading: loads config (evidence: `src/cli/mod.rs`)
- CLI → Interactive app: launches (evidence: `src/cli/mod.rs`)
- Interactive app → Command mode: parses commands (evidence: `src/app.rs`)
- Interactive app → Runtime coordinator: coordinates runtime (evidence: `src/app.rs`)
- Config loading → Config schema: validates (evidence: `src/config/mod.rs`)
- Config loading → Config paths: resolves paths (evidence: `src/config/mod.rs`)
- Interactive app → Lua API and built-ins: loads scripting (evidence: `src/app.rs`)
- Lua API and built-ins → Lua canvas: exposes canvas (evidence: `src/lua/mod.rs`)
- Lua API and built-ins → Lua animation runtime: provides animation (evidence: `src/lua/mod.rs`)
- Lua animation runtime → Animation geometry: uses geometry (evidence: `src/lua/animation_runtime.rs`)
- Lua animation runtime → Animation packages: loads definitions (evidence: `src/lua/animation_runtime.rs`)
- Runtime coordinator → Resource pipeline: runs pipeline (evidence: `src/runtime/coordinator.rs`)
- Runtime coordinator → System telemetry: samples telemetry
- Resource pipeline → Config schema: validates resources (evidence: `src/runtime/pipeline.rs`)
- Resource pipeline → Themes and borders: resolves themes (evidence: `src/runtime/pipeline.rs`)
- Resource pipeline → Container layout: configures layout (evidence: `src/runtime/pipeline.rs`)
- Resource pipeline → Animation packages: loads animations (evidence: `src/runtime/pipeline.rs`)
- Terminal renderer → Interactive app: renders app (evidence: `src/app.rs`)
- Terminal renderer → Dashboard widgets: draws widgets (evidence: `src/terminal/renderer.rs`)
- Terminal renderer → UI components: renders components (evidence: `src/terminal/renderer.rs`)
- Dashboard widgets → System telemetry: reads snapshots (evidence: `src/ui/widgets.rs`)
- Dashboard widgets → Container layout: renders containers (evidence: `src/ui/widgets.rs`)
- UI components → Container layout: uses container model (evidence: `src/ui/components.rs`)
- Terminal renderer → Themes and borders: applies theme (evidence: `src/terminal/renderer.rs`)
- Interactive app → Background effects: updates effects (evidence: `src/app.rs`)
- Background effects → Themes and borders: uses theme (evidence: `src/animation/backgrounds.rs`)
- Animation timeline → Animation scenes: evaluates tracks (evidence: `src/animation/timeline.rs`)
- Animation timeline → Animation geometry: uses geometry (evidence: `src/animation/timeline.rs`)
- Animation timeline → Text effects: applies text effects (evidence: `src/animation/timeline.rs`)
- Command mode → Interactive app: drives changes (evidence: `src/app.rs`)
- Dashboard user → System telemetry: views telemetry
