# starving-array/vectorshift-pipeline-builder architecture

> Architecture diagram of the GitHub repository starving-array/vectorshift-pipeline-builder, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/starving-array/vectorshift-pipeline-builder
- Repository: https://github.com/starving-array/vectorshift-pipeline-builder

## Overview

1. This repository is a two-tier workflow builder: a React frontend lets users assemble a directed graph visually, and a small FastAPI backend validates and summarizes the graph when it is submitted.

2. The frontend is the main interactive surface. `frontend/src/App.js` likely composes the canvas, toolbar, and submission controls, while `frontend/src/index.js` bootstraps the React app and `index.css` handles global styling.

3. Graph editing is built around React Flow and local client state. `frontend/src/store.js` suggests a Zustand-based store for nodes, edges, selection, and UI actions, keeping the workflow editor state in the browser until submission.

4. The node system is modular. `frontend/src/nodes/` contains a `BaseNode` plus specialized nodes such as input, output, text, LLM, API, delay, filter, email, and math. This indicates a reusable node UI pattern rather than one-off components.

5. `BaseNode` is the abstraction boundary for all workflow nodes. It likely standardizes labels, handles, and connection points so that each concrete node only defines its own configuration and behavior.

6. The Text node is the most dynamic frontend node. The README says it parses variables like `{{name}}` and generates input handles automatically, so it is responsible for turning text templates into graph dependencies.

7. `frontend/src/draggableNode.js`, `toolbar.js`, and `ui.js` appear to support palette-to-canvas interaction and editor chrome. In architecture terms, these are the user-facing controls that create new nodes and make them draggable into the workflow canvas.

8. The frontend’s data flow is: user creates or connects nodes on the React Flow canvas, the store maintains the graph, and the submit flow serializes the graph for backend analysis. `frontend/src/submit.js` is the likely boundary where client graph state is turned into an API request.

9. The backend is intentionally narrow. `backend/main.py` and `backend/requirements.txt` indicate a single Python service built with FastAPI, likely exposing one submission endpoint rather than a full CRUD application.

10. Backend responsibilities are validation and summary, not long-term persistence. According to the README, it returns the number of nodes, number of edges, and whether the graph is a valid DAG, so it acts as a stateless graph-analysis service.

11. DAG validation is a key processing boundary. The README explicitly mentions Kahn’s Algorithm, so the backend likely converts the submitted graph into an adjacency representation, checks acyclicity, and reports validity back to the frontend.

12. There is no evidence of a database, authentication layer, message queue, or external service integration. For an architecture diagram, the main boundary is simply browser-based workflow editing on the left and Python-based graph validation on the right.

13. The most important runtime split is frontend vs backend: React/React Flow/Zustand in the browser, FastAPI/Python on the server. Everything else is internal structure around node composition, graph state, and submission/validation.

Main entry points: [`frontend/src/nodes/BaseNode.js`](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/BaseNode.js) (Base node), [`frontend/src/App.js`](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/App.js) (Workflow editor), [`frontend/src/toolbar.js`](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/toolbar.js) (Toolbar), [`frontend/src/submit.js`](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/submit.js) (Submit flow)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Frontend"]
  node_frontend_src_index_js["Entry point<br/>React bootstrap<br/>[index.js]"]
  node_frontend_src_app_js["Workflow editor<br/>React shell<br/>[App.js]"]
  node_frontend_src_store_js["Graph store<br/>Zustand state<br/>[store.js]"]
  node_frontend_src_toolbar_js["Toolbar<br/>Editor chrome<br/>[toolbar.js]"]
  node_frontend_src_ui_js["Canvas UI<br/>Editor chrome<br/>[ui.js]"]
  node_frontend_src_draggable_node_js["Draggable node<br/>Drag helper<br/>[draggableNode.js]"]
  node_frontend_src_submit_js["Submit flow<br/>API client<br/>[submit.js]"]
  node_frontend_src_index_css["Global styles<br/>Styling<br/>[index.css]"]
end

subgraph group_nodes["Node system"]
  node_frontend_src_nodes_base_node_js["Base node<br/>Node abstraction<br/>[BaseNode.js]"]
  node_frontend_src_nodes_input_node_js["Input node<br/>Workflow node<br/>[inputNode.js]"]
  node_frontend_src_nodes_output_node_js["Output node<br/>Workflow node<br/>[outputNode.js]"]
  node_frontend_src_nodes_text_node_js["Text node<br/>Template node<br/>[textNode.js]"]
  node_frontend_src_nodes_llm_node_js["LLM node<br/>Workflow node<br/>[llmNode.js]"]
  node_frontend_src_nodes_api_node_js["API node<br/>Workflow node<br/>[apiNode.js]"]
  node_frontend_src_nodes_delay_node_js["Delay node<br/>Workflow node<br/>[delayNode.js]"]
  node_frontend_src_nodes_filter_node_js["Filter node<br/>Workflow node<br/>[filterNode.js]"]
  node_frontend_src_nodes_email_node_js["Email node<br/>Workflow node<br/>[emailNode.js]"]
  node_frontend_src_nodes_math_node_js["Math node<br/>Workflow node<br/>[mathNode.js]"]
end

subgraph group_backend["Backend"]
  node_backend_main_py["Graph API<br/>FastAPI service<br/>[main.py]"]
end

node_frontend_src_index_js -->|"mounts"| node_frontend_src_app_js
node_frontend_src_app_js -->|"uses"| node_frontend_src_store_js
node_frontend_src_app_js -->|"composes"| node_frontend_src_toolbar_js
node_frontend_src_app_js -->|"composes"| node_frontend_src_ui_js
node_frontend_src_app_js -->|"enables"| node_frontend_src_draggable_node_js
node_frontend_src_toolbar_js -->|"spawns"| node_frontend_src_draggable_node_js
node_frontend_src_app_js -->|"submits"| node_frontend_src_submit_js
node_frontend_src_app_js -->|"styles"| node_frontend_src_index_css
node_frontend_src_app_js -->|"renders"| node_frontend_src_nodes_base_node_js
node_frontend_src_nodes_base_node_js -->|"specializes"| node_frontend_src_nodes_input_node_js
node_frontend_src_nodes_base_node_js -->|"specializes"| node_frontend_src_nodes_output_node_js
node_frontend_src_nodes_base_node_js -->|"specializes"| node_frontend_src_nodes_text_node_js
node_frontend_src_nodes_base_node_js -->|"specializes"| node_frontend_src_nodes_llm_node_js
node_frontend_src_nodes_base_node_js -->|"specializes"| node_frontend_src_nodes_api_node_js
node_frontend_src_nodes_base_node_js -->|"specializes"| node_frontend_src_nodes_delay_node_js
node_frontend_src_nodes_base_node_js -->|"specializes"| node_frontend_src_nodes_filter_node_js
node_frontend_src_nodes_base_node_js -->|"specializes"| node_frontend_src_nodes_email_node_js
node_frontend_src_nodes_base_node_js -->|"specializes"| node_frontend_src_nodes_math_node_js
node_frontend_src_submit_js -->|"calls"| node_backend_main_py
node_backend_main_py -.->|"returns summary"| node_frontend_src_app_js

click node_frontend_src_index_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/index.js"
click node_frontend_src_app_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/App.js"
click node_frontend_src_store_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/store.js"
click node_frontend_src_toolbar_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/toolbar.js"
click node_frontend_src_ui_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/ui.js"
click node_frontend_src_draggable_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/draggableNode.js"
click node_frontend_src_submit_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/submit.js"
click node_frontend_src_index_css "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/index.css"
click node_frontend_src_nodes_base_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/BaseNode.js"
click node_frontend_src_nodes_input_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/inputNode.js"
click node_frontend_src_nodes_output_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/outputNode.js"
click node_frontend_src_nodes_text_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/textNode.js"
click node_frontend_src_nodes_llm_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/llmNode.js"
click node_frontend_src_nodes_api_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/apiNode.js"
click node_frontend_src_nodes_delay_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/delayNode.js"
click node_frontend_src_nodes_filter_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/filterNode.js"
click node_frontend_src_nodes_email_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/emailNode.js"
click node_frontend_src_nodes_math_node_js "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/mathNode.js"
click node_backend_main_py "https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/backend/main.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_frontend_src_index_js,node_frontend_src_app_js,node_frontend_src_store_js,node_frontend_src_toolbar_js,node_frontend_src_ui_js,node_frontend_src_draggable_node_js,node_frontend_src_submit_js,node_frontend_src_index_css toneBlue
class node_frontend_src_nodes_base_node_js,node_frontend_src_nodes_input_node_js,node_frontend_src_nodes_output_node_js,node_frontend_src_nodes_text_node_js,node_frontend_src_nodes_llm_node_js,node_frontend_src_nodes_api_node_js,node_frontend_src_nodes_delay_node_js,node_frontend_src_nodes_filter_node_js,node_frontend_src_nodes_email_node_js,node_frontend_src_nodes_math_node_js toneAmber
class node_backend_main_py toneMint
```

## Components

### Frontend

React workflow editor in the browser

- [Entry point](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/index.js): React bootstrap · Mounts the frontend application · `frontend/src/index.js`
- [Workflow editor](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/App.js): React shell · Composes the canvas, controls, and submission flow · `frontend/src/App.js`
- [Graph store](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/store.js): Zustand state · Keeps nodes, edges, and editor actions in browser state · `frontend/src/store.js`
- [Toolbar](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/toolbar.js): Editor chrome · Palette and creation controls for adding nodes · `frontend/src/toolbar.js`
- [Canvas UI](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/ui.js): Editor chrome · Supporting editor surface and workflow UI · `frontend/src/ui.js`
- [Draggable node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/draggableNode.js): Drag helper · Enables palette items to be dropped onto the canvas · `frontend/src/draggableNode.js`
- [Submit flow](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/submit.js): API client · Serializes the graph and sends it to the backend · `frontend/src/submit.js`
- [Global styles](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/index.css): Styling · Application-wide CSS for the editor · `frontend/src/index.css`

### Node system

Reusable workflow node components

- [Base node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/BaseNode.js): Node abstraction · Shared node shell with handles and common layout · `frontend/src/nodes/BaseNode.js`
- [Input node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/inputNode.js): Workflow node · Represents an input source · `frontend/src/nodes/inputNode.js`
- [Output node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/outputNode.js): Workflow node · Represents an output sink · `frontend/src/nodes/outputNode.js`
- [Text node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/textNode.js): Template node · Parses variables and generates dynamic handles · `frontend/src/nodes/textNode.js`
- [LLM node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/llmNode.js): Workflow node · Represents a language-model step · `frontend/src/nodes/llmNode.js`
- [API node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/apiNode.js): Workflow node · Represents an external request step · `frontend/src/nodes/apiNode.js`
- [Delay node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/delayNode.js): Workflow node · Represents a timed pause in the graph · `frontend/src/nodes/delayNode.js`
- [Filter node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/filterNode.js): Workflow node · Represents conditional routing logic · `frontend/src/nodes/filterNode.js`
- [Email node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/emailNode.js): Workflow node · Represents an email action · `frontend/src/nodes/emailNode.js`
- [Math node](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/frontend/src/nodes/mathNode.js): Workflow node · Represents numeric transformation logic · `frontend/src/nodes/mathNode.js`

### Backend

FastAPI graph validation service

- [Graph API](https://github.com/starving-array/vectorshift-pipeline-builder/blob/master/backend/main.py): FastAPI service · Validates submitted graphs and returns summary stats · `backend/main.py`

## Connections

- Entry point → Workflow editor: mounts · Bootstraps the React application
- Workflow editor → Graph store: uses · Reads and updates editor graph state
- Workflow editor → Toolbar: composes · Renders creation controls
- Workflow editor → Canvas UI: composes · Renders the main workflow editor surface
- Workflow editor → Draggable node: enables · Supports drag-and-drop node creation
- Toolbar → Draggable node: spawns · Provides draggable palette items
- Workflow editor → Submit flow: submits · Hands off graph state for validation
- Workflow editor → Global styles: styles · Applies global styling to the editor
- Workflow editor → Base node: renders · Uses the shared node abstraction in the canvas
- Base node → Input node: specializes · Input node builds on the base node shell
- Base node → Output node: specializes · Output node builds on the base node shell
- Base node → Text node: specializes · Text node adds template-driven behavior
- Base node → LLM node: specializes · LLM node builds on the base node shell
- Base node → API node: specializes · API node builds on the base node shell
- Base node → Delay node: specializes · Delay node builds on the base node shell
- Base node → Filter node: specializes · Filter node builds on the base node shell
- Base node → Email node: specializes · Email node builds on the base node shell
- Base node → Math node: specializes · Math node builds on the base node shell
- Submit flow → Graph API: calls · Sends the submitted graph for analysis
- Graph API → Workflow editor: returns summary · Responds with validation and graph stats
