# sangharshgautam/jsonspy architecture

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

- Interactive diagram: https://gitdiagram.com/sangharshgautam/jsonspy
- Repository: https://github.com/sangharshgautam/jsonspy

## Overview

JSONSpy is a multi-platform JSON and schema workbench. Its primary workflow is to open or edit JSON, repair or inspect it in text, grid, or schema views, and then query or generate schema and language types. The graph also preserves its documented IDE integrations and product landing page. Edges are limited to relationships shown in excerpts, source-index references, or README statements; links to unsampled integration behavior are omitted where they cannot be established.

Main entry points: [`src/App.tsx`](https://github.com/sangharshgautam/jsonspy/blob/main/src/App.tsx) (Workbench App), [`intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyToolWindowFactory.kt`](https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyToolWindowFactory.kt) (IntelliJ Tool Window), [`src/components/TextView.tsx`](https://github.com/sangharshgautam/jsonspy/blob/main/src/components/TextView.tsx) (Text Editor), [`src/components/SchemaView.tsx`](https://github.com/sangharshgautam/jsonspy/blob/main/src/components/SchemaView.tsx) (Schema Designer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workbench["JSON Workbench"]
  node_app["Workbench App<br/>[App.tsx]"]
  node_documents["Document Tabs<br/>[jsonspy.ts]"]
  node_text["Text Editor<br/>[TextView.tsx]"]
  node_smartfix["SmartFix Repair<br/>[smartFix.ts]"]
  node_grid["Tree Grid<br/>[GridView.tsx]"]
  node_query["Query Workbench<br/>[QueryWorkbench.tsx]"]
  node_sampledata["Sample Datasets<br/>[sampleData.ts]"]
end

subgraph group_modeling["Schema And Generation"]
  node_schema["Schema Designer<br/>[SchemaView.tsx]"]
  node_inference["Schema Inference<br/>[schemaInference.ts]"]
  node_generator["Code Generator<br/>[GeneratorModal.tsx]"]
  node_typegen["Type Generation<br/>[typeGenerators.ts]"]
end

subgraph group_integrations["Platform Integrations"]
  node_fileops["File Operations<br/>[fileSystem.ts]"]
  node_adapter["Platform Adapter<br/>[platformAdapter.ts]"]
  node_tauri["Tauri Desktop APIs"]
  node_intellij["IntelliJ Tool Window"]
  node_jcef["JCEF Component"]
  node_bridge["JCEF Bridge"]
  node_http["IDE HTTP Server"]
  node_validator["JVM Schema Validator"]
  node_vscode["VS Code Extension<br/>[extension.ts]"]
  node_editorprovider["Custom Editor Provider"]
end

subgraph group_discovery["Product Landing"]
  node_landing["Product Landing Page<br/>[App.tsx]"]
  node_privacy["Privacy Modal<br/>[PrivacyModal.tsx]"]
end

node_user(("Workbench User"))
node_visitor(("Site Visitor"))

node_user -->|"uses"| node_app
node_app -->|"updates"| node_documents
node_app -->|"renders"| node_text
node_app -->|"renders"| node_grid
node_app -->|"renders"| node_schema
node_app -->|"renders"| node_query
node_app -->|"renders"| node_generator
node_app -->|"calls"| node_smartfix
node_text -->|"calls"| node_smartfix
node_app -->|"calls"| node_fileops
node_fileops -->|"delegates"| node_adapter
node_adapter -->|"uses"| node_tauri
node_schema -->|"uses"| node_inference
node_generator -->|"calls"| node_typegen
node_typegen -->|"calls"| node_inference
node_app -->|"loads"| node_sampledata
node_intellij -->|"creates"| node_jcef
node_intellij -->|"starts"| node_http
node_jcef -->|"registers"| node_bridge
node_bridge -->|"calls"| node_validator
node_vscode -->|"registers"| node_editorprovider
node_editorprovider -.->|"hosts"| node_app
node_visitor -->|"views"| node_landing
node_landing -->|"renders"| node_privacy

click node_app "https://github.com/sangharshgautam/jsonspy/blob/main/src/App.tsx"
click node_documents "https://github.com/sangharshgautam/jsonspy/blob/main/src/types/jsonspy.ts"
click node_text "https://github.com/sangharshgautam/jsonspy/blob/main/src/components/TextView.tsx"
click node_smartfix "https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/smartFix.ts"
click node_grid "https://github.com/sangharshgautam/jsonspy/blob/main/src/components/GridView.tsx"
click node_fileops "https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/fileSystem.ts"
click node_adapter "https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/platformAdapter.ts"
click node_schema "https://github.com/sangharshgautam/jsonspy/blob/main/src/components/SchemaView.tsx"
click node_inference "https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/schemaInference.ts"
click node_query "https://github.com/sangharshgautam/jsonspy/blob/main/src/components/QueryWorkbench.tsx"
click node_generator "https://github.com/sangharshgautam/jsonspy/blob/main/src/components/GeneratorModal.tsx"
click node_typegen "https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/typeGenerators.ts"
click node_sampledata "https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/sampleData.ts"
click node_intellij "https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyToolWindowFactory.kt"
click node_jcef "https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JcefComponentFactory.kt"
click node_bridge "https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyJcefBridge.kt"
click node_http "https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyHttpServer.kt"
click node_validator "https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/NetworkNtValidator.kt"
click node_vscode "https://github.com/sangharshgautam/jsonspy/blob/main/vscode-extension/src/extension.ts"
click node_editorprovider "https://github.com/sangharshgautam/jsonspy/blob/main/vscode-extension/src/JsonSpyEditorProvider.ts"
click node_landing "https://github.com/sangharshgautam/jsonspy/blob/main/landing/src/App.tsx"
click node_privacy "https://github.com/sangharshgautam/jsonspy/blob/main/landing/src/components/PrivacyModal.tsx"

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_documents,node_text,node_smartfix,node_grid,node_query,node_sampledata,node_user toneBlue
class node_schema,node_inference,node_generator,node_typegen toneAmber
class node_fileops,node_adapter,node_tauri,node_intellij,node_jcef,node_bridge,node_http,node_validator,node_vscode,node_editorprovider toneMint
class node_landing,node_privacy toneRose
class node_visitor toneIndigo
```

## Components

### JSON Workbench

- [Workbench App](https://github.com/sangharshgautam/jsonspy/blob/main/src/App.tsx): `src/App.tsx`
- [Document Tabs](https://github.com/sangharshgautam/jsonspy/blob/main/src/types/jsonspy.ts): `src/types/jsonspy.ts`
- [Text Editor](https://github.com/sangharshgautam/jsonspy/blob/main/src/components/TextView.tsx): `src/components/TextView.tsx`
- [SmartFix Repair](https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/smartFix.ts): `src/utils/smartFix.ts`
- [Tree Grid](https://github.com/sangharshgautam/jsonspy/blob/main/src/components/GridView.tsx): `src/components/GridView.tsx`
- [Query Workbench](https://github.com/sangharshgautam/jsonspy/blob/main/src/components/QueryWorkbench.tsx): `src/components/QueryWorkbench.tsx`
- [Sample Datasets](https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/sampleData.ts): `src/utils/sampleData.ts`

### Schema And Generation

- [Schema Designer](https://github.com/sangharshgautam/jsonspy/blob/main/src/components/SchemaView.tsx): `src/components/SchemaView.tsx`
- [Schema Inference](https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/schemaInference.ts): `src/utils/schemaInference.ts`
- [Code Generator](https://github.com/sangharshgautam/jsonspy/blob/main/src/components/GeneratorModal.tsx): `src/components/GeneratorModal.tsx`
- [Type Generation](https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/typeGenerators.ts): `src/utils/typeGenerators.ts`

### Platform Integrations

- [File Operations](https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/fileSystem.ts): `src/utils/fileSystem.ts`
- [Platform Adapter](https://github.com/sangharshgautam/jsonspy/blob/main/src/utils/platformAdapter.ts): `src/utils/platformAdapter.ts`
- **Tauri Desktop APIs**
- [IntelliJ Tool Window](https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyToolWindowFactory.kt): `intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyToolWindowFactory.kt`
- [JCEF Component](https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JcefComponentFactory.kt): `intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JcefComponentFactory.kt`
- [JCEF Bridge](https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyJcefBridge.kt): `intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyJcefBridge.kt`
- [IDE HTTP Server](https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyHttpServer.kt): `intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyHttpServer.kt`
- [JVM Schema Validator](https://github.com/sangharshgautam/jsonspy/blob/main/intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/NetworkNtValidator.kt): `intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/NetworkNtValidator.kt`
- [VS Code Extension](https://github.com/sangharshgautam/jsonspy/blob/main/vscode-extension/src/extension.ts): `vscode-extension/src/extension.ts`
- [Custom Editor Provider](https://github.com/sangharshgautam/jsonspy/blob/main/vscode-extension/src/JsonSpyEditorProvider.ts): `vscode-extension/src/JsonSpyEditorProvider.ts`

### Product Landing

- [Product Landing Page](https://github.com/sangharshgautam/jsonspy/blob/main/landing/src/App.tsx): `landing/src/App.tsx`
- [Privacy Modal](https://github.com/sangharshgautam/jsonspy/blob/main/landing/src/components/PrivacyModal.tsx): `landing/src/components/PrivacyModal.tsx`

### Other components

- **Workbench User**
- **Site Visitor**

## Connections

- Workbench User → Workbench App: uses (evidence: `README.md`)
- Workbench App → Document Tabs: updates (evidence: `src/App.tsx`)
- Workbench App → Text Editor: renders (evidence: `src/App.tsx`)
- Workbench App → Tree Grid: renders (evidence: `src/App.tsx`)
- Workbench App → Schema Designer: renders (evidence: `src/App.tsx`)
- Workbench App → Query Workbench: renders (evidence: `src/App.tsx`)
- Workbench App → Code Generator: renders (evidence: `src/App.tsx`)
- Workbench App → SmartFix Repair: calls (evidence: `src/App.tsx`)
- Text Editor → SmartFix Repair: calls (evidence: `src/components/TextView.tsx`)
- Workbench App → File Operations: calls (evidence: `src/App.tsx`)
- File Operations → Platform Adapter: delegates (evidence: `src/utils/fileSystem.ts`)
- Platform Adapter → Tauri Desktop APIs: uses (evidence: `src/utils/platformAdapter.ts`)
- Schema Designer → Schema Inference: uses (evidence: `src/components/SchemaView.tsx`)
- Code Generator → Type Generation: calls (evidence: `src/components/GeneratorModal.tsx`)
- Type Generation → Schema Inference: calls (evidence: `src/utils/typeGenerators.ts`)
- Workbench App → Sample Datasets: loads (evidence: `src/App.tsx`)
- IntelliJ Tool Window → JCEF Component: creates (evidence: `intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyToolWindowFactory.kt`)
- IntelliJ Tool Window → IDE HTTP Server: starts (evidence: `intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyToolWindowFactory.kt`)
- JCEF Component → JCEF Bridge: registers (evidence: `intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JcefComponentFactory.kt`)
- JCEF Bridge → JVM Schema Validator: calls (evidence: `intellij-plugin/src/main/kotlin/uk/co/sangharsh/jsonspy/plugin/JsonSpyJcefBridge.kt`)
- VS Code Extension → Custom Editor Provider: registers (evidence: `vscode-extension/src/extension.ts`)
- Custom Editor Provider → Workbench App: hosts
- Site Visitor → Product Landing Page: views (evidence: `README.md`)
- Product Landing Page → Privacy Modal: renders (evidence: `landing/src/App.tsx`)
