# danilkacrazy/unidiagramai architecture

> Architecture diagram of the GitHub repository danilkacrazy/unidiagramai, 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/danilkacrazy/unidiagramai
- Repository: https://github.com/danilkacrazy/unidiagramai

## Overview

UniDiagramAI is presented as a proposed web assistant that turns Russian- or English-language requests into editable diagrams. The documented workflow runs from chat through an agent orchestrator, optional clarification, JSON structuring and validation, then rendering into an interactive editor; users can iterate and export. The repository tree contains documentation and presentation files, but no application source, so this graph represents README-documented PoC architecture, not verified runtime implementation. Edges are supported by the README; implementation details and actual module paths are unavailable.

Main entry points: [`README.md`](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md) (Interactive editor)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["User interaction"]
  node_chat["Chat interface<br/>[README.md]"]
  node_editor["Interactive editor<br/>[README.md]"]
  node_export["Diagram export<br/>[README.md]"]
end

subgraph group_generation["Diagram generation"]
  node_api["FastAPI entry<br/>[README.md]"]
  node_orchestrator["Agent orchestrator<br/>[README.md]"]
  node_clarifier["Clarification agent<br/>[README.md]"]
  node_structurer["Structuring agent<br/>[README.md]"]
  node_validator["Validation agent<br/>[README.md]"]
  node_renderer["Visualization agent<br/>[README.md]"]
  node_diagram["Diagram JSON<br/>[README.md]"]
end

subgraph group_services["State and services"]
  node_llm{{"LLM providers"}}
  node_qdrant[("Qdrant examples")]
  node_session["Session state<br/>[README.md]"]
  node_browser[("Browser storage")]
end

node_user(("Diagram author"))

node_user -->|"enters request"| node_chat
node_chat -->|"sends request"| node_api
node_api -->|"routes request"| node_orchestrator
node_orchestrator -->|"may clarify"| node_clarifier
node_orchestrator -->|"requests structure"| node_structurer
node_clarifier -->|"asks questions"| node_user
node_structurer -->|"uses model"| node_llm
node_structurer -->|"retrieves examples"| node_qdrant
node_structurer -->|"produces JSON"| node_diagram
node_orchestrator -->|"requests validation"| node_validator
node_validator -->|"checks JSON"| node_diagram
node_orchestrator -->|"requests rendering"| node_renderer
node_renderer -->|"renders JSON"| node_diagram
node_renderer -->|"returns SVG"| node_editor
node_user -->|"edits diagram"| node_editor
node_editor -->|"updates JSON"| node_diagram
node_chat -->|"shares dialogue state"| node_session
node_editor -->|"syncs edits"| node_session
node_session -->|"retains context"| node_orchestrator
node_editor -->|"stores diagram"| node_browser
node_editor -->|"exports image or PDF"| node_export

click node_chat "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_editor "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_export "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_api "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_orchestrator "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_clarifier "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_structurer "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_validator "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_renderer "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_diagram "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"
click node_session "https://github.com/danilkacrazy/unidiagramai/blob/main/README.md"

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_chat,node_editor,node_export toneBlue
class node_api,node_orchestrator,node_clarifier,node_structurer,node_validator,node_renderer,node_diagram toneAmber
class node_llm,node_qdrant,node_session,node_browser toneMint
class node_user toneIndigo
```

## Components

### User interaction

- [Chat interface](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`
- [Interactive editor](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`
- [Diagram export](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`

### Diagram generation

- [FastAPI entry](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`
- [Agent orchestrator](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`
- [Clarification agent](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`
- [Structuring agent](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`
- [Validation agent](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`
- [Visualization agent](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`
- [Diagram JSON](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`

### State and services

- **LLM providers**
- **Qdrant examples**
- [Session state](https://github.com/danilkacrazy/unidiagramai/blob/main/README.md): `README.md`
- **Browser storage**

### Other components

- **Diagram author**

## Connections

- Diagram author → Chat interface: enters request (evidence: `README.md`)
- Chat interface → FastAPI entry: sends request (evidence: `README.md`)
- FastAPI entry → Agent orchestrator: routes request (evidence: `README.md`)
- Agent orchestrator → Clarification agent: may clarify (evidence: `README.md`)
- Agent orchestrator → Structuring agent: requests structure (evidence: `README.md`)
- Clarification agent → Diagram author: asks questions (evidence: `README.md`)
- Structuring agent → LLM providers: uses model (evidence: `README.md`)
- Structuring agent → Qdrant examples: retrieves examples (evidence: `README.md`)
- Structuring agent → Diagram JSON: produces JSON (evidence: `README.md`)
- Agent orchestrator → Validation agent: requests validation (evidence: `README.md`)
- Validation agent → Diagram JSON: checks JSON (evidence: `README.md`)
- Agent orchestrator → Visualization agent: requests rendering (evidence: `README.md`)
- Visualization agent → Diagram JSON: renders JSON (evidence: `README.md`)
- Visualization agent → Interactive editor: returns SVG (evidence: `README.md`)
- Diagram author → Interactive editor: edits diagram (evidence: `README.md`)
- Interactive editor → Diagram JSON: updates JSON (evidence: `README.md`)
- Chat interface → Session state: shares dialogue state (evidence: `README.md`)
- Interactive editor → Session state: syncs edits (evidence: `README.md`)
- Session state → Agent orchestrator: retains context (evidence: `README.md`)
- Interactive editor → Browser storage: stores diagram (evidence: `README.md`)
- Interactive editor → Diagram export: exports image or PDF (evidence: `README.md`)
