# prasad2604/workflow-to-json architecture

> Architecture diagram of the GitHub repository prasad2604/workflow-to-json, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-05-21). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/prasad2604/workflow-to-json
- Repository: https://github.com/prasad2604/workflow-to-json

## Overview

1. This repository is a client-side React application built with TypeScript and Vite. There is no backend, API layer, or server-side code in the tree, so the architecture is centered on a single browser-rendered UI.

2. The application entry path is conventional: `index.html` loads `src/main.tsx`, which mounts `src/App.tsx`. `App.tsx` appears to be the top-level composition layer that wires global styles and the primary feature screen together.

3. The main feature subsystem is a workflow-designer UI under `src/components/WorkflowDesigner.tsx`. Based on the surrounding components, this is the core stateful surface of the app: it likely owns the workflow graph model, selection state, and event handling for editing nodes and connections.

4. The workflow canvas is split into specialized renderers:
   - `CustomNode.tsx` renders the visual representation of a workflow node.
   - `CustomEdge.tsx` renders the visual representation of a connection between nodes.
   These are boundary components between the editor’s data model and its visual graph rendering.

5. `Sidebar.tsx` is the secondary interaction surface. It likely acts as the inspector/editor for the currently selected node or workflow item, separating structural editing on the canvas from property editing in a side panel.

6. The data flow is probably:
   browser interaction on the canvas or sidebar -> workflow state changes inside `WorkflowDesigner` -> updated node/edge props flow down into `CustomNode` and `CustomEdge` -> sidebar reflects the current selection and editable properties.
   This makes `WorkflowDesigner` the central orchestration point.

7. The `src/components/ui` folder contains reusable presentational primitives such as `card.tsx` and `input.tsx`. These are app-wide UI building blocks rather than feature logic, and they support a clean separation between domain-specific workflow editing and generic form/layout controls.

8. `components.json` strongly suggests a component generator/design-system setup, commonly used with shadcn-style UI patterns. Architecturally, that means the app favors local, composable UI primitives over a large third-party widget framework.

9. Shared utility code lives in `src/lib/utils.ts`, which likely provides small cross-cutting helpers used by the UI layer. This is the usual place for class-name composition or similar shared presentation helpers.

10. Styling is split between `src/index.css` for global base styles and `src/App.css` for feature-level styling. This keeps application shell styling separate from workflow-designer-specific layout and interaction styles.

11. Static assets are stored under `src/assets`, while `public/` holds files that must be served as-is. There is no evidence of runtime asset fetching or external data dependencies in the repository structure.

12. Tooling is standard modern frontend tooling: Vite for development/build, TypeScript for static typing, and ESLint for code quality. The repository is therefore optimized for rapid local iteration and type-safe component development rather than distributed-system concerns.

13. For an architecture diagram, the key boundaries are:
   - bootstrapping layer: `index.html` → `main.tsx`
   - app shell: `App.tsx`
   - core feature domain: `WorkflowDesigner.tsx`
   - domain renderers: `CustomNode.tsx`, `CustomEdge.tsx`
   - inspector/editing panel: `Sidebar.tsx`
   - shared UI primitives and utilities: `components/ui/*`, `lib/utils.ts`
   - global styling/static assets: CSS files, `assets/`, `public/`

Main entry points: [`src/App.tsx`](https://github.com/prasad2604/workflow-to-json/blob/master/src/App.tsx) (App.tsx), [`src/components/WorkflowDesigner.tsx`](https://github.com/prasad2604/workflow-to-json/blob/master/src/components/WorkflowDesigner.tsx) (WorkflowDesigner), [`src/components/ui`](https://github.com/prasad2604/workflow-to-json/tree/master/src/components/ui) (UI primitives), [`src/main.tsx`](https://github.com/prasad2604/workflow-to-json/blob/master/src/main.tsx) (main.tsx)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_bootstrap["Bootstrap"]
  node_node_index_html["index.html<br/>html entry<br/>[index.html]"]
  node_node_main_tsx["main.tsx<br/>app mount<br/>[main.tsx]"]
  node_node_app_tsx["App.tsx<br/>app shell<br/>[App.tsx]"]
end

subgraph group_group_workflow["Workflow UI"]
  node_node_workflow_designer["WorkflowDesigner<br/>workflow editor"]
  node_node_custom_node["CustomNode<br/>node renderer<br/>[CustomNode.tsx]"]
  node_node_custom_edge["CustomEdge<br/>edge renderer<br/>[CustomEdge.tsx]"]
end

subgraph group_group_sidebar["Inspector"]
  node_node_sidebar["Sidebar<br/>inspector panel<br/>[Sidebar.tsx]"]
end

subgraph group_group_shared["Shared UI"]
  node_node_ui_primitives["UI primitives<br/>shared components"]
  node_node_card["card.tsx<br/>primitive<br/>[card.tsx]"]
  node_node_input["input.tsx<br/>primitive<br/>[input.tsx]"]
  node_node_utils["utils.ts<br/>helper utils<br/>[utils.ts]"]
end

subgraph group_group_styling["Style & Assets"]
  node_node_app_css["App.css<br/>feature styles<br/>[App.css]"]
  node_node_index_css["index.css<br/>global styles<br/>[index.css]"]
  node_node_assets["assets"]
  node_node_public["public"]
end

subgraph group_group_tooling["Tooling"]
  node_node_components_json["components.json<br/>ui config<br/>[components.json]"]
  node_node_vite_config["vite.config.ts<br/>build config<br/>[vite.config.ts]"]
  node_node_tsconfig["tsconfig<br/>ts config<br/>[tsconfig.json]"]
  node_node_eslint["eslint.config.js<br/>lint config<br/>[eslint.config.js]"]
end

node_node_index_html -->|"loads"| node_node_main_tsx
node_node_main_tsx -->|"mounts"| node_node_app_tsx
node_node_app_tsx -->|"renders"| node_node_workflow_designer
node_node_workflow_designer -->|"uses"| node_node_custom_node
node_node_workflow_designer -->|"uses"| node_node_custom_edge
node_node_workflow_designer -->|"coordinates"| node_node_sidebar
node_node_sidebar -->|"uses"| node_node_input
node_node_sidebar -->|"uses"| node_node_card
node_node_app_tsx -->|"styles"| node_node_app_css
node_node_app_tsx -->|"styles"| node_node_index_css
node_node_workflow_designer -->|"composes"| node_node_ui_primitives
node_node_ui_primitives -->|"includes"| node_node_card
node_node_ui_primitives -->|"includes"| node_node_input
node_node_ui_primitives -->|"uses"| node_node_utils
node_node_assets -->|"supports"| node_node_app_tsx
node_node_public -->|"serves"| node_node_index_html
node_node_components_json -->|"configures"| node_node_ui_primitives
node_node_vite_config -->|"builds"| node_node_main_tsx
node_node_tsconfig -->|"types"| node_node_main_tsx
node_node_eslint -->|"checks"| node_node_app_tsx

click node_node_index_html "https://github.com/prasad2604/workflow-to-json/blob/master/index.html"
click node_node_main_tsx "https://github.com/prasad2604/workflow-to-json/blob/master/src/main.tsx"
click node_node_app_tsx "https://github.com/prasad2604/workflow-to-json/blob/master/src/App.tsx"
click node_node_workflow_designer "https://github.com/prasad2604/workflow-to-json/blob/master/src/components/WorkflowDesigner.tsx"
click node_node_custom_node "https://github.com/prasad2604/workflow-to-json/blob/master/src/components/CustomNode.tsx"
click node_node_custom_edge "https://github.com/prasad2604/workflow-to-json/blob/master/src/components/CustomEdge.tsx"
click node_node_sidebar "https://github.com/prasad2604/workflow-to-json/blob/master/src/components/Sidebar.tsx"
click node_node_ui_primitives "https://github.com/prasad2604/workflow-to-json/tree/master/src/components/ui"
click node_node_card "https://github.com/prasad2604/workflow-to-json/blob/master/src/components/ui/card.tsx"
click node_node_input "https://github.com/prasad2604/workflow-to-json/blob/master/src/components/ui/input.tsx"
click node_node_utils "https://github.com/prasad2604/workflow-to-json/blob/master/src/lib/utils.ts"
click node_node_app_css "https://github.com/prasad2604/workflow-to-json/blob/master/src/App.css"
click node_node_index_css "https://github.com/prasad2604/workflow-to-json/blob/master/src/index.css"
click node_node_assets "https://github.com/prasad2604/workflow-to-json/tree/master/src/assets"
click node_node_public "https://github.com/prasad2604/workflow-to-json/tree/master/public"
click node_node_components_json "https://github.com/prasad2604/workflow-to-json/blob/master/components.json"
click node_node_vite_config "https://github.com/prasad2604/workflow-to-json/blob/master/vite.config.ts"
click node_node_tsconfig "https://github.com/prasad2604/workflow-to-json/blob/master/tsconfig.json"
click node_node_eslint "https://github.com/prasad2604/workflow-to-json/blob/master/eslint.config.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_node_index_html,node_node_main_tsx,node_node_app_tsx toneBlue
class node_node_workflow_designer,node_node_custom_node,node_node_custom_edge toneAmber
class node_node_sidebar toneMint
class node_node_ui_primitives,node_node_card,node_node_input,node_node_utils toneRose
class node_node_app_css,node_node_index_css,node_node_assets,node_node_public toneIndigo
class node_node_components_json,node_node_vite_config,node_node_tsconfig,node_node_eslint toneTeal
```

## Components

### Bootstrap

Browser entry and app composition

- [index.html](https://github.com/prasad2604/workflow-to-json/blob/master/index.html): html entry · Browser entry document that loads the app bundle · `index.html`
- [main.tsx](https://github.com/prasad2604/workflow-to-json/blob/master/src/main.tsx): app mount · Bootstraps React and mounts the app root · `src/main.tsx`
- [App.tsx](https://github.com/prasad2604/workflow-to-json/blob/master/src/App.tsx): app shell · Top-level composition layer for the client app · `src/App.tsx`

### Workflow UI

Core workflow designer and its canvas surfaces

- [WorkflowDesigner](https://github.com/prasad2604/workflow-to-json/blob/master/src/components/WorkflowDesigner.tsx): workflow editor · Central stateful workflow editing surface · `src/components/WorkflowDesigner.tsx`
- [CustomNode](https://github.com/prasad2604/workflow-to-json/blob/master/src/components/CustomNode.tsx): node renderer · Renders individual workflow nodes on the canvas · `src/components/CustomNode.tsx`
- [CustomEdge](https://github.com/prasad2604/workflow-to-json/blob/master/src/components/CustomEdge.tsx): edge renderer · Renders connections between workflow nodes · `src/components/CustomEdge.tsx`

### Inspector

Selection and property editing panel

- [Sidebar](https://github.com/prasad2604/workflow-to-json/blob/master/src/components/Sidebar.tsx): inspector panel · Secondary panel for selection details and property edits · `src/components/Sidebar.tsx`

### Shared UI

Reusable primitives and utilities

- [UI primitives](https://github.com/prasad2604/workflow-to-json/tree/master/src/components/ui): shared components · Reusable presentational controls used across the app · `src/components/ui`
- [card.tsx](https://github.com/prasad2604/workflow-to-json/blob/master/src/components/ui/card.tsx): primitive · Card container primitive · `src/components/ui/card.tsx`
- [input.tsx](https://github.com/prasad2604/workflow-to-json/blob/master/src/components/ui/input.tsx): primitive · Input control primitive · `src/components/ui/input.tsx`
- [utils.ts](https://github.com/prasad2604/workflow-to-json/blob/master/src/lib/utils.ts): helper utils · Shared utility helpers for the UI layer · `src/lib/utils.ts`

### Style & Assets

Global styles and static resources

- [App.css](https://github.com/prasad2604/workflow-to-json/blob/master/src/App.css): feature styles · Styling for the application shell and workflow screen · `src/App.css`
- [index.css](https://github.com/prasad2604/workflow-to-json/blob/master/src/index.css): global styles · Global base styles for the browser app · `src/index.css`
- [assets](https://github.com/prasad2604/workflow-to-json/tree/master/src/assets): static assets · Bundled source assets used by the UI · `src/assets`
- [public](https://github.com/prasad2604/workflow-to-json/tree/master/public): static public · Files served as-is by the Vite build · `public`

### Tooling

Build and type-check configuration

- [components.json](https://github.com/prasad2604/workflow-to-json/blob/master/components.json): ui config · Component generation and design-system configuration · `components.json`
- [vite.config.ts](https://github.com/prasad2604/workflow-to-json/blob/master/vite.config.ts): build config · Vite development and build configuration · `vite.config.ts`
- [tsconfig](https://github.com/prasad2604/workflow-to-json/blob/master/tsconfig.json): ts config · TypeScript compilation settings · `tsconfig.json`
- [eslint.config.js](https://github.com/prasad2604/workflow-to-json/blob/master/eslint.config.js): lint config · Code quality and linting rules · `eslint.config.js`

## Connections

- index.html → main.tsx: loads · The HTML entry loads the React entrypoint
- main.tsx → App.tsx: mounts · The entrypoint mounts the top-level app shell
- App.tsx → WorkflowDesigner: renders · The app shell composes the core workflow editor
- WorkflowDesigner → CustomNode: uses · Workflow state drives node rendering
- WorkflowDesigner → CustomEdge: uses · Workflow state drives edge rendering
- WorkflowDesigner → Sidebar: coordinates · Selection and editing state flow into the inspector panel
- Sidebar → input.tsx: uses · The sidebar relies on reusable form controls
- Sidebar → card.tsx: uses · The sidebar relies on reusable layout primitives
- App.tsx → App.css: styles · Application shell styles are attached to the top-level app
- App.tsx → index.css: styles · Global base styles apply across the app
- WorkflowDesigner → UI primitives: composes · The designer builds its UI from shared primitives
- UI primitives → card.tsx: includes · Representative shared container primitive
- UI primitives → input.tsx: includes · Representative shared form primitive
- UI primitives → utils.ts: uses · Shared primitives depend on small UI helpers
- assets → App.tsx: supports · Static assets support the browser UI
- public → index.html: serves · Public files are served directly alongside the HTML entry
- components.json → UI primitives: configures · Component-generation config supports the shared UI layer
- vite.config.ts → main.tsx: builds · Vite config drives the client bundle entry
- tsconfig → main.tsx: types · TypeScript settings apply to the application code
- eslint.config.js → App.tsx: checks · Linting covers the application and component code
