# jonasreyes/deeproot architecture

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

- Interactive diagram: https://gitdiagram.com/jonasreyes/deeproot
- Repository: https://github.com/jonasreyes/deeproot

## Overview

DeepRoot is a Flet desktop client for chatting with API-served LLMs. The main workflow is user prompt → app controller and model configuration → provider API → rendered conversation; users can also export conversations and customize appearance. The README additionally documents multiple models, API credentials and model parameters, themes, syntax highlighting, and Markdown/HTML export. Source excerpts show the controller, conversation UI, themes, instructions, and utilities; some feature links are documented rather than verified in sampled implementation.

Main entry points: [`src/main.py`](https://github.com/jonasreyes/deeproot/blob/main/src/main.py) (App controller), [`src/modules/interfaz.py`](https://github.com/jonasreyes/deeproot/blob/main/src/modules/interfaz.py) (Conversation UI), [`src/modules/instrucciones.py`](https://github.com/jonasreyes/deeproot/blob/main/src/modules/instrucciones.py) (Prompt instructions), [`src/modules/themes.py`](https://github.com/jonasreyes/deeproot/blob/main/src/modules/themes.py) (Themes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_app["App controller<br/>[main.py]"]
  node_themes["Themes<br/>[themes.py]"]
  node_about["About content<br/>[acerca.py]"]
end

subgraph group_conversation["Chat and prompts"]
  node_conversation_ui["Conversation UI<br/>[interfaz.py]"]
  node_prompt_instructions["Prompt instructions<br/>[instrucciones.py]"]
  node_date_helpers["Date helpers<br/>[utilidades.py]"]
  node_response_stream["Response rendering<br/>[main.py]"]
end

subgraph group_model["Model access"]
  node_api_settings["API settings<br/>[main.py]"]
  node_model_parameters["Model parameters<br/>[main.py]"]
  node_llm_api{{"LLM API"}}
end

subgraph group_support["Export and presentation"]
  node_export["Conversation export<br/>[main.py]"]
  node_exported_files["Markdown / HTML files"]
  node_syntax_display["Syntax display<br/>[interfaz.py]"]
end

node_user(("User"))

node_user -->|"sends prompts"| node_app
node_app -->|"manages conversation"| node_conversation_ui
node_app -->|"configures API"| node_api_settings
node_app -->|"sets parameters"| node_model_parameters
node_app -->|"loads instructions"| node_prompt_instructions
node_prompt_instructions -->|"gets current date"| node_date_helpers
node_app -->|"requests completions"| node_llm_api
node_llm_api -->|"streams response"| node_response_stream
node_response_stream -->|"updates bubbles"| node_conversation_ui
node_conversation_ui -->|"uses theme colors"| node_themes
node_app -->|"sets app theme"| node_themes
node_app -->|"shows about content"| node_about
node_app -->|"handles export"| node_export
node_export -->|"writes conversations"| node_exported_files
node_conversation_ui -->|"renders Markdown"| node_syntax_display
node_api_settings -.->|"selects provider"| node_llm_api
node_model_parameters -.->|"configures requests"| node_llm_api

click node_app "https://github.com/jonasreyes/deeproot/blob/main/src/main.py"
click node_conversation_ui "https://github.com/jonasreyes/deeproot/blob/main/src/modules/interfaz.py"
click node_themes "https://github.com/jonasreyes/deeproot/blob/main/src/modules/themes.py"
click node_about "https://github.com/jonasreyes/deeproot/blob/main/src/acerca.py"
click node_prompt_instructions "https://github.com/jonasreyes/deeproot/blob/main/src/modules/instrucciones.py"
click node_date_helpers "https://github.com/jonasreyes/deeproot/blob/main/src/modules/utilidades.py"
click node_api_settings "https://github.com/jonasreyes/deeproot/blob/main/src/main.py"
click node_model_parameters "https://github.com/jonasreyes/deeproot/blob/main/src/main.py"
click node_response_stream "https://github.com/jonasreyes/deeproot/blob/main/src/main.py"
click node_export "https://github.com/jonasreyes/deeproot/blob/main/src/main.py"
click node_syntax_display "https://github.com/jonasreyes/deeproot/blob/main/src/modules/interfaz.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_app,node_themes,node_about,node_user toneBlue
class node_conversation_ui,node_prompt_instructions,node_date_helpers,node_response_stream toneAmber
class node_api_settings,node_model_parameters,node_llm_api toneMint
class node_export,node_exported_files,node_syntax_display toneRose
```

## Components

### Desktop experience

- [App controller](https://github.com/jonasreyes/deeproot/blob/main/src/main.py): `src/main.py`
- [Themes](https://github.com/jonasreyes/deeproot/blob/main/src/modules/themes.py): `src/modules/themes.py`
- [About content](https://github.com/jonasreyes/deeproot/blob/main/src/acerca.py): `src/acerca.py`

### Chat and prompts

- [Conversation UI](https://github.com/jonasreyes/deeproot/blob/main/src/modules/interfaz.py): `src/modules/interfaz.py`
- [Prompt instructions](https://github.com/jonasreyes/deeproot/blob/main/src/modules/instrucciones.py): `src/modules/instrucciones.py`
- [Date helpers](https://github.com/jonasreyes/deeproot/blob/main/src/modules/utilidades.py): `src/modules/utilidades.py`
- [Response rendering](https://github.com/jonasreyes/deeproot/blob/main/src/main.py): `src/main.py`

### Model access

- [API settings](https://github.com/jonasreyes/deeproot/blob/main/src/main.py): `src/main.py`
- [Model parameters](https://github.com/jonasreyes/deeproot/blob/main/src/main.py): `src/main.py`
- **LLM API**

### Export and presentation

- [Conversation export](https://github.com/jonasreyes/deeproot/blob/main/src/main.py): `src/main.py`
- **Markdown / HTML files**
- [Syntax display](https://github.com/jonasreyes/deeproot/blob/main/src/modules/interfaz.py): `src/modules/interfaz.py`

### Other components

- **User**

## Connections

- User → App controller: sends prompts (evidence: `README.md`)
- App controller → Conversation UI: manages conversation (evidence: `src/main.py`)
- App controller → API settings: configures API (evidence: `src/main.py`)
- App controller → Model parameters: sets parameters (evidence: `README.md`)
- App controller → Prompt instructions: loads instructions (evidence: `src/main.py`)
- Prompt instructions → Date helpers: gets current date (evidence: `src/modules/instrucciones.py`)
- App controller → LLM API: requests completions (evidence: `src/main.py`)
- LLM API → Response rendering: streams response (evidence: `src/main.py`)
- Response rendering → Conversation UI: updates bubbles (evidence: `src/main.py`)
- Conversation UI → Themes: uses theme colors (evidence: `src/modules/interfaz.py`)
- App controller → Themes: sets app theme (evidence: `src/main.py`)
- App controller → About content: shows about content (evidence: `src/main.py`)
- App controller → Conversation export: handles export (evidence: `src/main.py`)
- Conversation export → Markdown / HTML files: writes conversations (evidence: `src/main.py`)
- Conversation UI → Syntax display: renders Markdown (evidence: `src/modules/interfaz.py`)
- API settings → LLM API: selects provider (evidence: `README.md`)
- Model parameters → LLM API: configures requests (evidence: `README.md`)
