# vprezende/llama_manager architecture

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

- Interactive diagram: https://gitdiagram.com/vprezende/llama_manager
- Repository: https://github.com/vprezende/llama_manager

## Overview

The repository appears to be a Flutter/Dart package for managing a llama model: it exposes a client, separates engine, download, and cache responsibilities behind ports, and includes a download UI. The README is still a template and provides no product workflow or capability details; the graph therefore reflects the structure suggested by the source tree, not verified runtime calls. Dashed edges mark those inferred relationships.

Main entry points: [`lib/src/core/client/llama_manager_client.dart`](https://github.com/vprezende/llama_manager/blob/main/lib/src/core/client/llama_manager_client.dart) (Manager client), [`lib/src/presentation/screens/llama_download_screen.dart`](https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/screens/llama_download_screen.dart) (Download screen), [`lib/src/presentation/controllers/llama_download_controller.dart`](https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/controllers/llama_download_controller.dart) (Download controller), [`lib/src/core/models/llama_model.dart`](https://github.com/vprezende/llama_manager/blob/main/lib/src/core/models/llama_model.dart) (Model state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_core["Core management"]
  node_client["Manager client"]
  node_model["Model state<br/>[llama_model.dart]"]
  node_configs["Model and generation config"]
  node_status["Download status"]
  node_ports["Model ports"]
end

subgraph group_adapters["Model adapters"]
  node_engine["Llama engine adapter"]
  node_downloader["Model download adapter"]
  node_cache[("Local model cache")]
end

subgraph group_presentation["Download UI"]
  node_controller["Download controller"]
  node_screen["Download screen"]
  node_progress["Progress view"]
  node_response["Response view<br/>[response_view.dart]"]
  node_thinking["Thinking indicator"]
  node_theme["Download theme"]
end

node_consumer(("Package user"))

node_consumer -.->|"uses"| node_client
node_client -.->|"uses"| node_ports
node_client -.->|"manages"| node_model
node_client -.->|"accepts"| node_configs
node_client -.->|"delegates to"| node_engine
node_client -.->|"delegates to"| node_downloader
node_client -.->|"uses"| node_cache
node_screen -.->|"uses"| node_controller
node_controller -.->|"uses"| node_client
node_controller -.->|"reports"| node_status
node_screen -.->|"renders"| node_progress
node_screen -.->|"uses"| node_theme
node_screen -.->|"renders"| node_response
node_screen -.->|"renders"| node_thinking

click node_client "https://github.com/vprezende/llama_manager/blob/main/lib/src/core/client/llama_manager_client.dart"
click node_model "https://github.com/vprezende/llama_manager/blob/main/lib/src/core/models/llama_model.dart"
click node_configs "https://github.com/vprezende/llama_manager/tree/main/lib/src/core/definitions/config"
click node_status "https://github.com/vprezende/llama_manager/blob/main/lib/src/core/definitions/status/llama_download_status.dart"
click node_ports "https://github.com/vprezende/llama_manager/tree/main/lib/src/core/ports"
click node_engine "https://github.com/vprezende/llama_manager/blob/main/lib/src/adapters/llama_engine_adapter.dart"
click node_downloader "https://github.com/vprezende/llama_manager/blob/main/lib/src/adapters/llama_model_download_adapter.dart"
click node_cache "https://github.com/vprezende/llama_manager/blob/main/lib/src/adapters/local_model_cache_adapter.dart"
click node_controller "https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/controllers/llama_download_controller.dart"
click node_screen "https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/screens/llama_download_screen.dart"
click node_progress "https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/widgets/internal/llama_download_progress_view.dart"
click node_response "https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/widgets/external/response_view.dart"
click node_thinking "https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/widgets/external/thinking_indicator.dart"
click node_theme "https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/themes/llama_download_theme.dart"

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_client,node_model,node_configs,node_status,node_ports,node_consumer toneBlue
class node_engine,node_downloader,node_cache toneAmber
class node_controller,node_screen,node_progress,node_response,node_thinking,node_theme toneMint
```

## Components

### Core management

- [Manager client](https://github.com/vprezende/llama_manager/blob/main/lib/src/core/client/llama_manager_client.dart): `lib/src/core/client/llama_manager_client.dart`
- [Model state](https://github.com/vprezende/llama_manager/blob/main/lib/src/core/models/llama_model.dart): `lib/src/core/models/llama_model.dart`
- [Model and generation config](https://github.com/vprezende/llama_manager/tree/main/lib/src/core/definitions/config): `lib/src/core/definitions/config`
- [Download status](https://github.com/vprezende/llama_manager/blob/main/lib/src/core/definitions/status/llama_download_status.dart): `lib/src/core/definitions/status/llama_download_status.dart`
- [Model ports](https://github.com/vprezende/llama_manager/tree/main/lib/src/core/ports): `lib/src/core/ports`

### Model adapters

- [Llama engine adapter](https://github.com/vprezende/llama_manager/blob/main/lib/src/adapters/llama_engine_adapter.dart): `lib/src/adapters/llama_engine_adapter.dart`
- [Model download adapter](https://github.com/vprezende/llama_manager/blob/main/lib/src/adapters/llama_model_download_adapter.dart): `lib/src/adapters/llama_model_download_adapter.dart`
- [Local model cache](https://github.com/vprezende/llama_manager/blob/main/lib/src/adapters/local_model_cache_adapter.dart): `lib/src/adapters/local_model_cache_adapter.dart`

### Download UI

- [Download controller](https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/controllers/llama_download_controller.dart): `lib/src/presentation/controllers/llama_download_controller.dart`
- [Download screen](https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/screens/llama_download_screen.dart): `lib/src/presentation/screens/llama_download_screen.dart`
- [Progress view](https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/widgets/internal/llama_download_progress_view.dart): `lib/src/presentation/widgets/internal/llama_download_progress_view.dart`
- [Response view](https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/widgets/external/response_view.dart): `lib/src/presentation/widgets/external/response_view.dart`
- [Thinking indicator](https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/widgets/external/thinking_indicator.dart): `lib/src/presentation/widgets/external/thinking_indicator.dart`
- [Download theme](https://github.com/vprezende/llama_manager/blob/main/lib/src/presentation/themes/llama_download_theme.dart): `lib/src/presentation/themes/llama_download_theme.dart`

### Other components

- **Package user**

## Connections

- Package user → Manager client: uses
- Manager client → Model ports: uses
- Manager client → Model state: manages
- Manager client → Model and generation config: accepts
- Manager client → Llama engine adapter: delegates to
- Manager client → Model download adapter: delegates to
- Manager client → Local model cache: uses
- Download screen → Download controller: uses
- Download controller → Manager client: uses
- Download controller → Download status: reports
- Download screen → Progress view: renders
- Download screen → Download theme: uses
- Download screen → Response view: renders
- Download screen → Thinking indicator: renders
