# svuillaume/forticnapp_cloud_integrations architecture

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

- Interactive diagram: https://gitdiagram.com/svuillaume/forticnapp_cloud_integrations
- Repository: https://github.com/svuillaume/forticnapp_cloud_integrations

## Overview

This repository is a web-based Azure onboarding agent for FortiCNAPP. A user chats with the agent or uploads an Azure preflight report; the agent consults an LLM and routes tool calls to Azure and FortiCNAPP MCP services. Onboarding progresses through environment checks, integration discovery/validation, and—only after user confirmation—account creation and verification. The graph also shows the API, tool-routing, and service-client layers. The README is empty, and some implementation excerpts are partial, so uncertain connections are omitted.

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Chat and API"]
  node_ui["Chat UI"]
  node_api["Web API"]
end

subgraph group_agent["Agent Runtime"]
  node_session["Session State"]
  node_agentloop["Agent Loop"]
  node_llm["LLM Client"]
  node_router["Tool Router"]
  node_mcphub["MCP Hub"]
end

subgraph group_azure["Azure Onboarding"]
  node_report["Preflight Report"]
  node_preflight["Azure Preflight"]
  node_azmcp["Azure MCP"]
end

subgraph group_forti["FortiCNAPP Integration"]
  node_fortimcp["FortiCNAPP MCP"]
  node_ops["Account Operations"]
  node_client["REST Client"]
end

node_user(("User"))
node_gateway["Bifrost Gateway"]
node_azcli["Azure CLI"]
node_keyvault[("Azure Key Vault")]
node_fortiapi["FortiCNAPP API"]

node_user -->|"uses"| node_ui
node_ui -->|"sends requests"| node_api
node_api -->|"gets session"| node_session
node_api -->|"runs turn"| node_agentloop
node_api -->|"stores upload"| node_report
node_api -->|"executes confirmed action"| node_router
node_agentloop -->|"updates messages"| node_session
node_agentloop -->|"requests completion"| node_llm
node_llm -->|"sends model request"| node_gateway
node_gateway -->|"returns completion"| node_llm
node_agentloop -->|"dispatches tool calls"| node_router
node_router -->|"reads uploaded report"| node_report
node_router -->|"calls remote tool"| node_mcphub
node_mcphub -->|"dispatches Azure tools"| node_azmcp
node_mcphub -->|"dispatches account tools"| node_fortimcp
node_azmcp -->|"runs commands"| node_azcli
node_azmcp -->|"runs preflight"| node_preflight
node_azcli -->|"stores secret"| node_keyvault
node_ops -->|"resolves Key Vault reference"| node_azcli
node_fortimcp -->|"calls operations"| node_ops
node_ops -->|"requests account data"| node_client
node_client -->|"calls REST API"| node_fortiapi
node_fortiapi -->|"returns API data"| node_client

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_ui,node_api,node_user toneBlue
class node_session,node_agentloop,node_llm,node_router,node_mcphub,node_keyvault toneAmber
class node_report,node_preflight,node_azmcp,node_fortiapi toneMint
class node_fortimcp,node_ops,node_client toneRose
class node_gateway,node_azcli toneIndigo
```

## Components

### Chat and API

- **Chat UI**
- **Web API**

### Agent Runtime

- **Session State**
- **Agent Loop**
- **LLM Client**
- **Tool Router**
- **MCP Hub**

### Azure Onboarding

- **Preflight Report**
- **Azure Preflight**
- **Azure MCP**

### FortiCNAPP Integration

- **FortiCNAPP MCP**
- **Account Operations**
- **REST Client**

### Other components

- **User**
- **Bifrost Gateway**
- **Azure CLI**
- **Azure Key Vault**
- **FortiCNAPP API**

## Connections

- User → Chat UI: uses
- Chat UI → Web API: sends requests
- Web API → Session State: gets session
- Web API → Agent Loop: runs turn
- Web API → Preflight Report: stores upload
- Web API → Tool Router: executes confirmed action
- Agent Loop → Session State: updates messages
- Agent Loop → LLM Client: requests completion
- LLM Client → Bifrost Gateway: sends model request
- Bifrost Gateway → LLM Client: returns completion
- Agent Loop → Tool Router: dispatches tool calls
- Tool Router → Preflight Report: reads uploaded report
- Tool Router → MCP Hub: calls remote tool
- MCP Hub → Azure MCP: dispatches Azure tools
- MCP Hub → FortiCNAPP MCP: dispatches account tools
- Azure MCP → Azure CLI: runs commands
- Azure MCP → Azure Preflight: runs preflight
- Azure CLI → Azure Key Vault: stores secret
- Account Operations → Azure CLI: resolves Key Vault reference
- FortiCNAPP MCP → Account Operations: calls operations
- Account Operations → REST Client: requests account data
- REST Client → FortiCNAPP API: calls REST API
- FortiCNAPP API → REST Client: returns API data
