# ksobon/mandrill architecture

> Architecture diagram of the GitHub repository ksobon/mandrill, 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/ksobon/mandrill
- Repository: https://github.com/ksobon/mandrill

## Overview

Mandrill is a Dynamo data-visualization plug-in: users prepare data and styles, create chart or annotation objects, assemble them into an HTML report, and display or print that report. The graph preserves chart families, CSV inputs, report/window handling, and PDF export. Several component implementations were not sampled, so their internal connections are omitted unless supported by an excerpt, the source index, or the README.

Main entry points: [`Mandrill_d3`](https://github.com/ksobon/mandrill/tree/master/Mandrill_d3) (Chart Models), [`Mandrill_d3/Charts.cs`](https://github.com/ksobon/mandrill/blob/master/Mandrill_d3/Charts.cs) (HTML Compiler), [`Mandrill_Grasshopper/Components/Report/Mandrill_LaunchWindow.cs`](https://github.com/ksobon/mandrill/blob/master/Mandrill_Grasshopper/Components/Report/Mandrill_LaunchWindow.cs) (Grasshopper Window), [`Mandrill_Grasshopper/Controls/MandrillWindow.xaml.cs`](https://github.com/ksobon/mandrill/blob/master/Mandrill_Grasshopper/Controls/MandrillWindow.xaml.cs) (Report Window)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_inputs["Dynamo Inputs"]
  node_csv["CSV Data Inputs"]
end

subgraph group_visuals["Visual Components"]
  node_chart_components["Chart Components"]
  node_scatter_node["Scatter Plot Node<br/>[ScatterPlots.cs]"]
  node_text_node["Text Note Node<br/>[Text.cs]"]
  node_legend_node["Legend Node<br/>[Legend.cs]"]
  node_shared_nodes["Chart Utilities Nodes<br/>[MiscNodes.cs]"]
end

subgraph group_rendering["HTML Rendering"]
  node_chart_models["Chart Models"]
  node_scatter_model["Scatter Plot Model<br/>[d3ScatterPlot.cs]"]
  node_text_model["Text Note Model<br/>[TextNotes.cs]"]
  node_html_compiler["HTML Compiler<br/>[Charts.cs]"]
  node_render_utils["Render Utilities<br/>[ChartsUtilities.cs]"]
end

subgraph group_delivery["Report Delivery"]
  node_report_node["Report Creator"]
  node_launch_node["Grasshopper Window"]
  node_gh_window["Report Window"]
  node_pdf_node["PDF Components"]
  node_pdf_export["PDF Export<br/>[Pdf.cs]"]
  node_dynamo_window["Dynamo Report Window"]
end

node_dynamo(("Dynamo User"))

node_dynamo -.->|"build charts"| node_chart_components
node_dynamo -.->|"provide data"| node_csv
node_scatter_node -->|"creates model"| node_scatter_model
node_text_node -->|"creates note"| node_text_model
node_chart_models -.->|"compile report"| node_html_compiler
node_html_compiler -->|"uses templates"| node_render_utils
node_report_node -.->|"provide report"| node_launch_node
node_launch_node -->|"launches window"| node_gh_window
node_gh_window -->|"converts HTML"| node_pdf_export
node_dynamo_window -->|"reads report"| node_chart_models

click node_csv "https://github.com/ksobon/mandrill/tree/master/Mandrill_Grasshopper/Components"
click node_chart_components "https://github.com/ksobon/mandrill/tree/master/Mandrill_Grasshopper/Components"
click node_scatter_node "https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Charts/ScatterPlots.cs"
click node_text_node "https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Html/Text.cs"
click node_legend_node "https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Legend/Legend.cs"
click node_shared_nodes "https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Charts/MiscNodes.cs"
click node_chart_models "https://github.com/ksobon/mandrill/tree/master/Mandrill_d3"
click node_scatter_model "https://github.com/ksobon/mandrill/blob/master/Mandrill_d3/ScatterPlots/d3ScatterPlot.cs"
click node_text_model "https://github.com/ksobon/mandrill/blob/master/Mandrill_d3/TextNotes/TextNotes.cs"
click node_html_compiler "https://github.com/ksobon/mandrill/blob/master/Mandrill_d3/Charts.cs"
click node_render_utils "https://github.com/ksobon/mandrill/blob/master/Mandrill_d3/ChartsUtilities.cs"
click node_report_node "https://github.com/ksobon/mandrill/blob/master/Mandrill_Grasshopper/Components/Report/Mandrill_CreateReport.cs"
click node_launch_node "https://github.com/ksobon/mandrill/blob/master/Mandrill_Grasshopper/Components/Report/Mandrill_LaunchWindow.cs"
click node_gh_window "https://github.com/ksobon/mandrill/blob/master/Mandrill_Grasshopper/Controls/MandrillWindow.xaml.cs"
click node_pdf_node "https://github.com/ksobon/mandrill/tree/master/Mandrill_Grasshopper/Components/PDF"
click node_pdf_export "https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Reports/Pdf.cs"
click node_dynamo_window "https://github.com/ksobon/mandrill/blob/master/Mandrill_UI/NodeModels/MandrillWindowNodeModel.cs"

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_csv,node_dynamo toneBlue
class node_chart_components,node_scatter_node,node_text_node,node_legend_node,node_shared_nodes toneAmber
class node_chart_models,node_scatter_model,node_text_model,node_html_compiler,node_render_utils toneMint
class node_report_node,node_launch_node,node_gh_window,node_pdf_node,node_pdf_export,node_dynamo_window toneRose
```

## Components

### Dynamo Inputs

- [CSV Data Inputs](https://github.com/ksobon/mandrill/tree/master/Mandrill_Grasshopper/Components): `Mandrill_Grasshopper/Components`

### Visual Components

- [Chart Components](https://github.com/ksobon/mandrill/tree/master/Mandrill_Grasshopper/Components): `Mandrill_Grasshopper/Components`
- [Scatter Plot Node](https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Charts/ScatterPlots.cs): `Mandrill/Nodes/Charts/ScatterPlots.cs`
- [Text Note Node](https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Html/Text.cs): `Mandrill/Nodes/Html/Text.cs`
- [Legend Node](https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Legend/Legend.cs): `Mandrill/Nodes/Legend/Legend.cs`
- [Chart Utilities Nodes](https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Charts/MiscNodes.cs): `Mandrill/Nodes/Charts/MiscNodes.cs`

### HTML Rendering

- [Chart Models](https://github.com/ksobon/mandrill/tree/master/Mandrill_d3): `Mandrill_d3`
- [Scatter Plot Model](https://github.com/ksobon/mandrill/blob/master/Mandrill_d3/ScatterPlots/d3ScatterPlot.cs): `Mandrill_d3/ScatterPlots/d3ScatterPlot.cs`
- [Text Note Model](https://github.com/ksobon/mandrill/blob/master/Mandrill_d3/TextNotes/TextNotes.cs): `Mandrill_d3/TextNotes/TextNotes.cs`
- [HTML Compiler](https://github.com/ksobon/mandrill/blob/master/Mandrill_d3/Charts.cs): `Mandrill_d3/Charts.cs`
- [Render Utilities](https://github.com/ksobon/mandrill/blob/master/Mandrill_d3/ChartsUtilities.cs): `Mandrill_d3/ChartsUtilities.cs`

### Report Delivery

- [Report Creator](https://github.com/ksobon/mandrill/blob/master/Mandrill_Grasshopper/Components/Report/Mandrill_CreateReport.cs): `Mandrill_Grasshopper/Components/Report/Mandrill_CreateReport.cs`
- [Grasshopper Window](https://github.com/ksobon/mandrill/blob/master/Mandrill_Grasshopper/Components/Report/Mandrill_LaunchWindow.cs): `Mandrill_Grasshopper/Components/Report/Mandrill_LaunchWindow.cs`
- [Report Window](https://github.com/ksobon/mandrill/blob/master/Mandrill_Grasshopper/Controls/MandrillWindow.xaml.cs): `Mandrill_Grasshopper/Controls/MandrillWindow.xaml.cs`
- [PDF Components](https://github.com/ksobon/mandrill/tree/master/Mandrill_Grasshopper/Components/PDF): `Mandrill_Grasshopper/Components/PDF`
- [PDF Export](https://github.com/ksobon/mandrill/blob/master/Mandrill/Nodes/Reports/Pdf.cs): `Mandrill/Nodes/Reports/Pdf.cs`
- [Dynamo Report Window](https://github.com/ksobon/mandrill/blob/master/Mandrill_UI/NodeModels/MandrillWindowNodeModel.cs): `Mandrill_UI/NodeModels/MandrillWindowNodeModel.cs`

### Other components

- **Dynamo User**

## Connections

- Dynamo User → Chart Components: build charts
- Dynamo User → CSV Data Inputs: provide data
- Scatter Plot Node → Scatter Plot Model: creates model (evidence: `Mandrill/Nodes/Charts/ScatterPlots.cs`)
- Text Note Node → Text Note Model: creates note (evidence: `Mandrill/Nodes/Html/Text.cs`)
- Chart Models → HTML Compiler: compile report (evidence: `Mandrill_d3/Charts.cs`)
- HTML Compiler → Render Utilities: uses templates (evidence: `Mandrill_d3/Charts.cs`)
- Report Creator → Grasshopper Window: provide report
- Grasshopper Window → Report Window: launches window (evidence: `Mandrill_Grasshopper/Components/Report/Mandrill_LaunchWindow.cs`)
- Report Window → PDF Export: converts HTML (evidence: `Mandrill_Grasshopper/Controls/MandrillWindow.xaml.cs`)
- Dynamo Report Window → Chart Models: reads report (evidence: `Mandrill_UI/NodeModels/MandrillWindowNodeModel.cs`)
