# m-creed/motionlab-pro architecture

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

- Interactive diagram: https://gitdiagram.com/m-creed/motionlab-pro
- Repository: https://github.com/m-creed/motionlab-pro

## Overview

MotionLab-Pro is a browser-based motion analysis tool. Users enter or import motion measurements, select manual or automatically calculated parameters, and inspect tables, statistics, results, and charts; they can also view formulas, generate C code, and export a report. The sampled source is a single-file application, so its capabilities are represented as responsibilities within main.js rather than separate modules. The repository excerpts do not show all calls among these responsibilities, so the graph includes only relationships directly evidenced in the excerpts.

Main entry points: [`main.js`](https://github.com/m-creed/motionlab-pro/blob/main/main.js) (Measurement rows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Measurement input"]
  node_entry["Data entry and paste<br/>[main.js]"]
  node_csv["CSV import<br/>[main.js]"]
end

subgraph group_analysis["Motion analysis"]
  node_measurements[("Measurement rows<br/>[main.js]")]
  node_parameters["Parameter selection<br/>[main.js]"]
  node_calculations["Derived calculations<br/>[main.js]"]
  node_stats["Statistics<br/>[main.js]"]
end

subgraph group_outputs["Results and export"]
  node_results["Results view<br/>[main.js]"]
  node_charts["Charts<br/>[main.js]"]
  node_formulas["Formula view<br/>[main.js]"]
  node_ccode["C code generation<br/>[main.js]"]
  node_report["Report export<br/>[main.js]"]
end

subgraph group_interface["User interface"]
  node_table["Data table<br/>[main.js]"]
  node_tabs["Tab navigation<br/>[main.js]"]
  node_theme["Dark mode<br/>[main.js]"]
end

node_user(("User"))

node_user -->|"enters data"| node_entry
node_user -->|"imports file"| node_csv
node_entry -->|"updates rows"| node_measurements
node_csv -->|"loads rows"| node_measurements
node_user -->|"selects parameters"| node_parameters
node_parameters -->|"enables automatic"| node_calculations
node_measurements -->|"renders rows"| node_table
node_measurements -->|"updates statistics"| node_stats
node_measurements -->|"renders results"| node_results
node_measurements -->|"plots data"| node_charts
node_measurements -->|"generates code"| node_ccode
node_user -->|"switches views"| node_tabs
node_tabs -->|"renders on selection"| node_results
node_tabs -->|"renders on selection"| node_charts
node_tabs -->|"renders on selection"| node_formulas
node_tabs -->|"generates on selection"| node_ccode
node_user -->|"toggles theme"| node_theme
node_user -->|"exports report"| node_report

click node_entry "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_csv "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_measurements "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_parameters "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_calculations "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_table "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_stats "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_results "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_charts "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_formulas "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_ccode "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_report "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_tabs "https://github.com/m-creed/motionlab-pro/blob/main/main.js"
click node_theme "https://github.com/m-creed/motionlab-pro/blob/main/main.js"

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_entry,node_csv,node_user toneBlue
class node_measurements,node_parameters,node_calculations,node_stats toneAmber
class node_results,node_charts,node_formulas,node_ccode,node_report toneMint
class node_table,node_tabs,node_theme toneRose
```

## Components

### Measurement input

- [Data entry and paste](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [CSV import](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`

### Motion analysis

- [Measurement rows](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [Parameter selection](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [Derived calculations](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [Statistics](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`

### Results and export

- [Results view](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [Charts](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [Formula view](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [C code generation](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [Report export](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`

### User interface

- [Data table](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [Tab navigation](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`
- [Dark mode](https://github.com/m-creed/motionlab-pro/blob/main/main.js): `main.js`

### Other components

- **User**

## Connections

- User → Data entry and paste: enters data (evidence: `main.js`)
- User → CSV import: imports file (evidence: `main.js`)
- Data entry and paste → Measurement rows: updates rows (evidence: `main.js`)
- CSV import → Measurement rows: loads rows (evidence: `main.js`)
- User → Parameter selection: selects parameters (evidence: `main.js`)
- Parameter selection → Derived calculations: enables automatic (evidence: `main.js`)
- Measurement rows → Data table: renders rows (evidence: `main.js`)
- Measurement rows → Statistics: updates statistics (evidence: `main.js`)
- Measurement rows → Results view: renders results (evidence: `main.js`)
- Measurement rows → Charts: plots data (evidence: `main.js`)
- Measurement rows → C code generation: generates code (evidence: `main.js`)
- User → Tab navigation: switches views (evidence: `main.js`)
- Tab navigation → Results view: renders on selection (evidence: `main.js`)
- Tab navigation → Charts: renders on selection (evidence: `main.js`)
- Tab navigation → Formula view: renders on selection (evidence: `main.js`)
- Tab navigation → C code generation: generates on selection (evidence: `main.js`)
- User → Dark mode: toggles theme (evidence: `main.js`)
- User → Report export: exports report (evidence: `main.js`)
