# lukilme/dynamic-gif-generator-terminal-style architecture

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

- Interactive diagram: https://gitdiagram.com/lukilme/dynamic-gif-generator-terminal-style
- Repository: https://github.com/lukilme/dynamic-gif-generator-terminal-style

## Overview

This repository collects a GitHub user’s repository and language statistics, writes a JSON snapshot, then turns that snapshot into animated dashboard GIFs for a profile README. The main flow is documented in the README and visible in the collector and plotter excerpts. The plotter dispatches to several chart implementations, which use shared canvas and GIF utilities. The tree and excerpts also show a separate terminal-style rendering set of modules; their runtime relationship to the main GIF workflow is not established, so it is shown as a distinct internal branch. Some chart calls are unsampled; relationships are limited to those evidenced by the plotter excerpt or source index.

Main entry points: [`github_profile_gif/plotter.py`](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/github_profile_gif/plotter.py) (Dashboard plotter), [`plots/gif_canvas.py`](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/gif_canvas.py) (GIF canvas), [`plots/util.py`](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/util.py) (GIF and font utilities), [`frame_builder.py`](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/frame_builder.py) (Terminal frame builder)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_collection["Data collection"]
  node_collector["Repository collector<br/>[collector.py]"]
  node_snapshot[("Profile JSON")]
  node_main["Collection entry<br/>[main.py]"]
end

subgraph group_dashboard["Dashboard generation"]
  node_plot_entry["Plot entry<br/>[plot.py]"]
  node_plotter["Dashboard plotter<br/>[plotter.py]"]
  node_gif_output["Generated GIFs"]
end

subgraph group_charts["Chart implementations"]
  node_bar_chart["Repository bar chart<br/>[bar_chart_gif.py]"]
  node_bar_v2["Alternate bar chart<br/>[bar_gif_v2.py]"]
  node_donut["Donut chart<br/>[donut_gif.py]"]
  node_gauge["Gauge chart<br/>[gauge_gif.py]"]
  node_line_chart["Line chart<br/>[line_chart_gif.py]"]
  node_line_v2["Alternate line chart<br/>[line_gif.py]"]
  node_merged_donut["Merged donut chart"]
  node_radar["Radar chart<br/>[radar_gif.py]"]
  node_stacked_bar["Stacked bar chart<br/>[stacked_bar_gif.py]"]
  node_progress_race["Progress race chart"]
  node_donut_legacy["Donut variant<br/>[donut.py]"]
end

subgraph group_rendering["Rendering internals"]
  node_canvas["GIF canvas<br/>[gif_canvas.py]"]
  node_plot_util["GIF and font utilities<br/>[util.py]"]
  node_palette["Chart palette<br/>[constants.py]"]
end

subgraph group_terminal["Terminal renderer"]
  node_data_module["Data helpers<br/>[data.py]"]
  node_config["Terminal configuration<br/>[config.py]"]
  node_draw_utils["Terminal drawing helpers<br/>[draw_utils.py]"]
  node_effects["Image effects<br/>[effects.py]"]
  node_frame_builder["Terminal frame builder<br/>[frame_builder.py]"]
end

node_user(("GitHub user"))
node_github{{"GitHub API"}}
node_readme_viewer(("Profile README reader"))

node_user -->|"requests collection"| node_main
node_main -->|"runs"| node_collector
node_collector -->|"fetches repositories and languages"| node_github
node_collector -->|"writes statistics"| node_snapshot
node_snapshot -->|"provides statistics"| node_plotter
node_plot_entry -->|"runs"| node_plotter
node_plotter -->|"generates chart"| node_bar_chart
node_plotter -->|"generates chart"| node_bar_v2
node_plotter -->|"generates chart"| node_donut
node_plotter -->|"generates chart"| node_gauge
node_plotter -->|"generates chart"| node_line_chart
node_plotter -->|"generates chart"| node_line_v2
node_plotter -->|"generates chart"| node_merged_donut
node_plotter -->|"generates chart"| node_radar
node_plotter -->|"generates chart"| node_stacked_bar
node_bar_chart -->|"uses canvas"| node_canvas
node_bar_chart -->|"saves GIF"| node_plot_util
node_bar_v2 -->|"uses canvas"| node_canvas
node_bar_v2 -->|"saves GIF"| node_plot_util
node_donut -->|"uses canvas"| node_canvas
node_donut -->|"saves GIF"| node_plot_util
node_gauge -->|"uses canvas"| node_canvas
node_gauge -->|"saves GIF"| node_plot_util
node_line_chart -->|"uses canvas"| node_canvas
node_line_chart -->|"saves GIF"| node_plot_util
node_radar -->|"uses canvas"| node_canvas
node_radar -->|"saves GIF"| node_plot_util
node_stacked_bar -->|"uses canvas"| node_canvas
node_stacked_bar -->|"saves GIF"| node_plot_util
node_plotter -->|"uses colors"| node_palette
node_plotter -->|"writes GIFs"| node_gif_output
node_readme_viewer -->|"displays GIFs"| node_gif_output
node_frame_builder -->|"uses settings"| node_config
node_frame_builder -->|"uses drawing helpers"| node_draw_utils
node_frame_builder -->|"uses effects"| node_effects

click node_collector "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/github_profile_gif/collector.py"
click node_snapshot "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/data/github_profile.json"
click node_main "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/main.py"
click node_plot_entry "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plot.py"
click node_plotter "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/github_profile_gif/plotter.py"
click node_gif_output "https://github.com/lukilme/dynamic-gif-generator-terminal-style/tree/main/assets/gifs"
click node_bar_chart "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/bar_chart_gif.py"
click node_bar_v2 "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/bar_gif_v2.py"
click node_donut "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/donut_gif.py"
click node_gauge "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/gauge_gif.py"
click node_line_chart "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/line_chart_gif.py"
click node_line_v2 "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/line_gif.py"
click node_merged_donut "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/merged_donut_gif.py"
click node_radar "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/radar_gif.py"
click node_stacked_bar "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/stacked_bar_gif.py"
click node_progress_race "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/progress_race_gif.py"
click node_donut_legacy "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/donut.py"
click node_canvas "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/gif_canvas.py"
click node_plot_util "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/util.py"
click node_palette "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/constants.py"
click node_data_module "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/data.py"
click node_config "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/config.py"
click node_draw_utils "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/draw_utils.py"
click node_effects "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/effects.py"
click node_frame_builder "https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/frame_builder.py"

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_collector,node_snapshot,node_main,node_user toneBlue
class node_plot_entry,node_plotter,node_gif_output toneAmber
class node_bar_chart,node_bar_v2,node_donut,node_gauge,node_line_chart,node_line_v2,node_merged_donut,node_radar,node_stacked_bar,node_progress_race,node_donut_legacy,node_github toneMint
class node_canvas,node_plot_util,node_palette toneRose
class node_data_module,node_config,node_draw_utils,node_effects,node_frame_builder,node_readme_viewer toneIndigo
```

## Components

### Data collection

- [Repository collector](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/github_profile_gif/collector.py): `github_profile_gif/collector.py`
- [Profile JSON](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/data/github_profile.json): `data/github_profile.json`
- [Collection entry](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/main.py): `main.py`

### Dashboard generation

- [Plot entry](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plot.py): `plot.py`
- [Dashboard plotter](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/github_profile_gif/plotter.py): `github_profile_gif/plotter.py`
- [Generated GIFs](https://github.com/lukilme/dynamic-gif-generator-terminal-style/tree/main/assets/gifs): `assets/gifs`

### Chart implementations

- [Repository bar chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/bar_chart_gif.py): `plots/bar_chart_gif.py`
- [Alternate bar chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/bar_gif_v2.py): `plots/bar_gif_v2.py`
- [Donut chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/donut_gif.py): `plots/donut_gif.py`
- [Gauge chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/gauge_gif.py): `plots/gauge_gif.py`
- [Line chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/line_chart_gif.py): `plots/line_chart_gif.py`
- [Alternate line chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/line_gif.py): `plots/line_gif.py`
- [Merged donut chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/merged_donut_gif.py): `plots/merged_donut_gif.py`
- [Radar chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/radar_gif.py): `plots/radar_gif.py`
- [Stacked bar chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/stacked_bar_gif.py): `plots/stacked_bar_gif.py`
- [Progress race chart](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/progress_race_gif.py): `plots/progress_race_gif.py`
- [Donut variant](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/donut.py): `plots/donut.py`

### Rendering internals

- [GIF canvas](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/gif_canvas.py): `plots/gif_canvas.py`
- [GIF and font utilities](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/util.py): `plots/util.py`
- [Chart palette](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/plots/constants.py): `plots/constants.py`

### Terminal renderer

- [Data helpers](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/data.py): `data.py`
- [Terminal configuration](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/config.py): `config.py`
- [Terminal drawing helpers](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/draw_utils.py): `draw_utils.py`
- [Image effects](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/effects.py): `effects.py`
- [Terminal frame builder](https://github.com/lukilme/dynamic-gif-generator-terminal-style/blob/main/frame_builder.py): `frame_builder.py`

### Other components

- **GitHub user**
- **GitHub API**
- **Profile README reader**

## Connections

- GitHub user → Collection entry: requests collection (evidence: `README.md`)
- Collection entry → Repository collector: runs (evidence: `main.py`)
- Repository collector → GitHub API: fetches repositories and languages (evidence: `github_profile_gif/collector.py`)
- Repository collector → Profile JSON: writes statistics (evidence: `github_profile_gif/collector.py`)
- Profile JSON → Dashboard plotter: provides statistics (evidence: `README.md`)
- Plot entry → Dashboard plotter: runs (evidence: `plot.py`)
- Dashboard plotter → Repository bar chart: generates chart (evidence: `github_profile_gif/plotter.py`)
- Dashboard plotter → Alternate bar chart: generates chart (evidence: `github_profile_gif/plotter.py`)
- Dashboard plotter → Donut chart: generates chart (evidence: `github_profile_gif/plotter.py`)
- Dashboard plotter → Gauge chart: generates chart (evidence: `github_profile_gif/plotter.py`)
- Dashboard plotter → Line chart: generates chart (evidence: `github_profile_gif/plotter.py`)
- Dashboard plotter → Alternate line chart: generates chart (evidence: `github_profile_gif/plotter.py`)
- Dashboard plotter → Merged donut chart: generates chart (evidence: `github_profile_gif/plotter.py`)
- Dashboard plotter → Radar chart: generates chart (evidence: `github_profile_gif/plotter.py`)
- Dashboard plotter → Stacked bar chart: generates chart (evidence: `github_profile_gif/plotter.py`)
- Repository bar chart → GIF canvas: uses canvas (evidence: `plots/bar_chart_gif.py`)
- Repository bar chart → GIF and font utilities: saves GIF (evidence: `plots/bar_chart_gif.py`)
- Alternate bar chart → GIF canvas: uses canvas (evidence: `plots/bar_gif_v2.py`)
- Alternate bar chart → GIF and font utilities: saves GIF (evidence: `plots/bar_gif_v2.py`)
- Donut chart → GIF canvas: uses canvas (evidence: `plots/donut_gif.py`)
- Donut chart → GIF and font utilities: saves GIF (evidence: `plots/donut_gif.py`)
- Gauge chart → GIF canvas: uses canvas (evidence: `plots/gauge_gif.py`)
- Gauge chart → GIF and font utilities: saves GIF (evidence: `plots/gauge_gif.py`)
- Line chart → GIF canvas: uses canvas (evidence: `plots/line_chart_gif.py`)
- Line chart → GIF and font utilities: saves GIF (evidence: `plots/line_chart_gif.py`)
- Radar chart → GIF canvas: uses canvas (evidence: `plots/radar_gif.py`)
- Radar chart → GIF and font utilities: saves GIF (evidence: `plots/radar_gif.py`)
- Stacked bar chart → GIF canvas: uses canvas (evidence: `plots/stacked_bar_gif.py`)
- Stacked bar chart → GIF and font utilities: saves GIF (evidence: `plots/stacked_bar_gif.py`)
- Dashboard plotter → Chart palette: uses colors (evidence: `github_profile_gif/plotter.py`)
- Dashboard plotter → Generated GIFs: writes GIFs (evidence: `README.md`)
- Profile README reader → Generated GIFs: displays GIFs (evidence: `README.md`)
- Terminal frame builder → Terminal configuration: uses settings (evidence: `frame_builder.py`)
- Terminal frame builder → Terminal drawing helpers: uses drawing helpers (evidence: `frame_builder.py`)
- Terminal frame builder → Image effects: uses effects (evidence: `frame_builder.py`)
