# ethanlabs101/retro-fi architecture

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

- Interactive diagram: https://gitdiagram.com/ethanlabs101/retro-fi
- Repository: https://github.com/ethanlabs101/retro-fi
- Video tour (about a minute): https://gitdiagram.com/ethanlabs101/retro-fi/video

## Overview

Retro-Fi is a Bash-based Linux retro-game launcher. The documented user workflow is to select a game from its Rofi interface and launch it with an installed emulator; games are organized by console under Games/. Other documented capabilities are favorites with ROM/save symlinks, theme editing, and box-art refresh. The tree and README identify relevant entry points and assets, but no source excerpts were provided, so internal calls and precise data-flow wiring cannot be verified; uncertain links are omitted.

Main entry points: [`local/bin/retro-games`](https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/retro-games) (Game launcher), [`local/share/retro-games/favorites/retro-favorites-update.sh`](https://github.com/ethanlabs101/retro-fi/blob/main/local/share/retro-games/favorites/retro-favorites-update.sh) (Favorites updater), [`Games`](https://github.com/ethanlabs101/retro-fi/tree/main/Games) (Console game folders), [`local/bin/run-favorites-update.sh`](https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/run-favorites-update.sh) (Favorites runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Game launching"]
  node_launcher["Game launcher"]
end

subgraph group_library["Game library"]
  node_games[("Console game folders")]
  node_icons[("Game icons")]
  node_favorites["Favorites updater"]
  node_favorites_runner["Favorites runner"]
end

subgraph group_customize["Interface customization"]
  node_theme_editor["Theme editor runner"]
  node_theme_manager["Rofi theme manager"]
  node_theme["Rofi theme<br/>[retro-fi.rasi]"]
  node_backgrounds[("Theme backgrounds")]
end

subgraph group_maintenance["Library tools"]
  node_boxart_refresh["Box-art refresh"]
  node_boxart_upload["Box-art upload runner"]
  node_boxart_cache[("Box-art cache")]
end

node_user(("User"))
node_rofi["Rofi menu"]
node_emulator["Installed emulator"]

node_user -->|"runs"| node_launcher
node_launcher -->|"opens menu"| node_rofi
node_launcher -->|"lists games"| node_games
node_launcher -->|"launches game"| node_emulator
node_user -->|"runs"| node_favorites_runner
node_favorites_runner -->|"invokes"| node_favorites
node_favorites -->|"symlinks ROMs"| node_games
node_favorites -->|"symlinks saves"| node_games
node_user -->|"runs"| node_theme_editor
node_user -->|"runs"| node_theme_manager
node_user -->|"runs"| node_boxart_refresh
node_user -->|"runs"| node_boxart_upload

click node_launcher "https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/retro-games"
click node_games "https://github.com/ethanlabs101/retro-fi/tree/main/Games"
click node_icons "https://github.com/ethanlabs101/retro-fi/tree/main/cache/rofi-game-icons"
click node_favorites "https://github.com/ethanlabs101/retro-fi/blob/main/local/share/retro-games/favorites/retro-favorites-update.sh"
click node_favorites_runner "https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/run-favorites-update.sh"
click node_theme_editor "https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/run-theme-editor.sh"
click node_theme_manager "https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/rofi-theme-manager.sh"
click node_theme "https://github.com/ethanlabs101/retro-fi/blob/main/config/rofi/game-theme/retro-fi.rasi"
click node_backgrounds "https://github.com/ethanlabs101/retro-fi/tree/main/retro-fi-backgrounds"
click node_boxart_refresh "https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/retrofi-boxart-refresh.sh"
click node_boxart_upload "https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/run-boxart-upload.sh"
click node_boxart_cache "https://github.com/ethanlabs101/retro-fi/tree/main/cache/rofi-game-icons"

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_launcher,node_user toneBlue
class node_games,node_icons,node_favorites,node_favorites_runner toneAmber
class node_theme_editor,node_theme_manager,node_theme,node_backgrounds toneMint
class node_boxart_refresh,node_boxart_upload,node_boxart_cache toneRose
class node_rofi,node_emulator toneIndigo
```

## Components

### Game launching

- [Game launcher](https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/retro-games): `local/bin/retro-games`

### Game library

- [Console game folders](https://github.com/ethanlabs101/retro-fi/tree/main/Games): `Games`
- [Game icons](https://github.com/ethanlabs101/retro-fi/tree/main/cache/rofi-game-icons): `cache/rofi-game-icons`
- [Favorites updater](https://github.com/ethanlabs101/retro-fi/blob/main/local/share/retro-games/favorites/retro-favorites-update.sh): `local/share/retro-games/favorites/retro-favorites-update.sh`
- [Favorites runner](https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/run-favorites-update.sh): `local/bin/run-favorites-update.sh`

### Interface customization

- [Theme editor runner](https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/run-theme-editor.sh): `local/bin/run-theme-editor.sh`
- [Rofi theme manager](https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/rofi-theme-manager.sh): `local/bin/rofi-theme-manager.sh`
- [Rofi theme](https://github.com/ethanlabs101/retro-fi/blob/main/config/rofi/game-theme/retro-fi.rasi): `config/rofi/game-theme/retro-fi.rasi`
- [Theme backgrounds](https://github.com/ethanlabs101/retro-fi/tree/main/retro-fi-backgrounds): `retro-fi-backgrounds`

### Library tools

- [Box-art refresh](https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/retrofi-boxart-refresh.sh): `local/bin/retrofi-boxart-refresh.sh`
- [Box-art upload runner](https://github.com/ethanlabs101/retro-fi/blob/main/local/bin/run-boxart-upload.sh): `local/bin/run-boxart-upload.sh`
- [Box-art cache](https://github.com/ethanlabs101/retro-fi/tree/main/cache/rofi-game-icons): `cache/rofi-game-icons`

### Other components

- **User**
- **Rofi menu**
- **Installed emulator**

## Connections

- User → Game launcher: runs
- Game launcher → Rofi menu: opens menu
- Game launcher → Console game folders: lists games
- Game launcher → Installed emulator: launches game
- User → Favorites runner: runs
- Favorites runner → Favorites updater: invokes
- Favorites updater → Console game folders: symlinks ROMs
- Favorites updater → Console game folders: symlinks saves
- User → Theme editor runner: runs
- User → Rofi theme manager: runs
- User → Box-art refresh: runs
- User → Box-art upload runner: runs
