# rafa-riki/converter architecture

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

- Interactive diagram: https://gitdiagram.com/rafa-riki/converter
- Repository: https://github.com/rafa-riki/converter

## Overview

This is a small Python CLI unit converter. The user selects a conversion, enters a number, and receives a formatted result; results are accumulated in memory and can be appended to a text file. The menu, conversion methods, and history handling are all implemented in one source file. The README documents the supported conversions and history feature, while the excerpt shows the CLI dispatch and file write; no separate storage or integration layer is present.

Main entry points: [`unti-convert.py`](https://github.com/rafa-riki/converter/blob/main/unti-convert.py) (Main loop)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI"]
  node_main["Main loop<br/>[unti-convert.py]"]
  node_menu["Menu display<br/>[unti-convert.py]"]
end

subgraph group_conversion["Conversion"]
  node_converter["Unit conversions<br/>[unti-convert.py]"]
end

subgraph group_history["History"]
  node_history_list["History list<br/>[unti-convert.py]"]
  node_save_history["Save history<br/>[unti-convert.py]"]
  node_history_file[("Text file")]
end

node_user(("User"))

node_user -->|"enters choices"| node_main
node_main -->|"prints menu"| node_menu
node_main -->|"dispatches conversion"| node_converter
node_main -->|"appends result"| node_history_list
node_main -->|"dispatches save"| node_save_history
node_save_history -->|"reads entries"| node_history_list
node_save_history -->|"appends text"| node_history_file

click node_main "https://github.com/rafa-riki/converter/blob/main/unti-convert.py"
click node_menu "https://github.com/rafa-riki/converter/blob/main/unti-convert.py"
click node_converter "https://github.com/rafa-riki/converter/blob/main/unti-convert.py"
click node_history_list "https://github.com/rafa-riki/converter/blob/main/unti-convert.py"
click node_save_history "https://github.com/rafa-riki/converter/blob/main/unti-convert.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_main,node_menu,node_user toneBlue
class node_converter toneAmber
class node_history_list,node_save_history,node_history_file toneMint
```

## Components

### CLI

- [Main loop](https://github.com/rafa-riki/converter/blob/main/unti-convert.py): `unti-convert.py`
- [Menu display](https://github.com/rafa-riki/converter/blob/main/unti-convert.py): `unti-convert.py`

### Conversion

- [Unit conversions](https://github.com/rafa-riki/converter/blob/main/unti-convert.py): `unti-convert.py`

### History

- [History list](https://github.com/rafa-riki/converter/blob/main/unti-convert.py): `unti-convert.py`
- [Save history](https://github.com/rafa-riki/converter/blob/main/unti-convert.py): `unti-convert.py`
- **Text file**

### Other components

- **User**

## Connections

- User → Main loop: enters choices (evidence: `unti-convert.py`)
- Main loop → Menu display: prints menu (evidence: `unti-convert.py`)
- Main loop → Unit conversions: dispatches conversion (evidence: `unti-convert.py`)
- Main loop → History list: appends result (evidence: `unti-convert.py`)
- Main loop → Save history: dispatches save (evidence: `unti-convert.py`)
- Save history → History list: reads entries (evidence: `unti-convert.py`)
- Save history → Text file: appends text (evidence: `unti-convert.py`)
