# kodeflowstudios/utui architecture

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

- Interactive diagram: https://gitdiagram.com/kodeflowstudios/utui
- Repository: https://github.com/kodeflowstudios/utui

## Overview

UTUI is a Rust terminal interface for managing Unity projects and editor installations through Unity CLI. The principal workflow is terminal interaction, project/editor selection, background execution, and status display. The README also documents project creation/deletion/opening and editor install/uninstall; custom commands and templates are explicitly future work, not active capabilities. Sampled source confirms the app-to-CLI calls and rendering helpers; wiring for unsampled modules is omitted.

Main entry points: [`src/ui.rs`](https://github.com/kodeflowstudios/utui/blob/main/src/ui.rs) (TUI renderer), [`src/unity.rs`](https://github.com/kodeflowstudios/utui/blob/main/src/unity.rs) (Unity CLI adapter), [`src/app.rs`](https://github.com/kodeflowstudios/utui/blob/main/src/app.rs) (App workflow), [`src/main.rs`](https://github.com/kodeflowstudios/utui/blob/main/src/main.rs) (CLI entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_main["CLI entry<br/>[main.rs]"]
  node_app["App workflow<br/>[app.rs]"]
end

subgraph group_experience["Terminal interface"]
  node_ui["TUI renderer<br/>[ui.rs]"]
  node_input["Input handling<br/>[input.rs]"]
  node_dialogue["Dialog state<br/>[dialogue.rs]"]
  node_help["Help menu<br/>[help.rs]"]
end

subgraph group_management["Unity management"]
  node_unity["Unity CLI adapter<br/>[unity.rs]"]
  node_project["Project model<br/>[project.rs]"]
  node_template["Template model<br/>[template.rs]"]
end

subgraph group_core["Runtime support"]
  node_command["Command execution<br/>[command.rs]"]
  node_threading["Async tasks<br/>[threading.rs]"]
  node_errors["Error handling<br/>[error.rs]"]
end

node_user(("Terminal user"))
node_unity_cli["Unity CLI"]

node_user -->|"starts"| node_main
node_main -->|"runs"| node_app
node_app -->|"renders state"| node_ui
node_ui -->|"prepares lists"| node_app
node_ui -->|"renders input"| node_input
node_ui -->|"renders dialogs"| node_dialogue
node_ui -->|"renders help"| node_help
node_app -->|"dispatches tasks"| node_threading
node_app -->|"requests management"| node_unity
node_unity -->|"runs commands"| node_command
node_command -->|"invokes"| node_unity_cli
node_unity -->|"maps template data"| node_template
node_unity -->|"uses project data"| node_project
node_unity -->|"returns errors"| node_errors

click node_main "https://github.com/kodeflowstudios/utui/blob/main/src/main.rs"
click node_app "https://github.com/kodeflowstudios/utui/blob/main/src/app.rs"
click node_ui "https://github.com/kodeflowstudios/utui/blob/main/src/ui.rs"
click node_input "https://github.com/kodeflowstudios/utui/blob/main/src/input.rs"
click node_dialogue "https://github.com/kodeflowstudios/utui/blob/main/src/dialogue.rs"
click node_help "https://github.com/kodeflowstudios/utui/blob/main/src/help.rs"
click node_unity "https://github.com/kodeflowstudios/utui/blob/main/src/unity.rs"
click node_project "https://github.com/kodeflowstudios/utui/blob/main/src/project.rs"
click node_template "https://github.com/kodeflowstudios/utui/blob/main/src/template.rs"
click node_command "https://github.com/kodeflowstudios/utui/blob/main/src/command.rs"
click node_threading "https://github.com/kodeflowstudios/utui/blob/main/src/threading.rs"
click node_errors "https://github.com/kodeflowstudios/utui/blob/main/src/error.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_main,node_app,node_user toneBlue
class node_ui,node_input,node_dialogue,node_help toneAmber
class node_unity,node_project,node_template toneMint
class node_command,node_threading,node_errors toneRose
class node_unity_cli toneIndigo
```

## Components

### Application entry

- [CLI entry](https://github.com/kodeflowstudios/utui/blob/main/src/main.rs): `src/main.rs`
- [App workflow](https://github.com/kodeflowstudios/utui/blob/main/src/app.rs): `src/app.rs`

### Terminal interface

- [TUI renderer](https://github.com/kodeflowstudios/utui/blob/main/src/ui.rs): `src/ui.rs`
- [Input handling](https://github.com/kodeflowstudios/utui/blob/main/src/input.rs): `src/input.rs`
- [Dialog state](https://github.com/kodeflowstudios/utui/blob/main/src/dialogue.rs): `src/dialogue.rs`
- [Help menu](https://github.com/kodeflowstudios/utui/blob/main/src/help.rs): `src/help.rs`

### Unity management

- [Unity CLI adapter](https://github.com/kodeflowstudios/utui/blob/main/src/unity.rs): `src/unity.rs`
- [Project model](https://github.com/kodeflowstudios/utui/blob/main/src/project.rs): `src/project.rs`
- [Template model](https://github.com/kodeflowstudios/utui/blob/main/src/template.rs): `src/template.rs`

### Runtime support

- [Command execution](https://github.com/kodeflowstudios/utui/blob/main/src/command.rs): `src/command.rs`
- [Async tasks](https://github.com/kodeflowstudios/utui/blob/main/src/threading.rs): `src/threading.rs`
- [Error handling](https://github.com/kodeflowstudios/utui/blob/main/src/error.rs): `src/error.rs`

### Other components

- **Terminal user**
- **Unity CLI**

## Connections

- Terminal user → CLI entry: starts
- CLI entry → App workflow: runs
- App workflow → TUI renderer: renders state
- TUI renderer → App workflow: prepares lists
- TUI renderer → Input handling: renders input
- TUI renderer → Dialog state: renders dialogs
- TUI renderer → Help menu: renders help
- App workflow → Async tasks: dispatches tasks
- App workflow → Unity CLI adapter: requests management
- Unity CLI adapter → Command execution: runs commands
- Command execution → Unity CLI: invokes
- Unity CLI adapter → Template model: maps template data
- Unity CLI adapter → Project model: uses project data
- Unity CLI adapter → Error handling: returns errors
