# maulana-mash/minimalflow-studio architecture

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

- Interactive diagram: https://gitdiagram.com/maulana-mash/minimalflow-studio
- Repository: https://github.com/maulana-mash/minimalflow-studio

## Overview

MinimalFlow Studio is a browser-based flowchart editor: users create or import a diagram, edit and arrange it on an interactive canvas, manage projects, then export vector or raster output. The README also documents image-to-flowchart scanning and Mermaid, automotive wiring JSON, generic diagram JSON, and native-document import. The tree contains a duplicated `minimalflow-studio/` application; this map uses the root `js/` implementation. Edges are limited to relationships visible in excerpts or explicitly documented; several runtime integrations are not sampled.

Main entry points: [`js/app.js`](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/app.js) (Application orchestrator), [`js/flow_engine.js`](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/flow_engine.js) (Shapes and connectors), [`js/vision_scanner.js`](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/vision_scanner.js) (Vision scanner), [`js/adapter.js`](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/adapter.js) (Format adapter)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["Diagram workflow"]
  node_app["Application orchestrator<br/>[app.js]"]
  node_adapter["Format adapter<br/>[adapter.js]"]
  node_document["Diagram document<br/>[projects.js]"]
end

subgraph group_editing["Canvas editing"]
  node_canvas["Canvas interaction<br/>[canvas.js]"]
  node_flow["Shapes and connectors<br/>[flow_engine.js]"]
  node_text["Inline text editor<br/>[text_editor.js]"]
  node_history["Undo history<br/>[history.js]"]
end

subgraph group_persistence["Projects and export"]
  node_projects["Project persistence<br/>[projects.js]"]
  node_exporter["Diagram exporter<br/>[exporter.js]"]
end

subgraph group_scanning["Vision scanning"]
  node_scanner["Vision scanner<br/>[vision_scanner.js]"]
end

node_user(("Diagram author"))
node_gemini{{"Google Gemini"}}
node_svg["SVG canvas"]
node_localstorage[("Browser storage")]
node_download["Exported file"]

node_user -->|"edits diagrams"| node_app
node_app -.->|"imports formats"| node_adapter
node_adapter -.->|"produces document"| node_document
node_app -->|"handles interaction"| node_canvas
node_app -->|"renders diagrams"| node_flow
node_app -->|"opens editor"| node_text
node_flow -->|"uses text layout"| node_text
node_app -.->|"tracks edits"| node_history
node_app -->|"manages projects"| node_projects
node_projects -->|"reads and writes"| node_localstorage
node_app -.->|"exports diagram"| node_exporter
node_exporter -.->|"creates files"| node_download
node_user -.->|"scans image"| node_scanner
node_scanner -.->|"requests vision analysis"| node_gemini
node_scanner -.->|"returns diagram data"| node_adapter
node_flow -->|"renders SVG"| node_svg

click node_app "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/app.js"
click node_adapter "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/adapter.js"
click node_document "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/projects.js"
click node_canvas "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/canvas.js"
click node_flow "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/flow_engine.js"
click node_text "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/text_editor.js"
click node_history "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/history.js"
click node_projects "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/projects.js"
click node_exporter "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/exporter.js"
click node_scanner "https://github.com/maulana-mash/minimalflow-studio/blob/main/js/vision_scanner.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_app,node_adapter,node_document toneBlue
class node_canvas,node_flow,node_text,node_history,node_localstorage toneAmber
class node_projects,node_exporter toneMint
class node_scanner toneRose
class node_user,node_gemini,node_svg,node_download toneIndigo
```

## Components

### Diagram workflow

- [Application orchestrator](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/app.js): `js/app.js`
- [Format adapter](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/adapter.js): `js/adapter.js`
- [Diagram document](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/projects.js): `js/projects.js`

### Canvas editing

- [Canvas interaction](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/canvas.js): `js/canvas.js`
- [Shapes and connectors](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/flow_engine.js): `js/flow_engine.js`
- [Inline text editor](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/text_editor.js): `js/text_editor.js`
- [Undo history](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/history.js): `js/history.js`

### Projects and export

- [Project persistence](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/projects.js): `js/projects.js`
- [Diagram exporter](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/exporter.js): `js/exporter.js`

### Vision scanning

- [Vision scanner](https://github.com/maulana-mash/minimalflow-studio/blob/main/js/vision_scanner.js): `js/vision_scanner.js`

### Other components

- **Diagram author**
- **Google Gemini**
- **SVG canvas**
- **Browser storage**
- **Exported file**

## Connections

- Diagram author → Application orchestrator: edits diagrams (evidence: `README.md`)
- Application orchestrator → Format adapter: imports formats (evidence: `README.md`)
- Format adapter → Diagram document: produces document (evidence: `README.md`)
- Application orchestrator → Canvas interaction: handles interaction (evidence: `js/app.js`)
- Application orchestrator → Shapes and connectors: renders diagrams (evidence: `js/flow_engine.js`)
- Application orchestrator → Inline text editor: opens editor (evidence: `js/app.js`)
- Shapes and connectors → Inline text editor: uses text layout (evidence: `js/flow_engine.js`)
- Application orchestrator → Undo history: tracks edits
- Application orchestrator → Project persistence: manages projects (evidence: `js/app.js`)
- Project persistence → Browser storage: reads and writes (evidence: `js/projects.js`)
- Application orchestrator → Diagram exporter: exports diagram (evidence: `README.md`)
- Diagram exporter → Exported file: creates files (evidence: `README.md`)
- Diagram author → Vision scanner: scans image (evidence: `README.md`)
- Vision scanner → Google Gemini: requests vision analysis (evidence: `README.md`)
- Vision scanner → Format adapter: returns diagram data
- Shapes and connectors → SVG canvas: renders SVG (evidence: `js/flow_engine.js`)
