# edgar-mendonca/datum-plot architecture

> Architecture diagram of the GitHub repository edgar-mendonca/datum-plot, 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/edgar-mendonca/datum-plot
- Repository: https://github.com/edgar-mendonca/datum-plot

## Overview

Datum Plot is a desktop scientific data-analysis application. Users create or import experiment tables, run analyses, inspect linked results, build and format graphs, arrange page layouts, and export or share outputs. The README documents a linked project flow; sampled code confirms UI-to-shell commands and Python-worker dispatch for analysis and graph rendering. Some runtime wiring and several feature modules were not sampled, so uncertain connections are omitted or marked unverified.

Main entry points: [`py/datum/analysis.py`](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/analysis.py) (Analysis dispatch), [`py/worker.py`](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/worker.py) (Python worker), [`ui/src/api.ts`](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/api.ts) (Command API), [`py/datum/graph.py`](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/graph.py) (Graph rendering)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop experience"]
  node_app["Application UI<br/>[main.tsx]"]
  node_api["Command API<br/>[api.ts]"]
  node_shell["Tauri shell<br/>[main.rs]"]
  node_worker["Python worker<br/>[worker.py]"]
  node_console["Python console<br/>[console.py]"]
end

subgraph group_data["Project data"]
  node_project["Project model<br/>[model.rs]"]
  node_project_files["Project documents<br/>[doc.rs]"]
  node_imports["Data import<br/>[imports.py]"]
  node_digitizer["Graph digitizer<br/>[digitize.rs]"]
  node_sheets["Worksheets<br/>[sheet.py]"]
end

subgraph group_science["Scientific analysis"]
  node_analysis_ui["Analysis interface<br/>[results.tsx]"]
  node_analysis["Analysis dispatch<br/>[analysis.py]"]
  node_statistics["Statistics<br/>[stats.py]"]
  node_group_tests["Group comparisons<br/>[groups.py]"]
  node_regression["Regression fits<br/>[regress.py]"]
  node_survival["Survival analysis<br/>[survival.py]"]
  node_scientific_tools["Specialized analyses"]
end

subgraph group_visuals["Graphs and output"]
  node_graph_ui["Graph view<br/>[graph.tsx]"]
  node_format_ui["Graph formatting<br/>[format.tsx]"]
  node_graph_engine["Graph rendering<br/>[graph.py]"]
  node_layouts["Page layouts<br/>[layout.tsx]"]
  node_exports["Export and reports<br/>[report.py]"]
end

node_scientist(("User"))

node_scientist -->|"uses"| node_app
node_app -->|"invokes"| node_api
node_api -->|"sends commands"| node_shell
node_shell -.->|"starts worker"| node_worker
node_worker -->|"dispatches analysis"| node_analysis
node_worker -->|"dispatches rendering"| node_graph_engine
node_worker -->|"dispatches import"| node_imports
node_worker -->|"dispatches console"| node_console
node_worker -->|"dispatches reports"| node_exports
node_analysis_ui -.->|"requests analysis"| node_api
node_graph_ui -->|"requests render"| node_api
node_analysis -->|"uses summaries"| node_statistics
node_analysis -->|"dispatches tests"| node_group_tests
node_analysis -->|"dispatches fits"| node_regression
node_analysis -->|"dispatches survival"| node_survival
node_analysis -->|"dispatches methods"| node_scientific_tools
node_graph_engine -->|"summarizes data"| node_statistics
node_format_ui -->|"updates graph style"| node_api
node_graph_ui -->|"opens formatting"| node_format_ui
node_project_files -->|"serializes model"| node_project
node_digitizer -.->|"creates table data"| node_project
node_imports -.->|"reads into tables"| node_project
node_sheets -->|"uses summaries"| node_statistics
node_scientist -->|"chooses analysis"| node_analysis_ui
node_analysis -.->|"supplies fitted curves"| node_graph_engine
node_scientist -->|"arranges figures"| node_layouts
node_scientist -->|"exports results"| node_exports

click node_app "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/main.tsx"
click node_api "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/api.ts"
click node_shell "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/src-tauri/src/main.rs"
click node_worker "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/worker.py"
click node_project "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/crates/core/src/model.rs"
click node_project_files "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/crates/core/src/doc.rs"
click node_imports "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/imports.py"
click node_digitizer "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/crates/core/src/digitize.rs"
click node_sheets "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/sheet.py"
click node_analysis_ui "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/results.tsx"
click node_analysis "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/analysis.py"
click node_statistics "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/stats.py"
click node_group_tests "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/groups.py"
click node_regression "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/regress.py"
click node_survival "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/survival.py"
click node_scientific_tools "https://github.com/edgar-mendonca/datum-plot/tree/claude/epic-mayer-6faugf/py/datum"
click node_graph_ui "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/graph.tsx"
click node_format_ui "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/format.tsx"
click node_graph_engine "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/graph.py"
click node_layouts "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/layout.tsx"
click node_exports "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/report.py"
click node_console "https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/console.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_app,node_api,node_shell,node_worker,node_console,node_scientist toneBlue
class node_project,node_project_files,node_imports,node_digitizer,node_sheets toneAmber
class node_analysis_ui,node_analysis,node_statistics,node_group_tests,node_regression,node_survival,node_scientific_tools toneMint
class node_graph_ui,node_format_ui,node_graph_engine,node_layouts,node_exports toneRose
```

## Components

### Desktop experience

- [Application UI](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/main.tsx): `ui/src/main.tsx`
- [Command API](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/api.ts): `ui/src/api.ts`
- [Tauri shell](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/src-tauri/src/main.rs): `src-tauri/src/main.rs`
- [Python worker](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/worker.py): `py/worker.py`
- [Python console](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/console.py): `py/datum/console.py`

### Project data

- [Project model](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/crates/core/src/model.rs): `crates/core/src/model.rs`
- [Project documents](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/crates/core/src/doc.rs): `crates/core/src/doc.rs`
- [Data import](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/imports.py): `py/datum/imports.py`
- [Graph digitizer](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/crates/core/src/digitize.rs): `crates/core/src/digitize.rs`
- [Worksheets](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/sheet.py): `py/datum/sheet.py`

### Scientific analysis

- [Analysis interface](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/results.tsx): `ui/src/results.tsx`
- [Analysis dispatch](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/analysis.py): `py/datum/analysis.py`
- [Statistics](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/stats.py): `py/datum/stats.py`
- [Group comparisons](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/groups.py): `py/datum/groups.py`
- [Regression fits](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/regress.py): `py/datum/regress.py`
- [Survival analysis](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/survival.py): `py/datum/survival.py`
- [Specialized analyses](https://github.com/edgar-mendonca/datum-plot/tree/claude/epic-mayer-6faugf/py/datum): `py/datum`

### Graphs and output

- [Graph view](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/graph.tsx): `ui/src/graph.tsx`
- [Graph formatting](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/format.tsx): `ui/src/format.tsx`
- [Graph rendering](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/graph.py): `py/datum/graph.py`
- [Page layouts](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/ui/src/layout.tsx): `ui/src/layout.tsx`
- [Export and reports](https://github.com/edgar-mendonca/datum-plot/blob/claude/epic-mayer-6faugf/py/datum/report.py): `py/datum/report.py`

### Other components

- **User**

## Connections

- User → Application UI: uses (evidence: `README.md`)
- Application UI → Command API: invokes (evidence: `ui/src/main.tsx`)
- Command API → Tauri shell: sends commands (evidence: `ui/src/api.ts`)
- Tauri shell → Python worker: starts worker
- Python worker → Analysis dispatch: dispatches analysis (evidence: `py/worker.py`)
- Python worker → Graph rendering: dispatches rendering (evidence: `py/worker.py`)
- Python worker → Data import: dispatches import (evidence: `py/worker.py`)
- Python worker → Python console: dispatches console (evidence: `py/worker.py`)
- Python worker → Export and reports: dispatches reports (evidence: `py/worker.py`)
- Analysis interface → Command API: requests analysis (evidence: `ui/src/results.tsx`)
- Graph view → Command API: requests render (evidence: `ui/src/graph.tsx`)
- Analysis dispatch → Statistics: uses summaries (evidence: `py/datum/analysis.py`)
- Analysis dispatch → Group comparisons: dispatches tests (evidence: `py/datum/analysis.py`)
- Analysis dispatch → Regression fits: dispatches fits (evidence: `py/datum/analysis.py`)
- Analysis dispatch → Survival analysis: dispatches survival (evidence: `py/datum/analysis.py`)
- Analysis dispatch → Specialized analyses: dispatches methods (evidence: `py/datum/analysis.py`)
- Graph rendering → Statistics: summarizes data (evidence: `py/datum/graph.py`)
- Graph formatting → Command API: updates graph style (evidence: `ui/src/format.tsx`)
- Graph view → Graph formatting: opens formatting (evidence: `ui/src/graph.tsx`)
- Project documents → Project model: serializes model (evidence: `crates/core/src/doc.rs`)
- Graph digitizer → Project model: creates table data (evidence: `crates/core/src/digitize.rs`)
- Data import → Project model: reads into tables
- Worksheets → Statistics: uses summaries (evidence: `py/datum/sheet.py`)
- User → Analysis interface: chooses analysis (evidence: `README.md`)
- Analysis dispatch → Graph rendering: supplies fitted curves (evidence: `py/datum/graph.py`)
- User → Page layouts: arranges figures (evidence: `README.md`)
- User → Export and reports: exports results (evidence: `README.md`)
