# bitanm/graphml-studio architecture

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

- Interactive diagram: https://gitdiagram.com/bitanm/graphml-studio
- Repository: https://github.com/bitanm/graphml-studio

## Overview

GraphML Studio takes a user-uploaded CSV edge list through a browser UI and Node/Express API, which constructs and analyzes a graph; optional GNN requests are proxied to a separate Flask service for training, embeddings, and inference. The README documents the browser capabilities and service boundary; source excerpts show CSV handling, fallback predictions, and GNN routes, while the Python service excerpts show GraphSAGE data preparation and inference. Some wiring and frontend implementation details are unsampled, so those relationships rely on README statements rather than source-level call tracing.

Main entry points: [`graphml-studio/gnn_services/app.py`](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py) (Flask GNN API), [`graphml-studio/server.js`](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/server.js) (Express API), [`graphml-studio/public/index.html`](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/public/index.html) (Browser UI), [`graphml-studio/gnn_services/model.py`](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/model.py) (GraphSAGE Models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Browser and Graph Analysis"]
  node_browser["Browser UI<br/>[index.html]"]
  node_api["Express API<br/>[server.js]"]
  node_csvgraph["CSV Graph Builder<br/>[server.js]"]
  node_analysis["Graph Analytics<br/>[server.js]"]
  node_fallback["Fallback Predictions<br/>[server.js]"]
  node_visualization["Graph Visualization<br/>[index.html]"]
end

subgraph group_ml["GNN Service"]
  node_gnnapi["Flask GNN API<br/>[app.py]"]
  node_cache[("Model Cache<br/>[app.py]")]
  node_nodeinfer["Node Inference<br/>[app.py]"]
  node_linkinfer["Link Inference<br/>[app.py]"]
  node_embeddings["Embedding Generation<br/>[app.py]"]
end

subgraph group_models["Model Runtime"]
  node_features["Graph Feature Builder<br/>[model.py]"]
  node_trainer["GNN Trainer<br/>[train.py]"]
  node_sage["GraphSAGE Models<br/>[model.py]"]
  node_evaluation["Cora Evaluation<br/>[evaluate_cora.py]"]
end

node_researcher(("Researcher"))

node_researcher -->|"uploads graph"| node_browser
node_browser -->|"sends requests"| node_api
node_api -->|"parses CSV"| node_csvgraph
node_csvgraph -->|"enables analysis"| node_analysis
node_analysis -->|"renders network"| node_visualization
node_api -->|"handles predictions"| node_fallback
node_browser -->|"requests GNN work"| node_api
node_api -->|"proxies requests"| node_gnnapi
node_gnnapi -->|"builds graph data"| node_features
node_gnnapi -->|"runs training"| node_trainer
node_trainer -->|"uses models"| node_sage
node_gnnapi -->|"loads models"| node_sage
node_gnnapi -->|"caches models"| node_cache
node_gnnapi -->|"serves predictions"| node_nodeinfer
node_gnnapi -->|"serves predictions"| node_linkinfer
node_gnnapi -->|"generates embeddings"| node_embeddings
node_evaluation -->|"evaluates models"| node_sage

click node_browser "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/public/index.html"
click node_api "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/server.js"
click node_csvgraph "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/server.js"
click node_analysis "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/server.js"
click node_fallback "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/server.js"
click node_gnnapi "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py"
click node_features "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/model.py"
click node_trainer "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/train.py"
click node_sage "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/model.py"
click node_cache "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py"
click node_nodeinfer "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py"
click node_linkinfer "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py"
click node_embeddings "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py"
click node_evaluation "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/evaluate_cora.py"
click node_visualization "https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/public/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_browser,node_api,node_csvgraph,node_analysis,node_fallback,node_visualization toneBlue
class node_gnnapi,node_cache,node_nodeinfer,node_linkinfer,node_embeddings toneAmber
class node_features,node_trainer,node_sage,node_evaluation toneMint
class node_researcher toneIndigo
```

## Components

### Browser and Graph Analysis

- [Browser UI](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/public/index.html): `graphml-studio/public/index.html`
- [Express API](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/server.js): `graphml-studio/server.js`
- [CSV Graph Builder](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/server.js): `graphml-studio/server.js`
- [Graph Analytics](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/server.js): `graphml-studio/server.js`
- [Fallback Predictions](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/server.js): `graphml-studio/server.js`
- [Graph Visualization](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/public/index.html): `graphml-studio/public/index.html`

### GNN Service

- [Flask GNN API](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py): `graphml-studio/gnn_services/app.py`
- [Model Cache](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py): `graphml-studio/gnn_services/app.py`
- [Node Inference](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py): `graphml-studio/gnn_services/app.py`
- [Link Inference](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py): `graphml-studio/gnn_services/app.py`
- [Embedding Generation](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/app.py): `graphml-studio/gnn_services/app.py`

### Model Runtime

- [Graph Feature Builder](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/model.py): `graphml-studio/gnn_services/model.py`
- [GNN Trainer](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/train.py): `graphml-studio/gnn_services/train.py`
- [GraphSAGE Models](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/model.py): `graphml-studio/gnn_services/model.py`
- [Cora Evaluation](https://github.com/bitanm/graphml-studio/blob/main/graphml-studio/gnn_services/evaluate_cora.py): `graphml-studio/gnn_services/evaluate_cora.py`

### Other components

- **Researcher**

## Connections

- Researcher → Browser UI: uploads graph (evidence: `README.md`)
- Browser UI → Express API: sends requests (evidence: `README.md`)
- Express API → CSV Graph Builder: parses CSV (evidence: `graphml-studio/server.js`)
- CSV Graph Builder → Graph Analytics: enables analysis (evidence: `README.md`)
- Graph Analytics → Graph Visualization: renders network (evidence: `README.md`)
- Express API → Fallback Predictions: handles predictions (evidence: `graphml-studio/server.js`)
- Browser UI → Express API: requests GNN work (evidence: `README.md`)
- Express API → Flask GNN API: proxies requests (evidence: `README.md`)
- Flask GNN API → Graph Feature Builder: builds graph data (evidence: `graphml-studio/gnn_services/app.py`)
- Flask GNN API → GNN Trainer: runs training (evidence: `graphml-studio/gnn_services/app.py`)
- GNN Trainer → GraphSAGE Models: uses models (evidence: `graphml-studio/gnn_services/train.py`)
- Flask GNN API → GraphSAGE Models: loads models (evidence: `graphml-studio/gnn_services/app.py`)
- Flask GNN API → Model Cache: caches models (evidence: `README.md`)
- Flask GNN API → Node Inference: serves predictions (evidence: `graphml-studio/gnn_services/app.py`)
- Flask GNN API → Link Inference: serves predictions (evidence: `README.md`)
- Flask GNN API → Embedding Generation: generates embeddings (evidence: `README.md`)
- Cora Evaluation → GraphSAGE Models: evaluates models (evidence: `graphml-studio/gnn_services/evaluate_cora.py`)
