# haricrazy1432-bot/itops architecture

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

- Interactive diagram: https://gitdiagram.com/haricrazy1432-bot/itops
- Repository: https://github.com/haricrazy1432-bot/itops

## Overview

ITOPS handles software-install requests: users submit requests through an HTTP endpoint, which creates a ServiceNow ticket and records request details locally. Supervisors use bot commands to approve or reject tickets, or trigger Rundeck installation; installation completion updates both the ServiceNow ticket and local request status. The graph separates intake, supervisor actions, persistence, and the ServiceNow and Rundeck integrations. Relationships are limited to calls shown in the excerpts; the README provides no additional capability details.

Main entry points: [`bot/app.py`](https://github.com/haricrazy1432-bot/itops/blob/main/bot/app.py) (Bot commands), [`mcp/server.py`](https://github.com/haricrazy1432-bot/itops/blob/main/mcp/server.py) (ServiceNow API), [`mcp/servicenow_client.py`](https://github.com/haricrazy1432-bot/itops/blob/main/mcp/servicenow_client.py) (ServiceNow client), [`bot/rundeck_client.py`](https://github.com/haricrazy1432-bot/itops/blob/main/bot/rundeck_client.py) (Rundeck client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_intake["Request intake"]
  node_request_intake["Request intake<br/>[app.py]"]
end

subgraph group_operations["Supervisor operations"]
  node_bot_commands["Bot commands<br/>[app.py]"]
end

subgraph group_records["Request records"]
  node_request_db[("Request database<br/>[software.db]")]
end

subgraph group_integrations["External integrations"]
  node_mcp_api["ServiceNow API<br/>[server.py]"]
  node_sn_client["ServiceNow client"]
  node_servicenow["ServiceNow"]
  node_rundeck_client["Rundeck client<br/>[rundeck_client.py]"]
  node_rundeck["Rundeck"]
end

node_requester(("Software requester"))
node_supervisor(("Supervisor"))

node_requester -->|"submits request"| node_request_intake
node_supervisor -->|"sends commands"| node_bot_commands
node_request_intake -->|"creates ticket"| node_mcp_api
node_request_intake -->|"stores request"| node_request_db
node_bot_commands -->|"reads and updates"| node_request_db
node_bot_commands -->|"updates ticket"| node_mcp_api
node_bot_commands -->|"triggers and polls"| node_rundeck_client
node_mcp_api -->|"dispatches ticket calls"| node_sn_client
node_sn_client -->|"creates and updates"| node_servicenow
node_rundeck_client -->|"runs and checks jobs"| node_rundeck

click node_request_intake "https://github.com/haricrazy1432-bot/itops/blob/main/bot/app.py"
click node_bot_commands "https://github.com/haricrazy1432-bot/itops/blob/main/bot/app.py"
click node_request_db "https://github.com/haricrazy1432-bot/itops/blob/main/bot/software.db"
click node_mcp_api "https://github.com/haricrazy1432-bot/itops/blob/main/mcp/server.py"
click node_sn_client "https://github.com/haricrazy1432-bot/itops/blob/main/mcp/servicenow_client.py"
click node_rundeck_client "https://github.com/haricrazy1432-bot/itops/blob/main/bot/rundeck_client.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_request_intake toneBlue
class node_bot_commands toneAmber
class node_request_db,node_requester toneMint
class node_mcp_api,node_sn_client,node_servicenow,node_rundeck_client,node_rundeck toneRose
class node_supervisor toneIndigo
```

## Components

### Request intake

- [Request intake](https://github.com/haricrazy1432-bot/itops/blob/main/bot/app.py): `bot/app.py`

### Supervisor operations

- [Bot commands](https://github.com/haricrazy1432-bot/itops/blob/main/bot/app.py): `bot/app.py`

### Request records

- [Request database](https://github.com/haricrazy1432-bot/itops/blob/main/bot/software.db): `bot/software.db`

### External integrations

- [ServiceNow API](https://github.com/haricrazy1432-bot/itops/blob/main/mcp/server.py): `mcp/server.py`
- [ServiceNow client](https://github.com/haricrazy1432-bot/itops/blob/main/mcp/servicenow_client.py): `mcp/servicenow_client.py`
- **ServiceNow**
- [Rundeck client](https://github.com/haricrazy1432-bot/itops/blob/main/bot/rundeck_client.py): `bot/rundeck_client.py`
- **Rundeck**

### Other components

- **Software requester**
- **Supervisor**

## Connections

- Software requester → Request intake: submits request (evidence: `bot/app.py`)
- Supervisor → Bot commands: sends commands (evidence: `bot/app.py`)
- Request intake → ServiceNow API: creates ticket (evidence: `bot/app.py`)
- Request intake → Request database: stores request (evidence: `bot/app.py`)
- Bot commands → Request database: reads and updates (evidence: `bot/app.py`)
- Bot commands → ServiceNow API: updates ticket (evidence: `bot/app.py`)
- Bot commands → Rundeck client: triggers and polls (evidence: `bot/app.py`)
- ServiceNow API → ServiceNow client: dispatches ticket calls (evidence: `mcp/server.py`)
- ServiceNow client → ServiceNow: creates and updates (evidence: `mcp/servicenow_client.py`)
- Rundeck client → Rundeck: runs and checks jobs (evidence: `bot/rundeck_client.py`)
