# pradeepdev07/ideogram-bbox-editor architecture

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

- Interactive diagram: https://gitdiagram.com/pradeepdev07/ideogram-bbox-editor
- Repository: https://github.com/pradeepdev07/ideogram-bbox-editor

## Overview

Ideogram BBox Editor is a browser-based visual editor for constructing Ideogram 4 prompts. The main workflow is to draw and describe canvas regions, set global image style, then serialize and copy or export the resulting JSON. Users can also start from templates or generate/deconstruct compositions with optional AI. The graph reflects documented capabilities and the sampled imports/calls; unsampled component internals are represented at their exact paths, so their internal connections are omitted where not evidenced.

Main entry points: [`src/App.jsx`](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/App.jsx) (Application shell), [`src/store.jsx`](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/store.jsx) (Editor state), [`src/ai.js`](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/ai.js) (AI backend), [`src/components/VisionDeconstructModal.jsx`](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/VisionDeconstructModal.jsx) (Image deconstruction)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_editing["Prompt editing"]
  node_app["Application shell<br/>[App.jsx]"]
  node_toolbar["Toolbar<br/>[Toolbar.jsx]"]
  node_toolbox["Drawing tools<br/>[Toolbox.jsx]"]
  node_canvas["BBox canvas<br/>[Canvas.jsx]"]
  node_properties["Element properties"]
  node_global["Global style<br/>[GlobalPanel.jsx]"]
  node_rightpanel["Right panel<br/>[RightPanel.jsx]"]
  node_palette["Color palettes<br/>[ColorPalette.jsx]"]
  node_json["JSON panel<br/>[JsonPanel.jsx]"]
  node_import["Prompt import<br/>[ImportModal.jsx]"]
end

subgraph group_ai["AI workflows"]
  node_aihook["Prompt orchestration<br/>[useMagicPrompt.js]"]
  node_generate["Text generation<br/>[GenerateView.jsx]"]
  node_vision["Image deconstruction"]
  node_settings["AI settings<br/>[SettingsModal.jsx]"]
  node_aibackend["AI backend<br/>[ai.js]"]
end

subgraph group_library["Templates and palettes"]
  node_gallery["Template gallery"]
  node_libraryview["Template library<br/>[LibraryView.jsx]"]
  node_storage[("Template storage<br/>[templateStorage.js]")]
  node_thumbnail["Template thumbnail"]
  node_preset["Palette presets"]
  node_colorutils["Color utilities<br/>[colorUtils.js]"]
  node_inspirations["Sample inspirations"]
end

subgraph group_core["State and serialization"]
  node_state["Editor state<br/>[store.jsx]"]
end

node_user(("User"))
node_ollama{{"Ollama"}}
node_cloud{{"Cloud providers"}}

node_user -->|"edits prompts"| node_app
node_app -->|"provides state"| node_state
node_app -->|"renders"| node_toolbar
node_app -->|"renders"| node_toolbox
node_app -->|"renders"| node_canvas
node_app -->|"renders"| node_rightpanel
node_app -->|"renders"| node_json
node_app -->|"opens"| node_gallery
node_app -->|"switches to"| node_libraryview
node_app -->|"switches to"| node_generate
node_app -->|"opens"| node_vision
node_app -->|"opens"| node_settings
node_toolbar -->|"dispatches edits"| node_state
node_toolbox -->|"dispatches edits"| node_state
node_canvas -->|"dispatches boxes"| node_state
node_rightpanel -->|"renders"| node_properties
node_rightpanel -->|"renders"| node_global
node_properties -->|"updates elements"| node_state
node_global -->|"updates style"| node_state
node_properties -->|"uses"| node_palette
node_global -->|"uses"| node_palette
node_json -->|"serializes prompt"| node_state
node_json -->|"opens"| node_import
node_import -->|"loads prompt"| node_state
node_app -->|"runs magic"| node_aihook
node_aihook -->|"requests generation"| node_aibackend
node_generate -->|"requests generation"| node_aibackend
node_vision -->|"requests analysis"| node_aibackend
node_vision -->|"extracts palette"| node_colorutils
node_vision -->|"uses examples"| node_inspirations
node_vision -->|"loads composition"| node_state
node_settings -->|"configures backend"| node_aibackend
node_aibackend -.->|"calls local API"| node_ollama
node_aibackend -.->|"calls provider API"| node_cloud
node_gallery -->|"loads layout"| node_state
node_libraryview -->|"loads template"| node_state
node_libraryview -->|"manages templates"| node_storage
node_libraryview -->|"renders previews"| node_thumbnail
node_palette -->|"opens presets"| node_preset
node_preset -->|"uses palette data"| node_colorutils

click node_app "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/App.jsx"
click node_toolbar "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/Toolbar.jsx"
click node_toolbox "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/Toolbox.jsx"
click node_canvas "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/Canvas.jsx"
click node_properties "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/PropertiesPanel.jsx"
click node_global "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/GlobalPanel.jsx"
click node_rightpanel "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/RightPanel.jsx"
click node_palette "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/ColorPalette.jsx"
click node_json "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/JsonPanel.jsx"
click node_import "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/ImportModal.jsx"
click node_state "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/store.jsx"
click node_aihook "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/useMagicPrompt.js"
click node_generate "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/GenerateView.jsx"
click node_vision "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/VisionDeconstructModal.jsx"
click node_settings "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/SettingsModal.jsx"
click node_aibackend "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/ai.js"
click node_gallery "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/TemplateGallery.jsx"
click node_libraryview "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/LibraryView.jsx"
click node_storage "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/utils/templateStorage.js"
click node_thumbnail "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/TemplateThumbnail.jsx"
click node_preset "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/PalettePresetModal.jsx"
click node_colorutils "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/utils/colorUtils.js"
click node_inspirations "https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/utils/sampleInspirations.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_app,node_toolbar,node_toolbox,node_canvas,node_properties,node_global,node_rightpanel,node_palette,node_json,node_import,node_user toneBlue
class node_aihook,node_generate,node_vision,node_settings,node_aibackend toneAmber
class node_gallery,node_libraryview,node_storage,node_thumbnail,node_preset,node_colorutils,node_inspirations toneMint
class node_state toneRose
class node_ollama,node_cloud toneIndigo
```

## Components

### Prompt editing

- [Application shell](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/App.jsx): `src/App.jsx`
- [Toolbar](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/Toolbar.jsx): `src/components/Toolbar.jsx`
- [Drawing tools](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/Toolbox.jsx): `src/components/Toolbox.jsx`
- [BBox canvas](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/Canvas.jsx): `src/components/Canvas.jsx`
- [Element properties](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/PropertiesPanel.jsx): `src/components/PropertiesPanel.jsx`
- [Global style](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/GlobalPanel.jsx): `src/components/GlobalPanel.jsx`
- [Right panel](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/RightPanel.jsx): `src/components/RightPanel.jsx`
- [Color palettes](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/ColorPalette.jsx): `src/components/ColorPalette.jsx`
- [JSON panel](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/JsonPanel.jsx): `src/components/JsonPanel.jsx`
- [Prompt import](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/ImportModal.jsx): `src/components/ImportModal.jsx`

### AI workflows

- [Prompt orchestration](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/useMagicPrompt.js): `src/useMagicPrompt.js`
- [Text generation](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/GenerateView.jsx): `src/components/GenerateView.jsx`
- [Image deconstruction](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/VisionDeconstructModal.jsx): `src/components/VisionDeconstructModal.jsx`
- [AI settings](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/SettingsModal.jsx): `src/components/SettingsModal.jsx`
- [AI backend](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/ai.js): `src/ai.js`

### Templates and palettes

- [Template gallery](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/TemplateGallery.jsx): `src/components/TemplateGallery.jsx`
- [Template library](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/LibraryView.jsx): `src/components/LibraryView.jsx`
- [Template storage](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/utils/templateStorage.js): `src/utils/templateStorage.js`
- [Template thumbnail](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/TemplateThumbnail.jsx): `src/components/TemplateThumbnail.jsx`
- [Palette presets](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/components/PalettePresetModal.jsx): `src/components/PalettePresetModal.jsx`
- [Color utilities](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/utils/colorUtils.js): `src/utils/colorUtils.js`
- [Sample inspirations](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/utils/sampleInspirations.js): `src/utils/sampleInspirations.js`

### State and serialization

- [Editor state](https://github.com/pradeepdev07/ideogram-bbox-editor/blob/main/src/store.jsx): `src/store.jsx`

### Other components

- **User**
- **Ollama**
- **Cloud providers**

## Connections

- User → Application shell: edits prompts (evidence: `README.md`)
- Application shell → Editor state: provides state (evidence: `src/App.jsx`)
- Application shell → Toolbar: renders (evidence: `src/App.jsx`)
- Application shell → Drawing tools: renders (evidence: `src/App.jsx`)
- Application shell → BBox canvas: renders (evidence: `src/App.jsx`)
- Application shell → Right panel: renders (evidence: `src/App.jsx`)
- Application shell → JSON panel: renders (evidence: `src/App.jsx`)
- Application shell → Template gallery: opens (evidence: `src/App.jsx`)
- Application shell → Template library: switches to (evidence: `src/App.jsx`)
- Application shell → Text generation: switches to (evidence: `src/App.jsx`)
- Application shell → Image deconstruction: opens (evidence: `src/App.jsx`)
- Application shell → AI settings: opens (evidence: `src/App.jsx`)
- Toolbar → Editor state: dispatches edits (evidence: `src/components/Toolbar.jsx`)
- Drawing tools → Editor state: dispatches edits (evidence: `src/components/Toolbox.jsx`)
- BBox canvas → Editor state: dispatches boxes (evidence: `src/components/Canvas.jsx`)
- Right panel → Element properties: renders (evidence: `src/components/RightPanel.jsx`)
- Right panel → Global style: renders (evidence: `src/components/RightPanel.jsx`)
- Element properties → Editor state: updates elements (evidence: `src/components/PropertiesPanel.jsx`)
- Global style → Editor state: updates style (evidence: `src/components/GlobalPanel.jsx`)
- Element properties → Color palettes: uses (evidence: `src/components/PropertiesPanel.jsx`)
- Global style → Color palettes: uses (evidence: `src/components/GlobalPanel.jsx`)
- JSON panel → Editor state: serializes prompt (evidence: `README.md`)
- JSON panel → Prompt import: opens (evidence: `src/components/JsonPanel.jsx`)
- Prompt import → Editor state: loads prompt (evidence: `src/components/ImportModal.jsx`)
- Application shell → Prompt orchestration: runs magic (evidence: `src/App.jsx`)
- Prompt orchestration → AI backend: requests generation (evidence: `src/useMagicPrompt.js`)
- Text generation → AI backend: requests generation (evidence: `src/components/GenerateView.jsx`)
- Image deconstruction → AI backend: requests analysis (evidence: `src/components/VisionDeconstructModal.jsx`)
- Image deconstruction → Color utilities: extracts palette (evidence: `src/components/VisionDeconstructModal.jsx`)
- Image deconstruction → Sample inspirations: uses examples (evidence: `src/components/VisionDeconstructModal.jsx`)
- Image deconstruction → Editor state: loads composition (evidence: `src/components/VisionDeconstructModal.jsx`)
- AI settings → AI backend: configures backend (evidence: `src/components/SettingsModal.jsx`)
- AI backend → Ollama: calls local API (evidence: `README.md`)
- AI backend → Cloud providers: calls provider API (evidence: `README.md`)
- Template gallery → Editor state: loads layout (evidence: `src/components/TemplateGallery.jsx`)
- Template library → Editor state: loads template (evidence: `src/components/LibraryView.jsx`)
- Template library → Template storage: manages templates (evidence: `src/components/LibraryView.jsx`)
- Template library → Template thumbnail: renders previews (evidence: `src/components/LibraryView.jsx`)
- Color palettes → Palette presets: opens presets (evidence: `src/components/ColorPalette.jsx`)
- Palette presets → Color utilities: uses palette data (evidence: `src/components/PalettePresetModal.jsx`)
