# iwattsx/roman_calculator architecture

> Architecture diagram of the GitHub repository iwattsx/roman_calculator, 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/iwattsx/roman_calculator
- Repository: https://github.com/iwattsx/roman_calculator

## Overview

A small command-line Roman numeral calculator. Users provide a numeral or an expression; the CLI converts numeral operands to integers, evaluates expressions, and converts the result back to Roman numerals. The source excerpts show the call flow; no storage or external services are involved.

Main entry points: [`src/Roman_numeral_calc/calculator.py`](https://github.com/iwattsx/roman_calculator/blob/main/src/Roman_numeral_calc/calculator.py) (CLI calculator), [`main.py`](https://github.com/iwattsx/roman_calculator/blob/main/main.py) (Script entry), [`src/Roman_numeral_calc/utils.py`](https://github.com/iwattsx/roman_calculator/blob/main/src/Roman_numeral_calc/utils.py) (Numeral conversion), [`src/Roman_numeral_calc/evaluate_expression.py`](https://github.com/iwattsx/roman_calculator/blob/main/src/Roman_numeral_calc/evaluate_expression.py) (Expression evaluator)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("CLI user"))
node_script["Script entry<br/>[main.py]"]
node_calculator["CLI calculator<br/>[calculator.py]"]
node_conversion["Numeral conversion<br/>[utils.py]"]
node_evaluation["Expression evaluator"]

node_user -->|"runs"| node_script
node_script -->|"calls"| node_calculator
node_calculator -->|"converts operands"| node_conversion
node_calculator -->|"evaluates expression"| node_evaluation
node_calculator -->|"converts result"| node_conversion

click node_script "https://github.com/iwattsx/roman_calculator/blob/main/main.py"
click node_calculator "https://github.com/iwattsx/roman_calculator/blob/main/src/Roman_numeral_calc/calculator.py"
click node_conversion "https://github.com/iwattsx/roman_calculator/blob/main/src/Roman_numeral_calc/utils.py"
click node_evaluation "https://github.com/iwattsx/roman_calculator/blob/main/src/Roman_numeral_calc/evaluate_expression.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_user toneBlue
class node_script,node_calculator,node_conversion,node_evaluation toneTeal
```

## Components

### Other components

- **CLI user**
- [Script entry](https://github.com/iwattsx/roman_calculator/blob/main/main.py): `main.py`
- [CLI calculator](https://github.com/iwattsx/roman_calculator/blob/main/src/Roman_numeral_calc/calculator.py): `src/Roman_numeral_calc/calculator.py`
- [Numeral conversion](https://github.com/iwattsx/roman_calculator/blob/main/src/Roman_numeral_calc/utils.py): `src/Roman_numeral_calc/utils.py`
- [Expression evaluator](https://github.com/iwattsx/roman_calculator/blob/main/src/Roman_numeral_calc/evaluate_expression.py): `src/Roman_numeral_calc/evaluate_expression.py`

## Connections

- CLI user → Script entry: runs (evidence: `README.md`)
- Script entry → CLI calculator: calls (evidence: `main.py`)
- CLI calculator → Numeral conversion: converts operands (evidence: `src/Roman_numeral_calc/calculator.py`)
- CLI calculator → Expression evaluator: evaluates expression (evidence: `src/Roman_numeral_calc/calculator.py`)
- CLI calculator → Numeral conversion: converts result (evidence: `src/Roman_numeral_calc/calculator.py`)
