# blue-sky-infomation-factory/json-indexed-editor architecture

> Architecture diagram of the GitHub repository blue-sky-infomation-factory/json-indexed-editor, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-12). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/blue-sky-infomation-factory/json-indexed-editor
- Repository: https://github.com/blue-sky-infomation-factory/json-indexed-editor

## Overview

This is a browser-based JSON indexed editor. The user opens a JSON file, the app loads it into an editable tree preview, and indexer paths and variables select nodes for indexed editing. Users can save changes and manage reusable indexer schemes. The graph also includes the documented offline-cache capability. Source excerpts show the main orchestration and several key module calls; relationships for unsampled details are omitted rather than inferred.

Main entry points: [`main.mjs`](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/main.mjs) (App orchestration), [`tree.mjs`](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/tree.mjs) (JSON tree and preview), [`components/indexed_edit.mjs`](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/components/indexed_edit.mjs) (Indexed editor), [`components/welcome.mjs`](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/components/welcome.mjs) (Welcome screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workflow["File workflow"]
  node_main["App orchestration<br/>[main.mjs]"]
  node_welcome["Welcome screen<br/>[welcome.mjs]"]
  node_tree["JSON tree and preview<br/>[tree.mjs]"]
end

subgraph group_indexing["Indexing and schemes"]
  node_indexed_edit["Indexed editor<br/>[indexed_edit.mjs]"]
  node_indexor["Path resolution<br/>[indexor.mjs]"]
  node_management["Scheme management"]
end

subgraph group_interface["Application interface"]
  node_ui["Tabs and preview controls<br/>[ui.mjs]"]
  node_menu["Application menus<br/>[menu.mjs]"]
  node_helper["Help and cache setup<br/>[helper.mjs]"]
end

subgraph group_persistence["Persistence and offline"]
  node_data[("Browser data stores<br/>[data.mjs]")]
  node_service_worker["Offline service worker<br/>[service_worker.mjs]"]
end

node_user(("User"))
node_file["Local JSON file"]

node_user -->|"opens app"| node_welcome
node_welcome -->|"opens file"| node_main
node_user -->|"chooses file"| node_main
node_main -->|"loads data"| node_tree
node_main -->|"opens editor"| node_indexed_edit
node_main -->|"shows screen"| node_welcome
node_main -->|"opens schemes"| node_management
node_tree -->|"refreshes indexers"| node_indexed_edit
node_indexed_edit -->|"uses path resolver"| node_indexor
node_indexed_edit -->|"reads and updates scheme"| node_management
node_management -->|"persists schemes"| node_data
node_ui -->|"persists UI settings"| node_data
node_main -->|"renders menus"| node_menu
node_main -->|"saves or closes file"| node_tree
node_tree -->|"writes JSON"| node_file
node_user -->|"requests offline cache"| node_helper
node_helper -->|"registers worker"| node_service_worker

click node_main "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/main.mjs"
click node_welcome "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/components/welcome.mjs"
click node_tree "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/tree.mjs"
click node_indexed_edit "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/components/indexed_edit.mjs"
click node_indexor "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/indexor.mjs"
click node_management "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/components/indexor_management.mjs"
click node_data "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/data.mjs"
click node_ui "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/ui.mjs"
click node_menu "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/menu.mjs"
click node_helper "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/helper.mjs"
click node_service_worker "https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/service_worker.mjs"

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_main,node_welcome,node_tree,node_user toneBlue
class node_indexed_edit,node_indexor,node_management toneAmber
class node_ui,node_menu,node_helper toneMint
class node_data,node_service_worker toneRose
class node_file toneIndigo
```

## Components

### File workflow

- [App orchestration](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/main.mjs): `main.mjs`
- [Welcome screen](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/components/welcome.mjs): `components/welcome.mjs`
- [JSON tree and preview](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/tree.mjs): `tree.mjs`

### Indexing and schemes

- [Indexed editor](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/components/indexed_edit.mjs): `components/indexed_edit.mjs`
- [Path resolution](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/indexor.mjs): `indexor.mjs`
- [Scheme management](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/components/indexor_management.mjs): `components/indexor_management.mjs`

### Application interface

- [Tabs and preview controls](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/ui.mjs): `ui.mjs`
- [Application menus](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/menu.mjs): `menu.mjs`
- [Help and cache setup](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/helper.mjs): `helper.mjs`

### Persistence and offline

- [Browser data stores](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/data.mjs): `data.mjs`
- [Offline service worker](https://github.com/blue-sky-infomation-factory/json-indexed-editor/blob/main/service_worker.mjs): `service_worker.mjs`

### Other components

- **User**
- **Local JSON file**

## Connections

- User → Welcome screen: opens app (evidence: `components/welcome.mjs`)
- Welcome screen → App orchestration: opens file (evidence: `components/welcome.mjs`)
- User → App orchestration: chooses file (evidence: `main.mjs`)
- App orchestration → JSON tree and preview: loads data (evidence: `main.mjs`)
- App orchestration → Indexed editor: opens editor (evidence: `main.mjs`)
- App orchestration → Welcome screen: shows screen (evidence: `main.mjs`)
- App orchestration → Scheme management: opens schemes (evidence: `main.mjs`)
- JSON tree and preview → Indexed editor: refreshes indexers (evidence: `tree.mjs`)
- Indexed editor → Path resolution: uses path resolver (evidence: `components/indexed_edit.mjs`)
- Indexed editor → Scheme management: reads and updates scheme (evidence: `components/indexed_edit.mjs`)
- Scheme management → Browser data stores: persists schemes (evidence: `components/indexor_management.mjs`)
- Tabs and preview controls → Browser data stores: persists UI settings (evidence: `ui.mjs`)
- App orchestration → Application menus: renders menus (evidence: `main.mjs`)
- App orchestration → JSON tree and preview: saves or closes file (evidence: `main.mjs`)
- JSON tree and preview → Local JSON file: writes JSON (evidence: `tree.mjs`)
- User → Help and cache setup: requests offline cache (evidence: `helper.mjs`)
- Help and cache setup → Offline service worker: registers worker (evidence: `helper.mjs`)
