# sezginpaydas/llm-pulse-visualize architecture

> Architecture diagram of the GitHub repository sezginpaydas/llm-pulse-visualize, 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/sezginpaydas/llm-pulse-visualize
- Repository: https://github.com/sezginpaydas/llm-pulse-visualize

## Overview

Visual LLM Dashboard accepts prompts through a FastAPI backend, streams generation from local Ollama, and broadcasts request, thinking, and output status to connected dashboard clients over WebSockets. The backend and UI are the main internal layers; Ollama is an external inference service. The HTML template was not excerpted, so its specific interactions are not asserted.

Main entry points: [`main.py`](https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py) (Prompt Workflow), [`templates/index.html`](https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/templates/index.html) (Dashboard UI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Dashboard"]
  node_dashboard["Dashboard UI<br/>[index.html]"]
end

subgraph group_backend["Application Backend"]
  node_api["FastAPI Routes<br/>[main.py]"]
  node_prompt["Prompt Workflow<br/>[main.py]"]
  node_request_stage["Request Stage<br/>[main.py]"]
  node_thinking_stage["Thinking Stage<br/>[main.py]"]
  node_output_stage["Output Stage<br/>[main.py]"]
  node_websocket_broadcast["WebSocket Broadcast<br/>[main.py]"]
end

subgraph group_inference["Inference Service"]
  node_ollama["Ollama Inference"]
end

node_browser(("User Browser"))

node_browser -->|"opens dashboard"| node_dashboard
node_api -->|"serves HTML"| node_dashboard
node_dashboard -.->|"submits prompt"| node_api
node_api -->|"routes prompt"| node_prompt
node_prompt -->|"broadcasts request"| node_request_stage
node_prompt -->|"streams generation"| node_ollama
node_prompt -->|"broadcasts thinking"| node_thinking_stage
node_prompt -->|"broadcasts output"| node_output_stage
node_request_stage -->|"sends event"| node_websocket_broadcast
node_thinking_stage -->|"sends event"| node_websocket_broadcast
node_output_stage -->|"sends event"| node_websocket_broadcast
node_websocket_broadcast -.->|"pushes updates"| node_dashboard

click node_dashboard "https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/templates/index.html"
click node_api "https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py"
click node_prompt "https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py"
click node_request_stage "https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py"
click node_thinking_stage "https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py"
click node_output_stage "https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py"
click node_websocket_broadcast "https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.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_dashboard,node_browser toneBlue
class node_api,node_prompt,node_request_stage,node_thinking_stage,node_output_stage,node_websocket_broadcast toneAmber
class node_ollama toneMint
```

## Components

### Dashboard

- [Dashboard UI](https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/templates/index.html): `templates/index.html`

### Application Backend

- [FastAPI Routes](https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py): `main.py`
- [Prompt Workflow](https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py): `main.py`
- [Request Stage](https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py): `main.py`
- [Thinking Stage](https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py): `main.py`
- [Output Stage](https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py): `main.py`
- [WebSocket Broadcast](https://github.com/sezginpaydas/llm-pulse-visualize/blob/main/main.py): `main.py`

### Inference Service

- **Ollama Inference**

### Other components

- **User Browser**

## Connections

- User Browser → Dashboard UI: opens dashboard (evidence: `README.md`)
- FastAPI Routes → Dashboard UI: serves HTML (evidence: `main.py`)
- Dashboard UI → FastAPI Routes: submits prompt
- FastAPI Routes → Prompt Workflow: routes prompt (evidence: `main.py`)
- Prompt Workflow → Request Stage: broadcasts request (evidence: `main.py`)
- Prompt Workflow → Ollama Inference: streams generation (evidence: `main.py`)
- Prompt Workflow → Thinking Stage: broadcasts thinking (evidence: `main.py`)
- Prompt Workflow → Output Stage: broadcasts output (evidence: `main.py`)
- Request Stage → WebSocket Broadcast: sends event (evidence: `main.py`)
- Thinking Stage → WebSocket Broadcast: sends event (evidence: `main.py`)
- Output Stage → WebSocket Broadcast: sends event (evidence: `main.py`)
- WebSocket Broadcast → Dashboard UI: pushes updates
