# alimurad-dev/api-data-collector architecture

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

- Interactive diagram: https://gitdiagram.com/alimurad-dev/api-data-collector
- Repository: https://github.com/alimurad-dev/api-data-collector

## Overview

This small utility collects cryptocurrency quote data and prints a report from stored rows. The collector fetches and parses a Yahoo Finance response, then inserts supported coins into the database; the reader independently queries recent rows and formats them for terminal output. The README provides no additional capability details, so this map follows the two source files. The source excerpts show these interactions directly.

Main entry points: [`collector.py`](https://github.com/alimurad-dev/api-data-collector/blob/main/collector.py) (Market Collector), [`reader.py`](https://github.com/alimurad-dev/api-data-collector/blob/main/reader.py) (Report Reader)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_operator(("Operator"))
node_collector["Market Collector<br/>[collector.py]"]
node_yahoo["Yahoo Finance"]
node_database[("Crypto Prices")]
node_reader["Report Reader<br/>[reader.py]"]
node_terminal["Terminal"]

node_operator -->|"runs"| node_collector
node_collector -->|"requests quotes"| node_yahoo
node_collector -->|"inserts rows"| node_database
node_operator -->|"runs"| node_reader
node_reader -->|"queries rows"| node_database
node_reader -->|"prints report"| node_terminal

click node_collector "https://github.com/alimurad-dev/api-data-collector/blob/main/collector.py"
click node_reader "https://github.com/alimurad-dev/api-data-collector/blob/main/reader.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_operator,node_yahoo,node_terminal toneIndigo
class node_collector,node_reader toneTeal
class node_database toneAmber
```

## Components

### Other components

- **Operator**
- [Market Collector](https://github.com/alimurad-dev/api-data-collector/blob/main/collector.py): `collector.py`
- **Yahoo Finance**
- **Crypto Prices**
- [Report Reader](https://github.com/alimurad-dev/api-data-collector/blob/main/reader.py): `reader.py`
- **Terminal**

## Connections

- Operator → Market Collector: runs (evidence: `collector.py`)
- Market Collector → Yahoo Finance: requests quotes (evidence: `collector.py`)
- Market Collector → Crypto Prices: inserts rows (evidence: `collector.py`)
- Operator → Report Reader: runs (evidence: `reader.py`)
- Report Reader → Crypto Prices: queries rows (evidence: `reader.py`)
- Report Reader → Terminal: prints report (evidence: `reader.py`)
