# amir89hamzah/aidesk-llm-ticketing-system architecture

> Architecture diagram of the GitHub repository amir89hamzah/aidesk-llm-ticketing-system, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/amir89hamzah/aidesk-llm-ticketing-system
- Repository: https://github.com/amir89hamzah/aidesk-llm-ticketing-system

## Overview

AIDesk is a documented, production-deployed conversational ticketing workflow. Engineers chat with it to get general help, create or modify tickets after OTP verification, or search existing tickets; the Flowise workflow routes requests and coordinates language models, email, and Google Sheets-backed operations. The repository contains architecture documentation and a redacted Flowise export, not application source, so the graph reflects documented relationships only.

Main entry points: [`flowise/exported-flow-redacted.json`](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json) (Intent router), [`docs/architecture.md`](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docs/architecture.md) (Apps Script webhook), [`docker-compose.example.yml`](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docker-compose.example.yml) (Docker / VPS), [`docs/deployment-notes.md`](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docs/deployment-notes.md) (Nginx HTTPS proxy)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interaction["Chat and routing"]
  node_chat["Chat UI<br/>[architecture.md]"]
  node_flow["Flowise Agent Flow"]
  node_router["Intent router"]
  node_general["General help"]
end

subgraph group_ticketing["Ticket workflows"]
  node_create["Create workflow"]
  node_extract["Field extraction"]
  node_validate["Field validation"]
  node_otpgen["OTP generation"]
  node_modify["Modify workflow"]
  node_search["Search workflow"]
  node_verify["OTP verification"]
  node_responder["Search responder"]
end

subgraph group_integrations["External services"]
  node_openai["OpenAI models"]
  node_smtp["SMTP relay"]
  node_gas["Apps Script webhook<br/>[architecture.md]"]
  node_sheets[("Google Sheets")]
end

subgraph group_operations["Deployment"]
  node_nginx["Nginx HTTPS proxy"]
  node_docker["Docker / VPS"]
end

node_engineer(("Engineer"))
node_email(("Engineer email"))

node_engineer -->|"sends request"| node_chat
node_chat -->|"forwards chat"| node_flow
node_flow -->|"dispatches to"| node_router
node_router -->|"classifies with"| node_openai
node_router -->|"routes help"| node_general
node_router -->|"routes create"| node_create
node_router -->|"routes edit"| node_modify
node_router -->|"routes search"| node_search
node_router -->|"routes OTP"| node_verify
node_create -->|"extracts fields"| node_extract
node_extract -->|"uses mini model"| node_openai
node_create -->|"checks fields"| node_validate
node_validate -->|"requests OTP"| node_otpgen
node_otpgen -->|"sends OTP"| node_smtp
node_smtp -->|"delivers email"| node_email
node_verify -->|"submits create"| node_gas
node_verify -->|"submits modify"| node_gas
node_modify -->|"requires OTP"| node_verify
node_search -->|"requests records"| node_gas
node_gas -->|"reads or writes"| node_sheets
node_search -->|"summarizes results"| node_responder
node_responder -->|"generates response"| node_openai
node_flow -->|"served behind"| node_nginx
node_docker -->|"hosts runtime"| node_flow

click node_chat "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docs/architecture.md"
click node_flow "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_router "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_general "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_create "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_extract "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_validate "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_otpgen "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_modify "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_search "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_verify "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_responder "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json"
click node_gas "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docs/architecture.md"
click node_nginx "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docs/deployment-notes.md"
click node_docker "https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docker-compose.example.yml"

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_flow,node_router,node_general toneBlue
class node_create,node_extract,node_validate,node_otpgen,node_modify,node_search,node_verify,node_responder toneAmber
class node_openai,node_smtp,node_gas,node_sheets toneMint
class node_nginx,node_docker toneRose
class node_engineer,node_email toneIndigo
```

## Components

### Chat and routing

- [Chat UI](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docs/architecture.md): `docs/architecture.md`
- [Flowise Agent Flow](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`
- [Intent router](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`
- [General help](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`

### Ticket workflows

- [Create workflow](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`
- [Field extraction](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`
- [Field validation](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`
- [OTP generation](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`
- [Modify workflow](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`
- [Search workflow](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`
- [OTP verification](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`
- [Search responder](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/flowise/exported-flow-redacted.json): `flowise/exported-flow-redacted.json`

### External services

- **OpenAI models**
- **SMTP relay**
- [Apps Script webhook](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docs/architecture.md): `docs/architecture.md`
- **Google Sheets**

### Deployment

- [Nginx HTTPS proxy](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docs/deployment-notes.md): `docs/deployment-notes.md`
- [Docker / VPS](https://github.com/amir89hamzah/aidesk-llm-ticketing-system/blob/main/docker-compose.example.yml): `docker-compose.example.yml`

### Other components

- **Engineer**
- **Engineer email**

## Connections

- Engineer → Chat UI: sends request
- Chat UI → Flowise Agent Flow: forwards chat
- Flowise Agent Flow → Intent router: dispatches to
- Intent router → OpenAI models: classifies with
- Intent router → General help: routes help
- Intent router → Create workflow: routes create
- Intent router → Modify workflow: routes edit
- Intent router → Search workflow: routes search
- Intent router → OTP verification: routes OTP
- Create workflow → Field extraction: extracts fields
- Field extraction → OpenAI models: uses mini model
- Create workflow → Field validation: checks fields
- Field validation → OTP generation: requests OTP
- OTP generation → SMTP relay: sends OTP
- SMTP relay → Engineer email: delivers email
- OTP verification → Apps Script webhook: submits create
- OTP verification → Apps Script webhook: submits modify
- Modify workflow → OTP verification: requires OTP
- Search workflow → Apps Script webhook: requests records
- Apps Script webhook → Google Sheets: reads or writes
- Search workflow → Search responder: summarizes results
- Search responder → OpenAI models: generates response
- Flowise Agent Flow → Nginx HTTPS proxy: served behind
- Docker / VPS → Flowise Agent Flow: hosts runtime
