# jhon287/arj-written-calculations-trainer-cli architecture

> Architecture diagram of the GitHub repository jhon287/arj-written-calculations-trainer-cli, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-08). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/jhon287/arj-written-calculations-trainer-cli
- Repository: https://github.com/jhon287/arj-written-calculations-trainer-cli

## Overview

This is a small command-line trainer that generates belt-color-specific written arithmetic exercises. The user selects a color, quantity, and whether to show answers; the CLI applies configuration and dispatches generation, then formats each exercise for terminal output. Integer and decimal addition, subtraction, and multiplication are distinct exercise-generation paths. The source excerpt shows the runtime implementation; the README documents the available options and difficulty levels.

Main entry points: [`src/main.py`](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py) (Belt exercise selection), [`src/config.py`](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/config.py) (Trainer defaults)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI and configuration"]
  node_entry["Argument parsing<br/>[main.py]"]
  node_config["Trainer defaults<br/>[config.py]"]
end

subgraph group_generation["Exercise generation"]
  node_runner["Exercise runner<br/>[main.py]"]
  node_dispatch["Belt exercise selection<br/>[main.py]"]
  node_integer_ops["Integer generators<br/>[main.py]"]
  node_decimal_ops["Decimal generators<br/>[main.py]"]
end

subgraph group_presentation["Formatting and results"]
  node_formatting["Written formatting<br/>[main.py]"]
  node_arithmetic["Result calculation<br/>[main.py]"]
end

node_user(("CLI user"))

node_user -->|"sets options"| node_entry
node_entry -->|"loads defaults"| node_config
node_entry -->|"starts run"| node_runner
node_runner -->|"generates exercises"| node_dispatch
node_dispatch -->|"selects integer path"| node_integer_ops
node_dispatch -->|"selects decimal path"| node_decimal_ops
node_dispatch -->|"formats exercise"| node_formatting
node_formatting -->|"gets result"| node_arithmetic

click node_entry "https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py"
click node_config "https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/config.py"
click node_runner "https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py"
click node_dispatch "https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py"
click node_integer_ops "https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py"
click node_decimal_ops "https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py"
click node_formatting "https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py"
click node_arithmetic "https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.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_entry,node_config,node_user toneBlue
class node_runner,node_dispatch,node_integer_ops,node_decimal_ops toneAmber
class node_formatting,node_arithmetic toneMint
```

## Components

### CLI and configuration

- [Argument parsing](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py): `src/main.py`
- [Trainer defaults](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/config.py): `src/config.py`

### Exercise generation

- [Exercise runner](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py): `src/main.py`
- [Belt exercise selection](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py): `src/main.py`
- [Integer generators](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py): `src/main.py`
- [Decimal generators](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py): `src/main.py`

### Formatting and results

- [Written formatting](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py): `src/main.py`
- [Result calculation](https://github.com/jhon287/arj-written-calculations-trainer-cli/blob/main/src/main.py): `src/main.py`

### Other components

- **CLI user**

## Connections

- CLI user → Argument parsing: sets options (evidence: `README.md`)
- Argument parsing → Trainer defaults: loads defaults (evidence: `src/main.py`)
- Argument parsing → Exercise runner: starts run (evidence: `src/main.py`)
- Exercise runner → Belt exercise selection: generates exercises (evidence: `src/main.py`)
- Belt exercise selection → Integer generators: selects integer path (evidence: `src/main.py`)
- Belt exercise selection → Decimal generators: selects decimal path (evidence: `src/main.py`)
- Belt exercise selection → Written formatting: formats exercise (evidence: `src/main.py`)
- Written formatting → Result calculation: gets result (evidence: `src/main.py`)
