# somagaribhanuprakash-sbp/owasp-llm-top10-2026 architecture

> Architecture diagram of the GitHub repository somagaribhanuprakash-sbp/owasp-llm-top10-2026, 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/somagaribhanuprakash-sbp/owasp-llm-top10-2026
- Repository: https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026

## Overview

This is a local OWASP LLM security-auditing web lab. A browser user submits chat prompts or selects a security lab; FastAPI renders the interface, routes requests to the chat or lab logic, and chat requests reach the local Qwen model through Ollama. The main application integrates demonstrations for LLM01–LLM10, while a separate script runs the direct LLM01 prompt-injection test. The README documents the full risk coverage; unsampled template and lab internals are represented only at the documented subsystem level.

Main entry points: [`app/main.py`](https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/main.py) (FastAPI Application), [`app/llm.py`](https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/llm.py) (LLM Client), [`labs/LLM01_prompt_injection.py`](https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/labs/LLM01_prompt_injection.py) (LLM01 Test Script), [`app/templates/index.html`](https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/templates/index.html) (Audit Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Web Interface"]
  node_dashboard["Audit Dashboard<br/>[index.html]"]
end

subgraph group_application["Application Runtime"]
  node_web_app["FastAPI Application<br/>[main.py]"]
  node_lab_engine["LLM01–10 Labs<br/>[main.py]"]
  node_prompt_injection_script["LLM01 Test Script"]
end

subgraph group_inference["Local Inference"]
  node_llm_client["LLM Client<br/>[llm.py]"]
  node_ollama["Ollama Runtime"]
  node_qwen["Qwen3:4B Model"]
end

node_browser(("Browser User"))

node_browser -->|"submits requests"| node_web_app
node_web_app -->|"renders template"| node_dashboard
node_web_app -->|"calls chat"| node_llm_client
node_web_app -->|"dispatches labs"| node_lab_engine
node_prompt_injection_script -->|"calls vulnerable test"| node_llm_client
node_llm_client -->|"sends prompts"| node_ollama
node_ollama -->|"runs model"| node_qwen

click node_dashboard "https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/templates/index.html"
click node_web_app "https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/main.py"
click node_lab_engine "https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/main.py"
click node_prompt_injection_script "https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/labs/LLM01_prompt_injection.py"
click node_llm_client "https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/llm.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_web_app,node_lab_engine,node_prompt_injection_script toneAmber
class node_llm_client,node_ollama,node_qwen toneMint
```

## Components

### Web Interface

- [Audit Dashboard](https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/templates/index.html): `app/templates/index.html`

### Application Runtime

- [FastAPI Application](https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/main.py): `app/main.py`
- [LLM01–10 Labs](https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/main.py): `app/main.py`
- [LLM01 Test Script](https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/labs/LLM01_prompt_injection.py): `labs/LLM01_prompt_injection.py`

### Local Inference

- [LLM Client](https://github.com/somagaribhanuprakash-sbp/owasp-llm-top10-2026/blob/main/app/llm.py): `app/llm.py`
- **Ollama Runtime**
- **Qwen3:4B Model**

### Other components

- **Browser User**

## Connections

- Browser User → FastAPI Application: submits requests (evidence: `README.md`)
- FastAPI Application → Audit Dashboard: renders template (evidence: `app/main.py`)
- FastAPI Application → LLM Client: calls chat (evidence: `app/main.py`)
- FastAPI Application → LLM01–10 Labs: dispatches labs (evidence: `app/main.py`)
- LLM01 Test Script → LLM Client: calls vulnerable test (evidence: `labs/LLM01_prompt_injection.py`)
- LLM Client → Ollama Runtime: sends prompts (evidence: `app/llm.py`)
- Ollama Runtime → Qwen3:4B Model: runs model (evidence: `README.md`)
