# v4nnuth/deploy_mstsne architecture

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

- Interactive diagram: https://gitdiagram.com/v4nnuth/deploy_mstsne
- Repository: https://github.com/v4nnuth/deploy_mstsne

## Overview

Ms t-SNE Explorer is a browser-based benchmark runner for comparing L-BFGS-B, SGD, Momentum, and Adam across datasets. A researcher configures an experiment, the Vue client creates a session and streams a run request to FastAPI, which loads and embeds the data, evaluates optimizers, and produces results and figures for the UI. The README documents the broader workflow, code/formula inspection, Adam learning-rate search, and GPU/CPU support. Several frontend and backend connections are explicit in excerpts or the README; unsampled details are not expanded into speculative calls.

Main entry points: [`backend/api/main.py`](https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/api/main.py) (FastAPI run service), [`frontend/src/App.vue`](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/App.vue) (Application shell), [`frontend/src/composables/useExperiment.js`](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/composables/useExperiment.js) (Session client), [`backend/engine/mstsne.py`](https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/engine/mstsne.py) (Optimizer execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Experiment interface"]
  node_app["Application shell<br/>[App.vue]"]
  node_configure["Run configuration<br/>[ConfigurePage.vue]"]
  node_workflow["Workflow canvas<br/>[WorkflowCanvas.vue]"]
  node_nodepanel["Stage inspector<br/>[NodePanel.vue]"]
  node_codeeditor["Code and formulas"]
  node_experiment["Session client<br/>[useExperiment.js]"]
end

subgraph group_backend["Run orchestration"]
  node_api["FastAPI run service<br/>[main.py]"]
  node_datasets["Dataset loaders<br/>[dataset_loaders.py]"]
  node_datasetfiles[("Benchmark datasets")]
end

subgraph group_analysis["Embedding analysis"]
  node_distances["Distance and similarity<br/>[mstsne.py]"]
  node_optimizers["Optimizer execution<br/>[mstsne.py]"]
  node_evaluation["R_NX and AUC<br/>[mstsne.py]"]
end

subgraph group_outputs["Review outputs"]
  node_figuregen["Figure generation<br/>[main.py]"]
  node_results["Results view<br/>[ResultsPage.vue]"]
  node_figures["Figures view<br/>[FiguresPage.vue]"]
end

node_researcher(("Researcher"))
node_compute["CuPy or NumPy"]

node_researcher -->|"sets run options"| node_configure
node_configure -->|"submits configuration"| node_app
node_app -->|"starts session and run"| node_experiment
node_app -->|"shows run progress"| node_workflow
node_app -->|"opens stage details"| node_nodepanel
node_app -->|"opens code editor"| node_codeeditor
node_experiment -->|"sends WebSocket run"| node_api
node_api -->|"loads dataset"| node_datasets
node_datasets -->|"reads benchmark data"| node_datasetfiles
node_api -->|"computes distances"| node_distances
node_api -->|"runs optimizers"| node_optimizers
node_optimizers -->|"evaluates embeddings"| node_evaluation
node_api -->|"generates plots"| node_figuregen
node_api -->|"streams run updates"| node_experiment
node_experiment -->|"provides scores"| node_results
node_experiment -->|"provides figures"| node_figures
node_distances -.->|"uses GPU or CPU"| node_compute
node_optimizers -.->|"uses GPU or CPU"| node_compute

click node_app "https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/App.vue"
click node_configure "https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/pages/ConfigurePage.vue"
click node_workflow "https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/components/WorkflowCanvas.vue"
click node_nodepanel "https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/components/NodePanel.vue"
click node_codeeditor "https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/components/CodeEditorSidebar.vue"
click node_experiment "https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/composables/useExperiment.js"
click node_api "https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/api/main.py"
click node_datasets "https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/dataset_loaders.py"
click node_datasetfiles "https://github.com/v4nnuth/deploy_mstsne/tree/main/dataset"
click node_distances "https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/engine/mstsne.py"
click node_optimizers "https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/engine/mstsne.py"
click node_evaluation "https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/engine/mstsne.py"
click node_figuregen "https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/api/main.py"
click node_results "https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/pages/ResultsPage.vue"
click node_figures "https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/pages/FiguresPage.vue"

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_app,node_configure,node_workflow,node_nodepanel,node_codeeditor,node_experiment toneBlue
class node_api,node_datasets,node_datasetfiles toneAmber
class node_distances,node_optimizers,node_evaluation toneMint
class node_figuregen,node_results,node_figures toneRose
class node_researcher,node_compute toneIndigo
```

## Components

### Experiment interface

- [Application shell](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Run configuration](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/pages/ConfigurePage.vue): `frontend/src/pages/ConfigurePage.vue`
- [Workflow canvas](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/components/WorkflowCanvas.vue): `frontend/src/components/WorkflowCanvas.vue`
- [Stage inspector](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/components/NodePanel.vue): `frontend/src/components/NodePanel.vue`
- [Code and formulas](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/components/CodeEditorSidebar.vue): `frontend/src/components/CodeEditorSidebar.vue`
- [Session client](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/composables/useExperiment.js): `frontend/src/composables/useExperiment.js`

### Run orchestration

- [FastAPI run service](https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/api/main.py): `backend/api/main.py`
- [Dataset loaders](https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/dataset_loaders.py): `backend/dataset_loaders.py`
- [Benchmark datasets](https://github.com/v4nnuth/deploy_mstsne/tree/main/dataset): `dataset`

### Embedding analysis

- [Distance and similarity](https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/engine/mstsne.py): `backend/engine/mstsne.py`
- [Optimizer execution](https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/engine/mstsne.py): `backend/engine/mstsne.py`
- [R_NX and AUC](https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/engine/mstsne.py): `backend/engine/mstsne.py`

### Review outputs

- [Figure generation](https://github.com/v4nnuth/deploy_mstsne/blob/main/backend/api/main.py): `backend/api/main.py`
- [Results view](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/pages/ResultsPage.vue): `frontend/src/pages/ResultsPage.vue`
- [Figures view](https://github.com/v4nnuth/deploy_mstsne/blob/main/frontend/src/pages/FiguresPage.vue): `frontend/src/pages/FiguresPage.vue`

### Other components

- **Researcher**
- **CuPy or NumPy**

## Connections

- Researcher → Run configuration: sets run options (evidence: `README.md`)
- Run configuration → Application shell: submits configuration (evidence: `README.md`)
- Application shell → Session client: starts session and run (evidence: `frontend/src/App.vue`)
- Application shell → Workflow canvas: shows run progress (evidence: `frontend/src/App.vue`)
- Application shell → Stage inspector: opens stage details (evidence: `frontend/src/App.vue`)
- Application shell → Code and formulas: opens code editor (evidence: `frontend/src/App.vue`)
- Session client → FastAPI run service: sends WebSocket run (evidence: `frontend/src/composables/useExperiment.js`)
- FastAPI run service → Dataset loaders: loads dataset (evidence: `backend/api/main.py`)
- Dataset loaders → Benchmark datasets: reads benchmark data (evidence: `backend/dataset_loaders.py`)
- FastAPI run service → Distance and similarity: computes distances (evidence: `backend/api/main.py`)
- FastAPI run service → Optimizer execution: runs optimizers (evidence: `backend/api/main.py`)
- Optimizer execution → R_NX and AUC: evaluates embeddings (evidence: `README.md`)
- FastAPI run service → Figure generation: generates plots (evidence: `backend/api/main.py`)
- FastAPI run service → Session client: streams run updates (evidence: `README.md`)
- Session client → Results view: provides scores (evidence: `frontend/src/App.vue`)
- Session client → Figures view: provides figures (evidence: `frontend/src/App.vue`)
- Distance and similarity → CuPy or NumPy: uses GPU or CPU (evidence: `README.md`)
- Optimizer execution → CuPy or NumPy: uses GPU or CPU (evidence: `README.md`)
