# moyarzunsil/eda-btree architecture

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

- Interactive diagram: https://gitdiagram.com/moyarzunsil/eda-btree
- Repository: https://github.com/moyarzunsil/eda-btree

## Overview

This repository is a teaching workshop about auditing a B-Tree implementation; its runnable product is an in-memory B-Tree and a small demonstration. The documented workflow is to run the demo, which builds a tree, exercises its operations and prints results. The tree delegates key-position lookup to nodes and tracks operation counters through metrics. The excerpts show these runtime calls, but not a separate audit application or persistent storage; tests and assignment deliverables are omitted from the runtime map.

Main entry points: [`src/btree/tree.py`](https://github.com/moyarzunsil/eda-btree/blob/main/src/btree/tree.py) (B-Tree), [`src/main.py`](https://github.com/moyarzunsil/eda-btree/blob/main/src/main.py) (Demo entry), [`src/btree/node.py`](https://github.com/moyarzunsil/eda-btree/blob/main/src/btree/node.py) (Tree node), [`src/btree/metrics.py`](https://github.com/moyarzunsil/eda-btree/blob/main/src/btree/metrics.py) (Operation metrics)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["B-Tree runtime"]
  node_tree["B-Tree<br/>[tree.py]"]
  node_node["Tree node<br/>[node.py]"]
  node_metrics["Operation metrics<br/>[metrics.py]"]
end

subgraph group_demo["Demonstration"]
  node_main["Demo entry<br/>[main.py]"]
end

node_runner(("Demo runner"))
node_terminal["Console output"]

node_runner -->|"runs demo"| node_main
node_main -->|"builds and exercises"| node_tree
node_tree -->|"creates and searches"| node_node
node_tree -->|"updates counters"| node_metrics
node_node -->|"counts comparisons"| node_metrics
node_main -->|"prints results"| node_terminal

click node_main "https://github.com/moyarzunsil/eda-btree/blob/main/src/main.py"
click node_tree "https://github.com/moyarzunsil/eda-btree/blob/main/src/btree/tree.py"
click node_node "https://github.com/moyarzunsil/eda-btree/blob/main/src/btree/node.py"
click node_metrics "https://github.com/moyarzunsil/eda-btree/blob/main/src/btree/metrics.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_tree,node_node,node_metrics toneBlue
class node_main toneAmber
class node_runner,node_terminal toneIndigo
```

## Components

### B-Tree runtime

- [B-Tree](https://github.com/moyarzunsil/eda-btree/blob/main/src/btree/tree.py): `src/btree/tree.py`
- [Tree node](https://github.com/moyarzunsil/eda-btree/blob/main/src/btree/node.py): `src/btree/node.py`
- [Operation metrics](https://github.com/moyarzunsil/eda-btree/blob/main/src/btree/metrics.py): `src/btree/metrics.py`

### Demonstration

- [Demo entry](https://github.com/moyarzunsil/eda-btree/blob/main/src/main.py): `src/main.py`

### Other components

- **Demo runner**
- **Console output**

## Connections

- Demo runner → Demo entry: runs demo (evidence: `README.md`)
- Demo entry → B-Tree: builds and exercises (evidence: `src/main.py`)
- B-Tree → Tree node: creates and searches (evidence: `src/btree/tree.py`)
- B-Tree → Operation metrics: updates counters (evidence: `src/btree/tree.py`)
- Tree node → Operation metrics: counts comparisons (evidence: `src/btree/node.py`)
- Demo entry → Console output: prints results (evidence: `src/main.py`)
