# neon-sparks/comfyui-neonsstyleexplorer architecture

> Architecture diagram of the GitHub repository neon-sparks/comfyui-neonsstyleexplorer, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/neon-sparks/comfyui-neonsstyleexplorer
- Repository: https://github.com/neon-sparks/comfyui-neonsstyleexplorer

## Overview

Neons Style Explorer is a ComfyUI custom-node product for composing catalog-based style prompts and managing image previews for styles, LoRAs, and checkpoints. The main workflow runs from node inputs through style selection and prompt composition to ComfyUI output; users can also browse/edit catalogs and save generated images into galleries. The graph preserves the documented named-catalog, crawl, and asset-explorer branches. Some backend routes and runtime details were not sampled, so uncertain links are omitted or marked dashed.

Main entry points: [`nodes.py`](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/nodes.py) (Style nodes), [`__init__.py`](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/__init__.py) (HTTP routes), [`web/api.js`](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/api.js) (Browser API), [`web/main.js`](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/main.js) (Node integration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_prompt["Style prompting"]
  node_style_nodes["Style nodes<br/>[nodes.py]"]
  node_composition["Prompt composition<br/>[compose.py]"]
  node_run_tracking["Run tracking<br/>[runs.py]"]
end

subgraph group_catalog["Catalog and gallery"]
  node_catalog_data["Style catalog<br/>[catalog.py]"]
  node_user_edits[("Catalog edits<br/>[store.py]")]
  node_named_catalogs[("Named catalogs<br/>[catalogs.py]")]
  node_style_gallery["Style previews<br/>[gallery.py]"]
  node_gallery_capture["Gallery capture<br/>[nodes.py]"]
  node_catalog_bundles["Catalog bundles<br/>[bundle.py]"]
end

subgraph group_assets["Asset explorers"]
  node_asset_gallery["Asset galleries<br/>[assets.py]"]
  node_lora_loader["LoRA explorer<br/>[loras.py]"]
  node_model_loader["Model explorer<br/>[models.py]"]
end

subgraph group_interface["ComfyUI interface"]
  node_web_main["Node integration<br/>[main.js]"]
  node_web_panel["Node panel<br/>[panel.js]"]
  node_catalog_browser["Catalog browser<br/>[catalog_ui.js]"]
  node_asset_browser["Asset browser<br/>[explorer.js]"]
  node_web_api["Browser API<br/>[api.js]"]
  node_http_routes["HTTP routes<br/>[__init__.py]"]
end

node_user(("ComfyUI user"))
node_comfyui(("ComfyUI runtime"))

node_user -.->|"sets inputs"| node_style_nodes
node_style_nodes -.->|"composes prompt"| node_composition
node_style_nodes -->|"selects styles"| node_catalog_data
node_style_nodes -->|"reads previews"| node_style_gallery
node_style_nodes -->|"loads LoRAs"| node_lora_loader
node_style_nodes -->|"loads models"| node_model_loader
node_style_nodes -.->|"returns node outputs"| node_comfyui
node_catalog_data -->|"applies edits"| node_user_edits
node_gallery_capture -.->|"saves previews"| node_style_gallery
node_user -.->|"captures result"| node_gallery_capture
node_named_catalogs -.->|"separates previews"| node_style_gallery
node_catalog_bundles -->|"packages catalog"| node_catalog_data
node_asset_gallery -.->|"serves gallery"| node_lora_loader
node_asset_gallery -.->|"serves gallery"| node_model_loader
node_web_main -->|"loads data"| node_web_api
node_web_main -->|"attaches panel"| node_web_panel
node_web_panel -->|"opens browser"| node_catalog_browser
node_web_panel -->|"requests operations"| node_web_api
node_catalog_browser -->|"requests catalog"| node_web_api
node_asset_browser -.->|"requests assets"| node_web_api
node_web_api -.->|"calls routes"| node_http_routes
node_http_routes -.->|"serves catalog"| node_catalog_data
node_http_routes -.->|"updates catalogs"| node_named_catalogs
node_http_routes -.->|"saves images"| node_style_gallery
node_http_routes -.->|"saves asset images"| node_asset_gallery
node_web_main -->|"records runs"| node_run_tracking
node_user -.->|"uses interface"| node_web_main
node_lora_loader -.->|"provides loader outputs"| node_comfyui
node_model_loader -.->|"provides loader outputs"| node_comfyui

click node_style_nodes "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/nodes.py"
click node_composition "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/compose.py"
click node_catalog_data "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/catalog.py"
click node_user_edits "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/store.py"
click node_named_catalogs "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/catalogs.py"
click node_style_gallery "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/gallery.py"
click node_gallery_capture "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/nodes.py"
click node_catalog_bundles "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/bundle.py"
click node_asset_gallery "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/assets.py"
click node_lora_loader "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/loras.py"
click node_model_loader "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/models.py"
click node_run_tracking "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/runs.py"
click node_web_main "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/main.js"
click node_web_panel "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/panel.js"
click node_catalog_browser "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/catalog_ui.js"
click node_asset_browser "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/explorer.js"
click node_web_api "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/api.js"
click node_http_routes "https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/__init__.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_style_nodes,node_composition,node_run_tracking,node_user,node_comfyui toneBlue
class node_catalog_data,node_user_edits,node_named_catalogs,node_style_gallery,node_gallery_capture,node_catalog_bundles toneAmber
class node_asset_gallery,node_lora_loader,node_model_loader toneMint
class node_web_main,node_web_panel,node_catalog_browser,node_asset_browser,node_web_api,node_http_routes toneRose
```

## Components

### Style prompting

- [Style nodes](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/nodes.py): `nodes.py`
- [Prompt composition](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/compose.py): `compose.py`
- [Run tracking](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/runs.py): `runs.py`

### Catalog and gallery

- [Style catalog](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/catalog.py): `catalog.py`
- [Catalog edits](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/store.py): `store.py`
- [Named catalogs](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/catalogs.py): `catalogs.py`
- [Style previews](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/gallery.py): `gallery.py`
- [Gallery capture](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/nodes.py): `nodes.py`
- [Catalog bundles](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/bundle.py): `bundle.py`

### Asset explorers

- [Asset galleries](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/assets.py): `assets.py`
- [LoRA explorer](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/loras.py): `loras.py`
- [Model explorer](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/models.py): `models.py`

### ComfyUI interface

- [Node integration](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/main.js): `web/main.js`
- [Node panel](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/panel.js): `web/panel.js`
- [Catalog browser](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/catalog_ui.js): `web/catalog_ui.js`
- [Asset browser](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/explorer.js): `web/explorer.js`
- [Browser API](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/web/api.js): `web/api.js`
- [HTTP routes](https://github.com/neon-sparks/comfyui-neonsstyleexplorer/blob/main/__init__.py): `__init__.py`

### Other components

- **ComfyUI user**
- **ComfyUI runtime**

## Connections

- ComfyUI user → Style nodes: sets inputs (evidence: `README.md`)
- Style nodes → Prompt composition: composes prompt (evidence: `nodes.py`)
- Style nodes → Style catalog: selects styles (evidence: `nodes.py`)
- Style nodes → Style previews: reads previews (evidence: `nodes.py`)
- Style nodes → LoRA explorer: loads LoRAs (evidence: `nodes.py`)
- Style nodes → Model explorer: loads models (evidence: `nodes.py`)
- Style nodes → ComfyUI runtime: returns node outputs (evidence: `README.md`)
- Style catalog → Catalog edits: applies edits (evidence: `catalog.py`)
- Gallery capture → Style previews: saves previews (evidence: `README.md`)
- ComfyUI user → Gallery capture: captures result (evidence: `README.md`)
- Named catalogs → Style previews: separates previews (evidence: `README.md`)
- Catalog bundles → Style catalog: packages catalog (evidence: `bundle.py`)
- Asset galleries → LoRA explorer: serves gallery (evidence: `README.md`)
- Asset galleries → Model explorer: serves gallery (evidence: `README.md`)
- Node integration → Browser API: loads data (evidence: `web/main.js`)
- Node integration → Node panel: attaches panel (evidence: `web/main.js`)
- Node panel → Catalog browser: opens browser (evidence: `web/panel.js`)
- Node panel → Browser API: requests operations (evidence: `web/panel.js`)
- Catalog browser → Browser API: requests catalog (evidence: `web/catalog_ui.js`)
- Asset browser → Browser API: requests assets (evidence: `web/explorer.js`)
- Browser API → HTTP routes: calls routes
- HTTP routes → Style catalog: serves catalog (evidence: `__init__.py`)
- HTTP routes → Named catalogs: updates catalogs (evidence: `__init__.py`)
- HTTP routes → Style previews: saves images (evidence: `__init__.py`)
- HTTP routes → Asset galleries: saves asset images (evidence: `__init__.py`)
- Node integration → Run tracking: records runs (evidence: `web/main.js`)
- ComfyUI user → Node integration: uses interface (evidence: `README.md`)
- LoRA explorer → ComfyUI runtime: provides loader outputs (evidence: `README.md`)
- Model explorer → ComfyUI runtime: provides loader outputs (evidence: `README.md`)
