# nv-global/marketdata architecture

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

- Interactive diagram: https://gitdiagram.com/nv-global/marketdata
- Repository: https://github.com/nv-global/marketdata

## Overview

MarketData’s implemented workflow is a small file-oriented processor, not the broad real-time risk platform described in the README: the CLI parses options, `run` obtains one input string, the processor returns a JSON result, and `run` writes or prints it. README capabilities such as fractured-feed ingestion, replay, surveillance, storage, and observability are not present in the sampled implementation, so they are not represented as runtime components.

Main entry points: [`src/lib.rs`](https://github.com/nv-global/marketdata/blob/main/src/lib.rs) (Run workflow), [`src/main.rs`](https://github.com/nv-global/marketdata/blob/main/src/main.rs) (CLI entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Command entry"]
  node_main["CLI entry<br/>[main.rs]"]
end

subgraph group_processing["Processing"]
  node_run["Run workflow<br/>[lib.rs]"]
  node_processor["Data processor<br/>[lib.rs]"]
  node_result["Process result<br/>[lib.rs]"]
end

node_user(("CLI user"))
node_input["Input file"]
node_output["Output file or stdout"]

node_user -->|"provides options"| node_main
node_main -->|"calls"| node_run
node_run -->|"reads optionally"| node_input
node_run -->|"processes input"| node_processor
node_processor -->|"returns"| node_result
node_run -->|"writes or prints"| node_output

click node_main "https://github.com/nv-global/marketdata/blob/main/src/main.rs"
click node_run "https://github.com/nv-global/marketdata/blob/main/src/lib.rs"
click node_processor "https://github.com/nv-global/marketdata/blob/main/src/lib.rs"
click node_result "https://github.com/nv-global/marketdata/blob/main/src/lib.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_main,node_user toneBlue
class node_run,node_processor,node_result toneAmber
class node_input,node_output toneIndigo
```

## Components

### Command entry

- [CLI entry](https://github.com/nv-global/marketdata/blob/main/src/main.rs): `src/main.rs`

### Processing

- [Run workflow](https://github.com/nv-global/marketdata/blob/main/src/lib.rs): `src/lib.rs`
- [Data processor](https://github.com/nv-global/marketdata/blob/main/src/lib.rs): `src/lib.rs`
- [Process result](https://github.com/nv-global/marketdata/blob/main/src/lib.rs): `src/lib.rs`

### Other components

- **CLI user**
- **Input file**
- **Output file or stdout**

## Connections

- CLI user → CLI entry: provides options
- CLI entry → Run workflow: calls
- Run workflow → Input file: reads optionally
- Run workflow → Data processor: processes input
- Data processor → Process result: returns
- Run workflow → Output file or stdout: writes or prints
