# hyojun82/notion-para-graph architecture

> Architecture diagram of the GitHub repository hyojun82/notion-para-graph, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-12-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/hyojun82/notion-para-graph
- Repository: https://github.com/hyojun82/notion-para-graph

## Overview

This is a Notion PARA graph viewer: a scheduled sync fetches PARA databases, converts their relationships into graph data, and the browser renders that data for exploration. The README documents graph types, interactions, search, filtering, and refresh behavior. The sync implementation was excerpted; browser implementation details and workflow internals were not, so those nodes and links reflect documented capabilities rather than inspected source.

Main entry points: [`index.html`](https://github.com/hyojun82/notion-para-graph/blob/main/index.html) (Interactive graph), [`scripts/sync-notion.js`](https://github.com/hyojun82/notion-para-graph/blob/main/scripts/sync-notion.js) (Data synchronizer), [`data.json`](https://github.com/hyojun82/notion-para-graph/blob/main/data.json) (Graph data), [`.github/workflows/sync-notion.yml`](https://github.com/hyojun82/notion-para-graph/blob/main/.github/workflows/sync-notion.yml) (Scheduled sync)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ingestion["Notion sync"]
  node_notion_db[("PARA databases")]
  node_notion_api["Notion API"]
  node_sync_schedule["Scheduled sync<br/>[sync-notion.yml]"]
  node_sync_script["Data synchronizer<br/>[sync-notion.js]"]
  node_db_config["Database IDs<br/>[config.json]"]
end

subgraph group_graph_data["Graph data"]
  node_graph_file["Graph data<br/>[data.json]"]
end

subgraph group_viewer["Browser viewer"]
  node_graph_view["Interactive graph<br/>[index.html]"]
  node_graph_types["PARA node types<br/>[index.html]"]
  node_graph_links["Relationship links<br/>[index.html]"]
  node_graph_controls["Graph controls<br/>[index.html]"]
  node_legend_filter["Legend filters<br/>[index.html]"]
  node_node_search["Node search<br/>[index.html]"]
  node_auto_refresh["Data refresh<br/>[index.html]"]
end

node_browser_user(("Viewer user"))

node_sync_schedule -->|"runs"| node_sync_script
node_sync_script -->|"reads IDs"| node_db_config
node_sync_script -->|"queries"| node_notion_api
node_notion_db -.->|"serves data"| node_notion_api
node_sync_script -->|"writes"| node_graph_file
node_browser_user -.->|"opens"| node_graph_view
node_graph_file -->|"loads"| node_graph_view
node_graph_view -->|"renders"| node_graph_types
node_graph_view -->|"renders"| node_graph_links
node_browser_user -->|"drags and zooms"| node_graph_controls
node_browser_user -->|"toggles"| node_legend_filter
node_legend_filter -->|"filters"| node_graph_view
node_browser_user -->|"searches"| node_node_search
node_node_search -->|"highlights"| node_graph_view
node_browser_user -->|"requests refresh"| node_auto_refresh
node_auto_refresh -->|"reloads every 30s"| node_graph_file

click node_sync_schedule "https://github.com/hyojun82/notion-para-graph/blob/main/.github/workflows/sync-notion.yml"
click node_sync_script "https://github.com/hyojun82/notion-para-graph/blob/main/scripts/sync-notion.js"
click node_db_config "https://github.com/hyojun82/notion-para-graph/blob/main/config.json"
click node_graph_file "https://github.com/hyojun82/notion-para-graph/blob/main/data.json"
click node_graph_view "https://github.com/hyojun82/notion-para-graph/blob/main/index.html"
click node_graph_types "https://github.com/hyojun82/notion-para-graph/blob/main/index.html"
click node_graph_links "https://github.com/hyojun82/notion-para-graph/blob/main/index.html"
click node_graph_controls "https://github.com/hyojun82/notion-para-graph/blob/main/index.html"
click node_legend_filter "https://github.com/hyojun82/notion-para-graph/blob/main/index.html"
click node_node_search "https://github.com/hyojun82/notion-para-graph/blob/main/index.html"
click node_auto_refresh "https://github.com/hyojun82/notion-para-graph/blob/main/index.html"

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_notion_db,node_notion_api,node_sync_schedule,node_sync_script,node_db_config,node_browser_user toneBlue
class node_graph_file toneAmber
class node_graph_view,node_graph_types,node_graph_links,node_graph_controls,node_legend_filter,node_node_search,node_auto_refresh toneMint
```

## Components

### Notion sync

- **PARA databases**
- **Notion API**
- [Scheduled sync](https://github.com/hyojun82/notion-para-graph/blob/main/.github/workflows/sync-notion.yml): `.github/workflows/sync-notion.yml`
- [Data synchronizer](https://github.com/hyojun82/notion-para-graph/blob/main/scripts/sync-notion.js): `scripts/sync-notion.js`
- [Database IDs](https://github.com/hyojun82/notion-para-graph/blob/main/config.json): `config.json`

### Graph data

- [Graph data](https://github.com/hyojun82/notion-para-graph/blob/main/data.json): `data.json`

### Browser viewer

- [Interactive graph](https://github.com/hyojun82/notion-para-graph/blob/main/index.html): `index.html`
- [PARA node types](https://github.com/hyojun82/notion-para-graph/blob/main/index.html): `index.html`
- [Relationship links](https://github.com/hyojun82/notion-para-graph/blob/main/index.html): `index.html`
- [Graph controls](https://github.com/hyojun82/notion-para-graph/blob/main/index.html): `index.html`
- [Legend filters](https://github.com/hyojun82/notion-para-graph/blob/main/index.html): `index.html`
- [Node search](https://github.com/hyojun82/notion-para-graph/blob/main/index.html): `index.html`
- [Data refresh](https://github.com/hyojun82/notion-para-graph/blob/main/index.html): `index.html`

### Other components

- **Viewer user**

## Connections

- Scheduled sync → Data synchronizer: runs (evidence: `README.md`)
- Data synchronizer → Database IDs: reads IDs (evidence: `scripts/sync-notion.js`)
- Data synchronizer → Notion API: queries (evidence: `scripts/sync-notion.js`)
- PARA databases → Notion API: serves data (evidence: `README.md`)
- Data synchronizer → Graph data: writes (evidence: `scripts/sync-notion.js`)
- Viewer user → Interactive graph: opens (evidence: `README.md`)
- Graph data → Interactive graph: loads (evidence: `README.md`)
- Interactive graph → PARA node types: renders (evidence: `README.md`)
- Interactive graph → Relationship links: renders (evidence: `README.md`)
- Viewer user → Graph controls: drags and zooms (evidence: `README.md`)
- Viewer user → Legend filters: toggles (evidence: `README.md`)
- Legend filters → Interactive graph: filters (evidence: `README.md`)
- Viewer user → Node search: searches (evidence: `README.md`)
- Node search → Interactive graph: highlights (evidence: `README.md`)
- Viewer user → Data refresh: requests refresh (evidence: `README.md`)
- Data refresh → Graph data: reloads every 30s (evidence: `README.md`)
