# jeron-xx/ai-itsm-helpdesk architecture

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

- Interactive diagram: https://gitdiagram.com/jeron-xx/ai-itsm-helpdesk
- Repository: https://github.com/jeron-xx/ai-itsm-helpdesk

## Overview

AI ITSM Helpdesk is a React/FastAPI prototype for employee support. The main flow is issue submission, knowledge retrieval and grounded response, ticket classification/escalation, then ticket persistence, audit logging, and mock ServiceNow incident creation. Separate support-console capabilities cover knowledge browsing, ticket dashboards, software provisioning, audit history, ServiceNow records, and password-reset automation. The README documents the RAG/model and provisioning stages; several modules were not sampled, so those internal links are shown only where the README or excerpts support them.

Main entry points: [`backend/routes/tickets.py`](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/tickets.py) (Ticket Analysis API), [`frontend/src/App.jsx`](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/App.jsx) (Portal Shell), [`backend/main.py`](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/main.py) (FastAPI Application), [`backend/routes/automation.py`](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/automation.py) (Password Reset Automation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_portal["Employee Portal"]
  node_app["Portal Shell<br/>[App.jsx]"]
  node_issue_ui["Issue Submission<br/>[App.jsx]"]
  node_analysis_ui["Ticket Analysis View<br/>[AIAnalysis.jsx]"]
  node_dashboard["ITSM Dashboard<br/>[ITSMDashboard.jsx]"]
  node_knowledge_ui["Knowledge Browser<br/>[KnowledgeBase.jsx]"]
end

subgraph group_ticketing["Ticket Processing"]
  node_ticket_api["Ticket Analysis API<br/>[tickets.py]"]
  node_classification["Ticket Classification<br/>[tickets.py]"]
  node_api_app["FastAPI Application<br/>[main.py]"]
end

subgraph group_knowledge["Knowledge And AI"]
  node_rag["RAG Retrieval<br/>[rag_service.py]"]
  node_knowledge_docs["Knowledge Documents"]
  node_ai_response["Grounded Response<br/>[ai_service.py]"]
  node_knowledge_api["Knowledge API<br/>[knowledge.py]"]
end

subgraph group_operations["Support Operations"]
  node_software_ui["Software Requests UI"]
  node_software_api["Provisioning Workflow"]
  node_automation_ui["Password Reset UI<br/>[AIAnalysis.jsx]"]
  node_automation_api["Password Reset Automation<br/>[automation.py]"]
  node_audit_ui["Audit Log View<br/>[AuditLogs.jsx]"]
  node_audit_api["Audit Logging<br/>[audit_logs.py]"]
  node_servicenow_ui["ServiceNow View<br/>[ServiceNow.jsx]"]
  node_servicenow_api["Mock ServiceNow<br/>[servicenow.py]"]
end

subgraph group_data["Persistence"]
  node_mongo[("MongoDB Collections<br/>[mongodb.py]")]
end

node_employee(("Employee"))

node_employee -->|"uses"| node_app
node_app -->|"renders"| node_issue_ui
node_app -->|"renders"| node_dashboard
node_app -->|"renders"| node_knowledge_ui
node_app -->|"renders"| node_software_ui
node_app -->|"renders"| node_audit_ui
node_app -->|"renders"| node_servicenow_ui
node_issue_ui -->|"submits issue"| node_ticket_api
node_ticket_api -->|"retrieves context"| node_rag
node_rag -->|"searches"| node_knowledge_docs
node_ticket_api -->|"requests response"| node_ai_response
node_ticket_api -->|"classifies"| node_classification
node_ticket_api -->|"stores ticket"| node_mongo
node_ticket_api -->|"records action"| node_audit_api
node_ticket_api -->|"creates incident"| node_servicenow_api
node_ticket_api -->|"returns result"| node_analysis_ui
node_knowledge_ui -.->|"requests knowledge"| node_knowledge_api
node_software_ui -->|"manages requests"| node_software_api
node_software_api -->|"persists workflow"| node_mongo
node_software_api -->|"records actions"| node_audit_api
node_analysis_ui -->|"offers reset"| node_automation_ui
node_automation_ui -->|"requests reset"| node_automation_api
node_automation_api -->|"updates records"| node_mongo
node_automation_api -->|"updates incident"| node_servicenow_api
node_automation_api -->|"records action"| node_audit_api
node_audit_ui -.->|"fetches logs"| node_audit_api
node_servicenow_ui -->|"fetches records"| node_servicenow_api
node_servicenow_api -->|"reads records"| node_mongo
node_api_app -->|"registers route"| node_ticket_api
node_api_app -->|"registers route"| node_knowledge_api
node_api_app -->|"registers route"| node_software_api
node_api_app -->|"registers route"| node_audit_api
node_api_app -->|"registers route"| node_servicenow_api
node_api_app -->|"registers route"| node_automation_api

click node_app "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/App.jsx"
click node_issue_ui "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/App.jsx"
click node_analysis_ui "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/AIAnalysis.jsx"
click node_dashboard "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/ITSMDashboard.jsx"
click node_knowledge_ui "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/KnowledgeBase.jsx"
click node_ticket_api "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/tickets.py"
click node_classification "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/tickets.py"
click node_rag "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/services/rag_service.py"
click node_knowledge_docs "https://github.com/jeron-xx/ai-itsm-helpdesk/tree/main/knowledge"
click node_ai_response "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/services/ai_service.py"
click node_knowledge_api "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/knowledge.py"
click node_software_ui "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/SoftwareRequests.jsx"
click node_software_api "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/software_requests.py"
click node_automation_ui "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/AIAnalysis.jsx"
click node_automation_api "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/automation.py"
click node_audit_ui "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/AuditLogs.jsx"
click node_audit_api "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/audit_logs.py"
click node_servicenow_ui "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/ServiceNow.jsx"
click node_servicenow_api "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/servicenow.py"
click node_api_app "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/main.py"
click node_mongo "https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/database/mongodb.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_app,node_issue_ui,node_analysis_ui,node_dashboard,node_knowledge_ui toneBlue
class node_ticket_api,node_classification,node_api_app toneAmber
class node_rag,node_knowledge_docs,node_ai_response,node_knowledge_api toneMint
class node_software_ui,node_software_api,node_automation_ui,node_automation_api,node_audit_ui,node_audit_api,node_servicenow_ui,node_servicenow_api toneRose
class node_mongo,node_employee toneIndigo
```

## Components

### Employee Portal

- [Portal Shell](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Issue Submission](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Ticket Analysis View](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/AIAnalysis.jsx): `frontend/src/AIAnalysis.jsx`
- [ITSM Dashboard](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/ITSMDashboard.jsx): `frontend/src/ITSMDashboard.jsx`
- [Knowledge Browser](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/KnowledgeBase.jsx): `frontend/src/KnowledgeBase.jsx`

### Ticket Processing

- [Ticket Analysis API](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/tickets.py): `backend/routes/tickets.py`
- [Ticket Classification](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/tickets.py): `backend/routes/tickets.py`
- [FastAPI Application](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/main.py): `backend/main.py`

### Knowledge And AI

- [RAG Retrieval](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/services/rag_service.py): `backend/services/rag_service.py`
- [Knowledge Documents](https://github.com/jeron-xx/ai-itsm-helpdesk/tree/main/knowledge): `knowledge`
- [Grounded Response](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/services/ai_service.py): `backend/services/ai_service.py`
- [Knowledge API](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/knowledge.py): `backend/routes/knowledge.py`

### Support Operations

- [Software Requests UI](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/SoftwareRequests.jsx): `frontend/src/SoftwareRequests.jsx`
- [Provisioning Workflow](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/software_requests.py): `backend/routes/software_requests.py`
- [Password Reset UI](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/AIAnalysis.jsx): `frontend/src/AIAnalysis.jsx`
- [Password Reset Automation](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/automation.py): `backend/routes/automation.py`
- [Audit Log View](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/AuditLogs.jsx): `frontend/src/AuditLogs.jsx`
- [Audit Logging](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/audit_logs.py): `backend/routes/audit_logs.py`
- [ServiceNow View](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/frontend/src/ServiceNow.jsx): `frontend/src/ServiceNow.jsx`
- [Mock ServiceNow](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/routes/servicenow.py): `backend/routes/servicenow.py`

### Persistence

- [MongoDB Collections](https://github.com/jeron-xx/ai-itsm-helpdesk/blob/main/backend/database/mongodb.py): `backend/database/mongodb.py`

### Other components

- **Employee**

## Connections

- Employee → Portal Shell: uses (evidence: `README.md`)
- Portal Shell → Issue Submission: renders (evidence: `frontend/src/App.jsx`)
- Portal Shell → ITSM Dashboard: renders (evidence: `frontend/src/App.jsx`)
- Portal Shell → Knowledge Browser: renders (evidence: `frontend/src/App.jsx`)
- Portal Shell → Software Requests UI: renders (evidence: `frontend/src/App.jsx`)
- Portal Shell → Audit Log View: renders (evidence: `frontend/src/App.jsx`)
- Portal Shell → ServiceNow View: renders (evidence: `frontend/src/App.jsx`)
- Issue Submission → Ticket Analysis API: submits issue (evidence: `frontend/src/App.jsx`)
- Ticket Analysis API → RAG Retrieval: retrieves context (evidence: `backend/routes/tickets.py`)
- RAG Retrieval → Knowledge Documents: searches (evidence: `README.md`)
- Ticket Analysis API → Grounded Response: requests response (evidence: `backend/routes/tickets.py`)
- Ticket Analysis API → Ticket Classification: classifies (evidence: `backend/routes/tickets.py`)
- Ticket Analysis API → MongoDB Collections: stores ticket (evidence: `backend/routes/tickets.py`)
- Ticket Analysis API → Audit Logging: records action (evidence: `backend/routes/tickets.py`)
- Ticket Analysis API → Mock ServiceNow: creates incident (evidence: `backend/routes/tickets.py`)
- Ticket Analysis API → Ticket Analysis View: returns result (evidence: `README.md`)
- Knowledge Browser → Knowledge API: requests knowledge
- Software Requests UI → Provisioning Workflow: manages requests (evidence: `frontend/src/SoftwareRequests.jsx`)
- Provisioning Workflow → MongoDB Collections: persists workflow (evidence: `README.md`)
- Provisioning Workflow → Audit Logging: records actions (evidence: `README.md`)
- Ticket Analysis View → Password Reset UI: offers reset (evidence: `frontend/src/AIAnalysis.jsx`)
- Password Reset UI → Password Reset Automation: requests reset (evidence: `frontend/src/AIAnalysis.jsx`)
- Password Reset Automation → MongoDB Collections: updates records (evidence: `backend/routes/automation.py`)
- Password Reset Automation → Mock ServiceNow: updates incident (evidence: `backend/routes/automation.py`)
- Password Reset Automation → Audit Logging: records action (evidence: `backend/routes/automation.py`)
- Audit Log View → Audit Logging: fetches logs
- ServiceNow View → Mock ServiceNow: fetches records (evidence: `frontend/src/ServiceNow.jsx`)
- Mock ServiceNow → MongoDB Collections: reads records (evidence: `backend/routes/servicenow.py`)
- FastAPI Application → Ticket Analysis API: registers route (evidence: `backend/main.py`)
- FastAPI Application → Knowledge API: registers route (evidence: `backend/main.py`)
- FastAPI Application → Provisioning Workflow: registers route (evidence: `backend/main.py`)
- FastAPI Application → Audit Logging: registers route (evidence: `backend/main.py`)
- FastAPI Application → Mock ServiceNow: registers route (evidence: `backend/main.py`)
- FastAPI Application → Password Reset Automation: registers route (evidence: `backend/main.py`)
