# xsukax/xsukax-ai-prompt-generator architecture

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

- Interactive diagram: https://gitdiagram.com/xsukax/xsukax-ai-prompt-generator
- Repository: https://github.com/xsukax/xsukax-ai-prompt-generator

## Overview

This is a single-page, client-side prompt-enhancement application. Users enter a prompt, choose Fast or Advanced mode, and receive a streamed result from a configured Ollama or OpenAI-compatible service; they can then copy it. Configuration is stored in browser localStorage. The repository contains no source excerpts, so relationships below are limited to those explicitly documented in the README; individual implementation details within index.html cannot be verified.

Main entry points: [`index.html`](https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html) (Prompt Generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_app["Prompt Generator<br/>[index.html]"]
node_input["Prompt Input<br/>[index.html]"]
node_modes["Enhancement Modes<br/>[index.html]"]
node_ollama_config["Ollama Configuration<br/>[index.html]"]
node_openai_config["OpenAI Configuration<br/>[index.html]"]
node_settings[("Saved Settings")]
node_ollama["Ollama Service"]
node_openai["OpenAI-Compatible Service"]
node_model_detection["Model Detection<br/>[index.html]"]
node_streaming["Streaming Results<br/>[index.html]"]
node_copy["Copy Result<br/>[index.html]"]

node_user -->|"enters prompt"| node_input
node_user -->|"chooses mode"| node_modes
node_input -->|"provides prompt"| node_app
node_modes -->|"selects enhancement"| node_app
node_user -->|"configures provider"| node_ollama_config
node_user -->|"configures provider"| node_openai_config
node_ollama_config -->|"stores settings"| node_settings
node_openai_config -->|"stores settings"| node_settings
node_app -->|"sends request"| node_ollama
node_app -->|"sends request"| node_openai
node_ollama_config -->|"checks connection"| node_ollama
node_openai_config -->|"checks connection"| node_openai
node_ollama_config -->|"detects models"| node_model_detection
node_model_detection -->|"queries available models"| node_ollama
node_ollama -->|"streams response"| node_streaming
node_openai -->|"streams response"| node_streaming
node_streaming -->|"displays result"| node_app
node_user -->|"copies result"| node_copy
node_copy -->|"confirms copy"| node_user

click node_app "https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html"
click node_input "https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html"
click node_modes "https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html"
click node_ollama_config "https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html"
click node_openai_config "https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html"
click node_model_detection "https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html"
click node_streaming "https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html"
click node_copy "https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html"

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_user toneBlue
class node_app,node_input,node_modes,node_ollama_config,node_openai_config,node_streaming,node_copy toneTeal
class node_settings toneAmber
class node_ollama,node_openai,node_model_detection toneIndigo
```

## Components

### Other components

- **User**
- [Prompt Generator](https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html): `index.html`
- [Prompt Input](https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html): `index.html`
- [Enhancement Modes](https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html): `index.html`
- [Ollama Configuration](https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html): `index.html`
- [OpenAI Configuration](https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html): `index.html`
- **Saved Settings**
- **Ollama Service**
- **OpenAI-Compatible Service**
- [Model Detection](https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html): `index.html`
- [Streaming Results](https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html): `index.html`
- [Copy Result](https://github.com/xsukax/xsukax-ai-prompt-generator/blob/main/index.html): `index.html`

## Connections

- User → Prompt Input: enters prompt (evidence: `README.md`)
- User → Enhancement Modes: chooses mode (evidence: `README.md`)
- Prompt Input → Prompt Generator: provides prompt (evidence: `README.md`)
- Enhancement Modes → Prompt Generator: selects enhancement (evidence: `README.md`)
- User → Ollama Configuration: configures provider (evidence: `README.md`)
- User → OpenAI Configuration: configures provider (evidence: `README.md`)
- Ollama Configuration → Saved Settings: stores settings (evidence: `README.md`)
- OpenAI Configuration → Saved Settings: stores settings (evidence: `README.md`)
- Prompt Generator → Ollama Service: sends request (evidence: `README.md`)
- Prompt Generator → OpenAI-Compatible Service: sends request (evidence: `README.md`)
- Ollama Configuration → Ollama Service: checks connection (evidence: `README.md`)
- OpenAI Configuration → OpenAI-Compatible Service: checks connection (evidence: `README.md`)
- Ollama Configuration → Model Detection: detects models (evidence: `README.md`)
- Model Detection → Ollama Service: queries available models (evidence: `README.md`)
- Ollama Service → Streaming Results: streams response (evidence: `README.md`)
- OpenAI-Compatible Service → Streaming Results: streams response (evidence: `README.md`)
- Streaming Results → Prompt Generator: displays result (evidence: `README.md`)
- User → Copy Result: copies result (evidence: `README.md`)
- Copy Result → User: confirms copy (evidence: `README.md`)
