# ganesan11062001/rc-ticket-mate architecture

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

- Interactive diagram: https://gitdiagram.com/ganesan11062001/rc-ticket-mate
- Repository: https://github.com/ganesan11062001/rc-ticket-mate

## Overview

TicketMate drafts grounded replies to Research Computing ServiceNow tickets. A team member launches the app, opens a ticket, requests a draft, reviews it, then edits and saves it; the backend retrieves RC website and rc-docs context from rc-kg before generating and citing the reply. The graph separates ticket interaction, drafting, knowledge-graph construction, retrieval/API, and evaluation. Source-index references and README statements support some links where excerpts are incomplete; unsampled internals are not inferred beyond those references.

Main entry points: [`ticketmate/backend/app/main.py`](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/main.py) (Draft API), [`rc-kg/ingest/run.py`](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/ingest/run.py) (Content ingestion), [`rc-kg/api/app.py`](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/api/app.py) (Retrieval HTTP API), [`rc-kg/retrieval/graphrag.py`](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/retrieval/graphrag.py) (Hybrid GraphRAG)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ticket["Ticket interaction"]
  node_extension["Chrome extension<br/>[content.js]"]
  node_web_ui["Web interface<br/>[app.js]"]
end

subgraph group_draft["Drafting backend"]
  node_backend["Draft API<br/>[main.py]"]
  node_auth["Session auth<br/>[auth.py]"]
  node_prompt["Prompt and models<br/>[prompts.py]"]
  node_llm["LLM client<br/>[llm_client.py]"]
  node_kg_client["Knowledge API client<br/>[kg_client.py]"]
  node_runlog["Run logging<br/>[runlog.py]"]
end

subgraph group_build["Knowledge graph build"]
  node_ingest["Content ingestion<br/>[run.py]"]
  node_wp_ingest["WordPress source<br/>[wp_api.py]"]
  node_docs_ingest["Read the Docs source<br/>[rtd.py]"]
  node_sectioning["Sections and anchors<br/>[sections.py]"]
  node_enrichment["Topic enrichment<br/>[run.py]"]
  node_embeddings["Embedding providers<br/>[embeddings.py]"]
  node_graph_writer["Graph schema and writer<br/>[writer.py]"]
end

subgraph group_serve["Knowledge retrieval"]
  node_neo4j[("Neo4j graph<br/>[connection.py]")]
  node_kg_api["Retrieval HTTP API<br/>[app.py]"]
  node_graph_retrieval["Hybrid GraphRAG<br/>[graphrag.py]"]
  node_citations["Citation rendering<br/>[citations.py]"]
  node_support["Citation support checks<br/>[support.py]"]
end

subgraph group_eval["Evaluation"]
  node_evaluation["Graph and retrieval evaluation<br/>[graph_eval.py]"]
end

node_team_member(("RC team member"))
node_servicenow["ServiceNow ticket"]
node_model_server["vLLM model server"]
node_rc_site["RC website"]
node_rc_docs["RC documentation"]

node_team_member -->|"uses"| node_extension
node_servicenow -->|"opens ticket"| node_extension
node_extension -.->|"requests draft"| node_backend
node_team_member -->|"reviews draft"| node_web_ui
node_web_ui -.->|"uses API"| node_backend
node_backend -->|"authenticates"| node_auth
node_backend -->|"retrieves context"| node_kg_client
node_backend -->|"generates draft"| node_llm
node_llm -->|"uses prompts"| node_prompt
node_llm -->|"calls model"| node_model_server
node_backend -->|"records run"| node_runlog
node_kg_client -->|"calls HTTP API"| node_kg_api
node_ingest -->|"fetches content"| node_wp_ingest
node_ingest -->|"ingests docs"| node_docs_ingest
node_wp_ingest -.->|"fetches pages"| node_rc_site
node_docs_ingest -->|"fetches pages"| node_rc_docs
node_ingest -->|"builds sections"| node_sectioning
node_ingest -->|"writes graph data"| node_graph_writer
node_graph_writer -->|"writes graph"| node_neo4j
node_enrichment -->|"updates graph"| node_neo4j
node_enrichment -->|"embeds sections"| node_embeddings
node_kg_api -->|"retrieves context"| node_graph_retrieval
node_graph_retrieval -->|"embeds query"| node_embeddings
node_graph_retrieval -->|"searches graph"| node_neo4j
node_kg_api -->|"renders citations"| node_citations
node_kg_api -->|"checks support"| node_support
node_evaluation -->|"evaluates retrieval"| node_graph_retrieval

click node_extension "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/extension/content.js"
click node_web_ui "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/web/app.js"
click node_backend "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/main.py"
click node_auth "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/auth.py"
click node_prompt "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/prompts.py"
click node_llm "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/llm_client.py"
click node_kg_client "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/kg_client.py"
click node_runlog "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/runlog.py"
click node_ingest "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/ingest/run.py"
click node_wp_ingest "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/ingest/wp_api.py"
click node_docs_ingest "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/ingest/rtd.py"
click node_sectioning "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/ingest/sections.py"
click node_enrichment "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/enrich/run.py"
click node_embeddings "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/retrieval/embeddings.py"
click node_graph_writer "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/graph/writer.py"
click node_neo4j "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/graph/connection.py"
click node_kg_api "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/api/app.py"
click node_graph_retrieval "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/retrieval/graphrag.py"
click node_citations "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/retrieval/citations.py"
click node_support "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/retrieval/support.py"
click node_evaluation "https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/eval/graph_eval.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_extension,node_web_ui toneBlue
class node_backend,node_auth,node_prompt,node_llm,node_kg_client,node_runlog toneAmber
class node_ingest,node_wp_ingest,node_docs_ingest,node_sectioning,node_enrichment,node_embeddings,node_graph_writer,node_model_server toneMint
class node_neo4j,node_kg_api,node_graph_retrieval,node_citations,node_support toneRose
class node_evaluation,node_team_member,node_servicenow,node_rc_site,node_rc_docs toneIndigo
```

## Components

### Ticket interaction

- [Chrome extension](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/extension/content.js): `ticketmate/extension/content.js`
- [Web interface](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/web/app.js): `ticketmate/backend/web/app.js`

### Drafting backend

- [Draft API](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/main.py): `ticketmate/backend/app/main.py`
- [Session auth](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/auth.py): `ticketmate/backend/app/auth.py`
- [Prompt and models](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/prompts.py): `ticketmate/backend/app/prompts.py`
- [LLM client](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/llm_client.py): `ticketmate/backend/app/llm_client.py`
- [Knowledge API client](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/kg_client.py): `ticketmate/backend/app/kg_client.py`
- [Run logging](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/ticketmate/backend/app/runlog.py): `ticketmate/backend/app/runlog.py`

### Knowledge graph build

- [Content ingestion](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/ingest/run.py): `rc-kg/ingest/run.py`
- [WordPress source](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/ingest/wp_api.py): `rc-kg/ingest/wp_api.py`
- [Read the Docs source](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/ingest/rtd.py): `rc-kg/ingest/rtd.py`
- [Sections and anchors](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/ingest/sections.py): `rc-kg/ingest/sections.py`
- [Topic enrichment](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/enrich/run.py): `rc-kg/enrich/run.py`
- [Embedding providers](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/retrieval/embeddings.py): `rc-kg/retrieval/embeddings.py`
- [Graph schema and writer](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/graph/writer.py): `rc-kg/graph/writer.py`

### Knowledge retrieval

- [Neo4j graph](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/graph/connection.py): `rc-kg/graph/connection.py`
- [Retrieval HTTP API](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/api/app.py): `rc-kg/api/app.py`
- [Hybrid GraphRAG](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/retrieval/graphrag.py): `rc-kg/retrieval/graphrag.py`
- [Citation rendering](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/retrieval/citations.py): `rc-kg/retrieval/citations.py`
- [Citation support checks](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/retrieval/support.py): `rc-kg/retrieval/support.py`

### Evaluation

- [Graph and retrieval evaluation](https://github.com/ganesan11062001/rc-ticket-mate/blob/main/rc-kg/eval/graph_eval.py): `rc-kg/eval/graph_eval.py`

### Other components

- **RC team member**
- **ServiceNow ticket**
- **vLLM model server**
- **RC website**
- **RC documentation**

## Connections

- RC team member → Chrome extension: uses (evidence: `README.md`)
- ServiceNow ticket → Chrome extension: opens ticket (evidence: `README.md`)
- Chrome extension → Draft API: requests draft (evidence: `README.md`)
- RC team member → Web interface: reviews draft (evidence: `README.md`)
- Web interface → Draft API: uses API (evidence: `README.md`)
- Draft API → Session auth: authenticates (evidence: `ticketmate/backend/app/main.py`)
- Draft API → Knowledge API client: retrieves context (evidence: `ticketmate/backend/app/main.py`)
- Draft API → LLM client: generates draft (evidence: `ticketmate/backend/app/main.py`)
- LLM client → Prompt and models: uses prompts (evidence: `ticketmate/backend/app/llm_client.py`)
- LLM client → vLLM model server: calls model (evidence: `ticketmate/backend/app/llm_client.py`)
- Draft API → Run logging: records run (evidence: `ticketmate/backend/app/main.py`)
- Knowledge API client → Retrieval HTTP API: calls HTTP API (evidence: `README.md`)
- Content ingestion → WordPress source: fetches content (evidence: `rc-kg/ingest/run.py`)
- Content ingestion → Read the Docs source: ingests docs (evidence: `rc-kg/ingest/run.py`)
- WordPress source → RC website: fetches pages
- Read the Docs source → RC documentation: fetches pages (evidence: `rc-kg/ingest/rtd.py`)
- Content ingestion → Sections and anchors: builds sections (evidence: `rc-kg/ingest/run.py`)
- Content ingestion → Graph schema and writer: writes graph data (evidence: `rc-kg/ingest/run.py`)
- Graph schema and writer → Neo4j graph: writes graph (evidence: `rc-kg/graph/writer.py`)
- Topic enrichment → Neo4j graph: updates graph (evidence: `rc-kg/enrich/run.py`)
- Topic enrichment → Embedding providers: embeds sections (evidence: `rc-kg/enrich/run.py`)
- Retrieval HTTP API → Hybrid GraphRAG: retrieves context (evidence: `rc-kg/api/app.py`)
- Hybrid GraphRAG → Embedding providers: embeds query (evidence: `rc-kg/retrieval/graphrag.py`)
- Hybrid GraphRAG → Neo4j graph: searches graph (evidence: `rc-kg/retrieval/graphrag.py`)
- Retrieval HTTP API → Citation rendering: renders citations (evidence: `rc-kg/api/app.py`)
- Retrieval HTTP API → Citation support checks: checks support (evidence: `rc-kg/api/app.py`)
- Graph and retrieval evaluation → Hybrid GraphRAG: evaluates retrieval
