# saphall/nango-data-fetch architecture

> Architecture diagram of the GitHub repository saphall/nango-data-fetch, 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/saphall/nango-data-fetch
- Repository: https://github.com/saphall/nango-data-fetch

## Overview

Nango API Explorer is a single-file Streamlit app for interactively querying Nango’s StandardEmployee API. The user configures request parameters and employee IDs, previews the cURL command, then fetches records; the app retains the response and presents raw JSON, structured employee cards, and response metadata. The workflow and distinct views are visible in app.py and the README. The excerpts omit the request helper’s implementation, so the request edge reflects the visible fetch call, not unshown HTTP details.

Main entry points: [`app.py`](https://github.com/saphall/nango-data-fetch/blob/main/app.py) (Response state)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Request setup"]
  node_config["API settings<br/>[app.py]"]
  node_ids["Employee IDs<br/>[app.py]"]
  node_curl["cURL preview<br/>[app.py]"]
end

subgraph group_runtime["Query workflow"]
  node_fetch["Fetch records<br/>[app.py]"]
  node_session["Response state<br/>[app.py]"]
end

subgraph group_results["Response views"]
  node_raw["Raw JSON<br/>[app.py]"]
  node_cards["Employee cards<br/>[app.py]"]
  node_info["Response info<br/>[app.py]"]
end

node_user(("User"))
node_nango["Nango API"]

node_user -->|"sets options"| node_config
node_user -->|"enters IDs"| node_ids
node_config -->|"previews request"| node_curl
node_ids -->|"previews IDs"| node_curl
node_user -->|"starts fetch"| node_fetch
node_fetch -->|"requests records"| node_nango
node_fetch -->|"stores response"| node_session
node_session -->|"renders JSON"| node_raw
node_session -->|"renders employees"| node_cards
node_session -->|"shows metadata"| node_info

click node_config "https://github.com/saphall/nango-data-fetch/blob/main/app.py"
click node_ids "https://github.com/saphall/nango-data-fetch/blob/main/app.py"
click node_curl "https://github.com/saphall/nango-data-fetch/blob/main/app.py"
click node_fetch "https://github.com/saphall/nango-data-fetch/blob/main/app.py"
click node_session "https://github.com/saphall/nango-data-fetch/blob/main/app.py"
click node_raw "https://github.com/saphall/nango-data-fetch/blob/main/app.py"
click node_cards "https://github.com/saphall/nango-data-fetch/blob/main/app.py"
click node_info "https://github.com/saphall/nango-data-fetch/blob/main/app.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_config,node_ids,node_curl,node_user toneBlue
class node_fetch,node_session toneAmber
class node_raw,node_cards,node_info,node_nango toneMint
```

## Components

### Request setup

- [API settings](https://github.com/saphall/nango-data-fetch/blob/main/app.py): `app.py`
- [Employee IDs](https://github.com/saphall/nango-data-fetch/blob/main/app.py): `app.py`
- [cURL preview](https://github.com/saphall/nango-data-fetch/blob/main/app.py): `app.py`

### Query workflow

- [Fetch records](https://github.com/saphall/nango-data-fetch/blob/main/app.py): `app.py`
- [Response state](https://github.com/saphall/nango-data-fetch/blob/main/app.py): `app.py`

### Response views

- [Raw JSON](https://github.com/saphall/nango-data-fetch/blob/main/app.py): `app.py`
- [Employee cards](https://github.com/saphall/nango-data-fetch/blob/main/app.py): `app.py`
- [Response info](https://github.com/saphall/nango-data-fetch/blob/main/app.py): `app.py`

### Other components

- **User**
- **Nango API**

## Connections

- User → API settings: sets options (evidence: `README.md`)
- User → Employee IDs: enters IDs (evidence: `README.md`)
- API settings → cURL preview: previews request (evidence: `README.md`)
- Employee IDs → cURL preview: previews IDs (evidence: `README.md`)
- User → Fetch records: starts fetch (evidence: `app.py`)
- Fetch records → Nango API: requests records (evidence: `app.py`)
- Fetch records → Response state: stores response (evidence: `app.py`)
- Response state → Raw JSON: renders JSON (evidence: `README.md`)
- Response state → Employee cards: renders employees (evidence: `README.md`)
- Response state → Response info: shows metadata (evidence: `README.md`)
