# vigozhao/ai-visual-prompt-cookbook architecture

> Architecture diagram of the GitHub repository vigozhao/ai-visual-prompt-cookbook, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-05). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vigozhao/ai-visual-prompt-cookbook
- Repository: https://github.com/vigozhao/ai-visual-prompt-cookbook

## Overview

AI Visual Prompt Cookbook is a curated library of reusable JSON image-style systems, with a static gallery for discovering and copying them. The main user journey is browse or filter styles, inspect a style and its variables/examples, copy its JSON into an image-capable LLM, supply values, and generate an image prompt/result. The repository also builds searchable gallery data and crawlable style pages. Evidence is limited to the README and sampled excerpts; some browser-to-data wiring and unsampled page-generation details are not shown.

Main entry points: [`scripts/build-pages-mvp.py`](https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/scripts/build-pages-mvp.py) (Gallery Builder), [`styles`](https://github.com/vigozhao/ai-visual-prompt-cookbook/tree/main/styles) (Style JSON Library), [`site/app.js`](https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/site/app.js) (Gallery UI), [`site/styles-data.js`](https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/site/styles-data.js) (Gallery Style Data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_catalog["Style Catalog"]
  node_styles["Style JSON Library"]
  node_previews["Style Previews"]
  node_readme["README Catalog<br/>[README.md]"]
end

subgraph group_gallery["Gallery Experience"]
  node_galleryapp["Gallery UI<br/>[app.js]"]
  node_gallerydata["Gallery Style Data<br/>[styles-data.js]"]
  node_stylepages["Style Detail Pages"]
end

subgraph group_sitegen["Gallery Generation"]
  node_builder["Gallery Builder<br/>[build-pages-mvp.py]"]
  node_searchterms["Search Vocabulary<br/>[search_terms.py]"]
  node_seopages["SEO Page Generator<br/>[seo_pages.py]"]
end

subgraph group_promptuse["Prompt Workflow"]
  node_userstyles["User Values"]
end

node_visitor(("Visitor"))
node_llm{{"Image-capable LLM"}}
node_image["Generated Image"]

node_visitor -->|"browses"| node_readme
node_visitor -->|"browses"| node_galleryapp
node_builder -->|"uses vocabulary"| node_searchterms
node_builder -->|"calls generator"| node_seopages
node_visitor -->|"copies JSON"| node_styles
node_visitor -->|"provides values"| node_userstyles
node_styles -->|"supplies style"| node_llm
node_userstyles -->|"fills variables"| node_llm
node_llm -->|"generates"| node_image
node_galleryapp -.->|"reads data"| node_gallerydata
node_galleryapp -.->|"opens details"| node_stylepages
node_builder -.->|"produces data"| node_gallerydata
node_builder -.->|"generates pages"| node_stylepages
node_styles -.->|"paired with previews"| node_previews

click node_styles "https://github.com/vigozhao/ai-visual-prompt-cookbook/tree/main/styles"
click node_previews "https://github.com/vigozhao/ai-visual-prompt-cookbook/tree/main/styles"
click node_readme "https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/README.md"
click node_galleryapp "https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/site/app.js"
click node_gallerydata "https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/site/styles-data.js"
click node_stylepages "https://github.com/vigozhao/ai-visual-prompt-cookbook/tree/main/site/styles"
click node_builder "https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/scripts/build-pages-mvp.py"
click node_searchterms "https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/scripts/search_terms.py"
click node_seopages "https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/scripts/seo_pages.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_styles,node_previews,node_readme toneBlue
class node_galleryapp,node_gallerydata,node_stylepages toneAmber
class node_builder,node_searchterms,node_seopages toneMint
class node_userstyles toneRose
class node_visitor,node_llm,node_image toneIndigo
```

## Components

### Style Catalog

- [Style JSON Library](https://github.com/vigozhao/ai-visual-prompt-cookbook/tree/main/styles): `styles`
- [Style Previews](https://github.com/vigozhao/ai-visual-prompt-cookbook/tree/main/styles): `styles`
- [README Catalog](https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/README.md): `README.md`

### Gallery Experience

- [Gallery UI](https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/site/app.js): `site/app.js`
- [Gallery Style Data](https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/site/styles-data.js): `site/styles-data.js`
- [Style Detail Pages](https://github.com/vigozhao/ai-visual-prompt-cookbook/tree/main/site/styles): `site/styles`

### Gallery Generation

- [Gallery Builder](https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/scripts/build-pages-mvp.py): `scripts/build-pages-mvp.py`
- [Search Vocabulary](https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/scripts/search_terms.py): `scripts/search_terms.py`
- [SEO Page Generator](https://github.com/vigozhao/ai-visual-prompt-cookbook/blob/main/scripts/seo_pages.py): `scripts/seo_pages.py`

### Prompt Workflow

- **User Values**

### Other components

- **Visitor**
- **Image-capable LLM**
- **Generated Image**

## Connections

- Visitor → README Catalog: browses (evidence: `README.md`)
- Visitor → Gallery UI: browses (evidence: `README.md`)
- Gallery Builder → Search Vocabulary: uses vocabulary (evidence: `scripts/build-pages-mvp.py`)
- Gallery Builder → SEO Page Generator: calls generator (evidence: `scripts/build-pages-mvp.py`)
- Visitor → Style JSON Library: copies JSON (evidence: `README.md`)
- Visitor → User Values: provides values (evidence: `README.md`)
- Style JSON Library → Image-capable LLM: supplies style (evidence: `README.md`)
- User Values → Image-capable LLM: fills variables (evidence: `README.md`)
- Image-capable LLM → Generated Image: generates (evidence: `README.md`)
- Gallery UI → Gallery Style Data: reads data
- Gallery UI → Style Detail Pages: opens details
- Gallery Builder → Gallery Style Data: produces data
- Gallery Builder → Style Detail Pages: generates pages
- Style JSON Library → Style Previews: paired with previews
