# runbookagent-incidentmanagement/runbook_mcp architecture

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

- Interactive diagram: https://gitdiagram.com/runbookagent-incidentmanagement/runbook_mcp
- Repository: https://github.com/runbookagent-incidentmanagement/runbook_mcp

## Overview

AuraCommerce combines a storefront and commerce APIs with an event-oriented business layer, plus a separate AI incident-response platform. The customer workflow spans catalog discovery, cart and order management, payment, and notifications; the incident workflow accepts an event, runs analysis and remediation, and can invoke Kubernetes or Jira tools. Service code and selected AI modules were sampled; some commerce and incident relationships are documented in the README rather than verified from implementation excerpts.

Main entry points: [`frontend/src/App.jsx`](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/frontend/src/App.jsx) (Storefront UI), [`backend/shared/database.py`](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/shared/database.py) (Commerce Database), [`ai-agents/langgraph/runbook_agent.py`](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/ai-agents/langgraph/runbook_agent.py) (Runbook Agent), [`backend/notification_service/app/main.py`](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/notification_service/app/main.py) (Notification Service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_frontend["Storefront UI<br/>[App.jsx]"]
  node_auth_ui["Authentication UI<br/>[AuthContext.jsx]"]
  node_api_client["API Client<br/>[api.js]"]
end

subgraph group_commerce["Commerce Services"]
  node_auth_service["Auth Service<br/>[main.py]"]
  node_product_service["Product Catalog<br/>[main.py]"]
  node_product_model["Product Model<br/>[models.py]"]
  node_cart_service["Cart Service<br/>[main.py]"]
  node_order_service["Order Service<br/>[main.py]"]
  node_payment_service["Payment Service<br/>[main.py]"]
  node_notification_service["Notification Service<br/>[main.py]"]
end

subgraph group_shared["Shared Runtime"]
  node_database[("Commerce Database<br/>[database.py]")]
  node_events["Event Schema<br/>[events.py]"]
  node_incident_consumer["Event Consumer<br/>[event_consumer.py]"]
end

subgraph group_incidents["Incident Management"]
  node_runbook_runner["Runbook Runner<br/>[main.py]"]
  node_runbook_agent["Runbook Agent<br/>[runbook_agent.py]"]
  node_classifier["LLM Classifier<br/>[llm_classifier.py]"]
  node_catalog_parser["Runbook Catalog<br/>[catalog_parser.py]"]
  node_mcp_client["MCP Tool Client<br/>[mcp_client.py]"]
  node_k8s_tools["Kubernetes Tools"]
  node_jira_tools["Jira Tools<br/>[jira_mcp_server.py]"]
end

node_customer(("Customer"))

node_customer -->|"uses"| node_frontend
node_frontend -->|"renders"| node_auth_ui
node_frontend -->|"uses"| node_api_client
node_auth_ui -->|"requests auth"| node_auth_service
node_frontend -.->|"browses catalog"| node_product_service
node_frontend -.->|"manages cart"| node_cart_service
node_frontend -.->|"views orders"| node_order_service
node_product_service -->|"queries"| node_product_model
node_product_service -->|"reads/writes"| node_database
node_cart_service -->|"reads/writes"| node_database
node_order_service -->|"reads/writes"| node_database
node_payment_service -.->|"reads/writes"| node_database
node_notification_service -->|"reads/writes"| node_database
node_order_service -->|"publishes event"| node_events
node_payment_service -.->|"publishes events"| node_events
node_notification_service -.->|"receives events"| node_incident_consumer
node_notification_service -->|"routes incidents"| node_runbook_runner
node_runbook_runner -->|"orchestrates"| node_runbook_agent
node_runbook_agent -->|"loads catalog"| node_catalog_parser
node_runbook_agent -->|"classifies"| node_classifier
node_runbook_agent -->|"executes tools"| node_mcp_client
node_mcp_client -->|"calls tools"| node_k8s_tools
node_mcp_client -->|"calls tools"| node_jira_tools

click node_frontend "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/frontend/src/App.jsx"
click node_auth_ui "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/frontend/src/auth/AuthContext.jsx"
click node_api_client "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/frontend/src/services/api.js"
click node_auth_service "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/auth_service/app/main.py"
click node_product_service "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/product_service/app/main.py"
click node_product_model "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/product_service/app/models.py"
click node_cart_service "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/cart_service/app/main.py"
click node_order_service "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/order_service/app/main.py"
click node_payment_service "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/payment_service/app/main.py"
click node_notification_service "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/notification_service/app/main.py"
click node_database "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/shared/database.py"
click node_events "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/shared/events.py"
click node_incident_consumer "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/shared/events/consumers/event_consumer.py"
click node_runbook_runner "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/services/runbook-runner/app/main.py"
click node_runbook_agent "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/ai-agents/langgraph/runbook_agent.py"
click node_classifier "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/ai-agents/llm_classifier.py"
click node_catalog_parser "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/ai-agents/catalog_parser.py"
click node_mcp_client "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/ai-agents/mcp_client.py"
click node_k8s_tools "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/mcp-servers/kubernetes_mcp_server.py"
click node_jira_tools "https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/mcp-servers/jira_mcp_server.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_frontend,node_auth_ui,node_api_client toneBlue
class node_auth_service,node_product_service,node_product_model,node_cart_service,node_order_service,node_payment_service,node_notification_service toneAmber
class node_database,node_events,node_incident_consumer toneMint
class node_runbook_runner,node_runbook_agent,node_classifier,node_catalog_parser,node_mcp_client,node_k8s_tools,node_jira_tools toneRose
class node_customer toneIndigo
```

## Components

### Storefront

- [Storefront UI](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Authentication UI](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/frontend/src/auth/AuthContext.jsx): `frontend/src/auth/AuthContext.jsx`
- [API Client](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/frontend/src/services/api.js): `frontend/src/services/api.js`

### Commerce Services

- [Auth Service](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/auth_service/app/main.py): `backend/auth_service/app/main.py`
- [Product Catalog](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/product_service/app/main.py): `backend/product_service/app/main.py`
- [Product Model](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/product_service/app/models.py): `backend/product_service/app/models.py`
- [Cart Service](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/cart_service/app/main.py): `backend/cart_service/app/main.py`
- [Order Service](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/order_service/app/main.py): `backend/order_service/app/main.py`
- [Payment Service](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/payment_service/app/main.py): `backend/payment_service/app/main.py`
- [Notification Service](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/notification_service/app/main.py): `backend/notification_service/app/main.py`

### Shared Runtime

- [Commerce Database](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/shared/database.py): `backend/shared/database.py`
- [Event Schema](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/shared/events.py): `backend/shared/events.py`
- [Event Consumer](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/backend/shared/events/consumers/event_consumer.py): `backend/shared/events/consumers/event_consumer.py`

### Incident Management

- [Runbook Runner](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/services/runbook-runner/app/main.py): `services/runbook-runner/app/main.py`
- [Runbook Agent](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/ai-agents/langgraph/runbook_agent.py): `ai-agents/langgraph/runbook_agent.py`
- [LLM Classifier](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/ai-agents/llm_classifier.py): `ai-agents/llm_classifier.py`
- [Runbook Catalog](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/ai-agents/catalog_parser.py): `ai-agents/catalog_parser.py`
- [MCP Tool Client](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/ai-agents/mcp_client.py): `ai-agents/mcp_client.py`
- [Kubernetes Tools](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/mcp-servers/kubernetes_mcp_server.py): `mcp-servers/kubernetes_mcp_server.py`
- [Jira Tools](https://github.com/runbookagent-incidentmanagement/runbook_mcp/blob/main/mcp-servers/jira_mcp_server.py): `mcp-servers/jira_mcp_server.py`

### Other components

- **Customer**

## Connections

- Customer → Storefront UI: uses (evidence: `README.md`)
- Storefront UI → Authentication UI: renders (evidence: `frontend/src/App.jsx`)
- Storefront UI → API Client: uses (evidence: `frontend/src/App.jsx`)
- Authentication UI → Auth Service: requests auth (evidence: `frontend/src/auth/AuthContext.jsx`)
- Storefront UI → Product Catalog: browses catalog (evidence: `README.md`)
- Storefront UI → Cart Service: manages cart (evidence: `README.md`)
- Storefront UI → Order Service: views orders (evidence: `README.md`)
- Product Catalog → Product Model: queries (evidence: `backend/product_service/app/main.py`)
- Product Catalog → Commerce Database: reads/writes (evidence: `backend/product_service/app/main.py`)
- Cart Service → Commerce Database: reads/writes (evidence: `backend/cart_service/app/main.py`)
- Order Service → Commerce Database: reads/writes (evidence: `backend/order_service/app/main.py`)
- Payment Service → Commerce Database: reads/writes (evidence: `README.md`)
- Notification Service → Commerce Database: reads/writes (evidence: `backend/notification_service/app/main.py`)
- Order Service → Event Schema: publishes event (evidence: `backend/order_service/app/main.py`)
- Payment Service → Event Schema: publishes events (evidence: `README.md`)
- Notification Service → Event Consumer: receives events (evidence: `README.md`)
- Notification Service → Runbook Runner: routes incidents (evidence: `backend/notification_service/app/main.py`)
- Runbook Runner → Runbook Agent: orchestrates (evidence: `services/runbook-runner/app/main.py`)
- Runbook Agent → Runbook Catalog: loads catalog (evidence: `ai-agents/langgraph/runbook_agent.py`)
- Runbook Agent → LLM Classifier: classifies (evidence: `ai-agents/langgraph/runbook_agent.py`)
- Runbook Agent → MCP Tool Client: executes tools (evidence: `ai-agents/langgraph/runbook_agent.py`)
- MCP Tool Client → Kubernetes Tools: calls tools (evidence: `ai-agents/mcp_client.py`)
- MCP Tool Client → Jira Tools: calls tools (evidence: `ai-agents/mcp_client.py`)
