# yesdisown/numx architecture

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

- Interactive diagram: https://gitdiagram.com/yesdisown/numx
- Repository: https://github.com/yesdisown/numx

## Overview

numx is a small Rust arithmetic-expression library with a demo executable and an addition-exercise generator. The demonstrated workflow builds literal Numbers, combines them into an expression, evaluates it during construction, and prints the result. The model also supports subtraction, division, and multiplication; the generator creates addition expressions from a random target. The README is empty, and the sampled source does not show a caller for the generator or any CLI behavior.

Main entry points: [`src/main.rs`](https://github.com/yesdisown/numx/blob/main/src/main.rs) (Demo executable), [`src/exercises/addition.rs`](https://github.com/yesdisown/numx/blob/main/src/exercises/addition.rs) (Addition generator), [`src/models.rs`](https://github.com/yesdisown/numx/blob/main/src/models.rs) (Number model)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_demo["Demo executable<br/>[main.rs]"]
node_number["Number model<br/>[models.rs]"]
node_addition["Addition generator<br/>[addition.rs]"]
node_rng["Random generator"]
node_stdout["Standard output"]

node_user -->|"runs"| node_demo
node_demo -->|"constructs"| node_number
node_demo -->|"prints result"| node_stdout
node_addition -->|"draws values"| node_rng
node_addition -->|"builds expression"| node_number

click node_demo "https://github.com/yesdisown/numx/blob/main/src/main.rs"
click node_number "https://github.com/yesdisown/numx/blob/main/src/models.rs"
click node_addition "https://github.com/yesdisown/numx/blob/main/src/exercises/addition.rs"

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_demo,node_addition toneTeal
class node_number,node_rng,node_stdout toneIndigo
```

## Components

### Other components

- **User**
- [Demo executable](https://github.com/yesdisown/numx/blob/main/src/main.rs): `src/main.rs`
- [Number model](https://github.com/yesdisown/numx/blob/main/src/models.rs): `src/models.rs`
- [Addition generator](https://github.com/yesdisown/numx/blob/main/src/exercises/addition.rs): `src/exercises/addition.rs`
- **Random generator**
- **Standard output**

## Connections

- User → Demo executable: runs
- Demo executable → Number model: constructs
- Demo executable → Standard output: prints result
- Addition generator → Random generator: draws values
- Addition generator → Number model: builds expression
