# johann890/student-data-analyser architecture

> Architecture diagram of the GitHub repository johann890/student-data-analyser, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-07). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/johann890/student-data-analyser
- Repository: https://github.com/johann890/student-data-analyser

## Overview

Student-Data-Analyser is a browser-based visual query builder for student data. Its principal workflow is to load source files, configure a connected graph of query operations, run the graph, and inspect or export results. The current milestone also includes query save/load, reusable query examples, a guide, and named variables. The excerpts show only a few direct cross-module calls; other workflow links are dashed to distinguish architectural intent from verified calls. Earlier milestones are represented separately as retained implementations.

Main entry points: [`MLP/js/engine/core.js`](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/engine/core.js) (Query evaluation), [`MLP/js/canvas/render.js`](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/canvas/render.js) (Canvas rendering), [`MLP/js/nodes/controls.js`](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/nodes/controls.js) (Node controls), [`MLP/js/data/loading.js`](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/data/loading.js) (File loading)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_data["Data ingestion"]
  node_loading["File loading<br/>[loading.js]"]
  node_sources["Source datasets<br/>[sources.js]"]
  node_registries["Data registries<br/>[registries.js]"]
  node_table["Table model<br/>[table.js]"]
end

subgraph group_query["Query processing"]
  node_engine["Query evaluation<br/>[core.js]"]
  node_aggregate["Aggregation<br/>[aggregate.js]"]
  node_selectfor["Select For<br/>[selectfor.js]"]
  node_operators["Query operators"]
  node_output["Output shaping<br/>[output.js]"]
end

subgraph group_editor["Graph editor"]
  node_nodecontrols["Node controls<br/>[controls.js]"]
  node_nodemodel["Node model<br/>[model.js]"]
  node_nodemarkup["Node markup<br/>[markup.js]"]
  node_canvas["Canvas rendering<br/>[render.js]"]
  node_gestures["Canvas gestures<br/>[gestures.js]"]
  node_vars["Named variables<br/>[model.js]"]
  node_guide["User guide<br/>[guide.js]"]
  node_boot["Application startup<br/>[boot.js]"]
end

subgraph group_results["Results and reuse"]
  node_panel["Results panel<br/>[panel.js]"]
  node_export["Result export<br/>[export.js]"]
  node_saveload["Query save/load<br/>[saveload.js]"]
  node_library["Query library<br/>[library-store.js]"]
end

subgraph group_legacy["Earlier milestones"]
  node_mmpdata["MMP data<br/>[data.js]"]
  node_mmpengine["MMP engine<br/>[engine.js]"]
  node_mmpui["MMP interface<br/>[ui.js]"]
  node_mvp["MVP application<br/>[app.js]"]
end

node_user(("Analyst"))
node_file["Data files"]

node_user -.->|"provides data"| node_file
node_file -.->|"loads files"| node_loading
node_loading -.->|"populates sources"| node_sources
node_sources -.->|"builds tables"| node_table
node_user -.->|"builds query"| node_canvas
node_canvas -.->|"runs graph"| node_engine
node_engine -->|"reads table helpers"| node_table
node_engine -.->|"dispatches operations"| node_aggregate
node_engine -.->|"dispatches operations"| node_selectfor
node_engine -.->|"dispatches operations"| node_operators
node_engine -.->|"shapes output"| node_output
node_user -.->|"configures nodes"| node_nodecontrols
node_nodecontrols -.->|"updates model"| node_nodemodel
node_nodemarkup -.->|"renders controls"| node_nodecontrols
node_canvas -.->|"renders nodes"| node_nodemarkup
node_gestures -.->|"changes graph"| node_canvas
node_canvas -.->|"shows guidance"| node_guide
node_nodemodel -.->|"binds variables"| node_vars
node_boot -.->|"starts rendering"| node_canvas
node_engine -.->|"presents results"| node_panel
node_panel -.->|"exports results"| node_export
node_user -.->|"saves or loads"| node_saveload
node_user -.->|"chooses examples"| node_library
node_canvas -->|"hides node tips"| node_user

click node_loading "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/data/loading.js"
click node_sources "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/data/sources.js"
click node_registries "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/data/registries.js"
click node_table "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/data/table.js"
click node_engine "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/engine/core.js"
click node_aggregate "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/engine/aggregate.js"
click node_selectfor "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/engine/selectfor.js"
click node_operators "https://github.com/johann890/student-data-analyser/tree/main/MLP/js/engine"
click node_output "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/engine/output.js"
click node_nodecontrols "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/nodes/controls.js"
click node_nodemodel "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/nodes/model.js"
click node_nodemarkup "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/nodes/markup.js"
click node_canvas "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/canvas/render.js"
click node_gestures "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/canvas/gestures.js"
click node_vars "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/vars/model.js"
click node_guide "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/guide/guide.js"
click node_boot "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/shell/boot.js"
click node_panel "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/results/panel.js"
click node_export "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/results/export.js"
click node_saveload "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/queries/saveload.js"
click node_library "https://github.com/johann890/student-data-analyser/blob/main/MLP/js/queries/library-store.js"
click node_mmpdata "https://github.com/johann890/student-data-analyser/blob/main/MMP/data.js"
click node_mmpengine "https://github.com/johann890/student-data-analyser/blob/main/MMP/engine.js"
click node_mmpui "https://github.com/johann890/student-data-analyser/blob/main/MMP/ui.js"
click node_mvp "https://github.com/johann890/student-data-analyser/blob/main/MVP/app.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_loading,node_sources,node_registries,node_table toneBlue
class node_engine,node_aggregate,node_selectfor,node_operators,node_output toneAmber
class node_nodecontrols,node_nodemodel,node_nodemarkup,node_canvas,node_gestures,node_vars,node_guide,node_boot toneMint
class node_panel,node_export,node_saveload,node_library toneRose
class node_mmpdata,node_mmpengine,node_mmpui,node_mvp,node_user,node_file toneIndigo
```

## Components

### Data ingestion

- [File loading](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/data/loading.js): `MLP/js/data/loading.js`
- [Source datasets](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/data/sources.js): `MLP/js/data/sources.js`
- [Data registries](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/data/registries.js): `MLP/js/data/registries.js`
- [Table model](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/data/table.js): `MLP/js/data/table.js`

### Query processing

- [Query evaluation](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/engine/core.js): `MLP/js/engine/core.js`
- [Aggregation](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/engine/aggregate.js): `MLP/js/engine/aggregate.js`
- [Select For](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/engine/selectfor.js): `MLP/js/engine/selectfor.js`
- [Query operators](https://github.com/johann890/student-data-analyser/tree/main/MLP/js/engine): `MLP/js/engine`
- [Output shaping](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/engine/output.js): `MLP/js/engine/output.js`

### Graph editor

- [Node controls](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/nodes/controls.js): `MLP/js/nodes/controls.js`
- [Node model](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/nodes/model.js): `MLP/js/nodes/model.js`
- [Node markup](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/nodes/markup.js): `MLP/js/nodes/markup.js`
- [Canvas rendering](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/canvas/render.js): `MLP/js/canvas/render.js`
- [Canvas gestures](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/canvas/gestures.js): `MLP/js/canvas/gestures.js`
- [Named variables](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/vars/model.js): `MLP/js/vars/model.js`
- [User guide](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/guide/guide.js): `MLP/js/guide/guide.js`
- [Application startup](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/shell/boot.js): `MLP/js/shell/boot.js`

### Results and reuse

- [Results panel](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/results/panel.js): `MLP/js/results/panel.js`
- [Result export](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/results/export.js): `MLP/js/results/export.js`
- [Query save/load](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/queries/saveload.js): `MLP/js/queries/saveload.js`
- [Query library](https://github.com/johann890/student-data-analyser/blob/main/MLP/js/queries/library-store.js): `MLP/js/queries/library-store.js`

### Earlier milestones

- [MMP data](https://github.com/johann890/student-data-analyser/blob/main/MMP/data.js): `MMP/data.js`
- [MMP engine](https://github.com/johann890/student-data-analyser/blob/main/MMP/engine.js): `MMP/engine.js`
- [MMP interface](https://github.com/johann890/student-data-analyser/blob/main/MMP/ui.js): `MMP/ui.js`
- [MVP application](https://github.com/johann890/student-data-analyser/blob/main/MVP/app.js): `MVP/app.js`

### Other components

- **Analyst**
- **Data files**

## Connections

- Analyst → Data files: provides data
- Data files → File loading: loads files
- File loading → Source datasets: populates sources
- Source datasets → Table model: builds tables
- Analyst → Canvas rendering: builds query
- Canvas rendering → Query evaluation: runs graph
- Query evaluation → Table model: reads table helpers (evidence: `MLP/js/engine/core.js`)
- Query evaluation → Aggregation: dispatches operations
- Query evaluation → Select For: dispatches operations
- Query evaluation → Query operators: dispatches operations
- Query evaluation → Output shaping: shapes output
- Analyst → Node controls: configures nodes
- Node controls → Node model: updates model
- Node markup → Node controls: renders controls
- Canvas rendering → Node markup: renders nodes
- Canvas gestures → Canvas rendering: changes graph
- Canvas rendering → User guide: shows guidance
- Node model → Named variables: binds variables
- Application startup → Canvas rendering: starts rendering
- Query evaluation → Results panel: presents results
- Results panel → Result export: exports results
- Analyst → Query save/load: saves or loads
- Analyst → Query library: chooses examples
- Canvas rendering → Analyst: hides node tips (evidence: `MLP/js/canvas/render.js`)
