# daggupatileelanaren/resolveiq architecture

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

- Interactive diagram: https://gitdiagram.com/daggupatileelanaren/resolveiq
- Repository: https://github.com/daggupatileelanaren/resolveiq

## Overview

ResolveIQ is an incident-response dashboard with a learning loop: engineers select an incident, retrieve related Hindsight memories, receive AI analysis, record an outcome, and retain successful or attempted resolution knowledge. The FastAPI API coordinates persistence and services; the React client presents incidents, investigation results, dashboard and memory views. README documents health, demo and memory-stat capabilities in addition to the main workflow. Edges reflect sampled calls or documented API behavior; frontend styling and unsampled dashboard implementation are not expanded.

Main entry points: [`backend/app/main.py`](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/main.py) (FastAPI Routes), [`backend/app/services/agent_service.py`](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/services/agent_service.py) (Agent Orchestrator), [`backend/app/services/hindsight_service.py`](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/services/hindsight_service.py) (Memory Service), [`frontend/src/api.ts`](https://github.com/daggupatileelanaren/resolveiq/blob/main/frontend/src/api.ts) (API Client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Engineer Dashboard"]
  node_dashboard["Dashboard UI<br/>[App.tsx]"]
  node_client_api["API Client<br/>[api.ts]"]
end

subgraph group_api["Incident API"]
  node_api_app["FastAPI Routes<br/>[main.py]"]
  node_schemas["API Schemas<br/>[schemas.py]"]
  node_dashboard_view["Dashboard Metrics<br/>[main.py]"]
  node_health_demo["Health and Demo<br/>[main.py]"]
end

subgraph group_domain["Incident Data"]
  node_db_session["DB Session<br/>[database.py]"]
  node_records["Incident Records<br/>[models.py]"]
  node_postgres[("PostgreSQL")]
end

subgraph group_learning["Investigation Learning"]
  node_agent["Agent Orchestrator<br/>[agent_service.py]"]
  node_llm["AI Analysis<br/>[llm_service.py]"]
  node_hindsight_service["Memory Service"]
  node_hindsight[("Hindsight Cloud")]
  node_groq["Groq API"]
end

subgraph group_settings["Runtime Configuration"]
  node_settings["Settings<br/>[config.py]"]
end

node_engineer(("Engineer"))

node_engineer -->|"uses"| node_dashboard
node_dashboard -->|"requests"| node_client_api
node_client_api -->|"calls API"| node_api_app
node_api_app -->|"opens session"| node_db_session
node_api_app -->|"queries and updates"| node_records
node_db_session -.->|"persists data"| node_postgres
node_api_app -->|"validates and serializes"| node_schemas
node_api_app -->|"investigates"| node_agent
node_agent -->|"recalls and retains"| node_hindsight_service
node_agent -->|"analyzes"| node_llm
node_llm -->|"requests completion"| node_groq
node_hindsight_service -->|"calls memory API"| node_hindsight
node_hindsight_service -->|"reads credentials"| node_settings
node_llm -->|"reads model config"| node_settings
node_db_session -->|"reads database URL"| node_settings
node_api_app -->|"reads memory stats"| node_hindsight_service
node_api_app -->|"serves metrics"| node_dashboard_view
node_client_api -->|"requests status and demo"| node_health_demo
node_api_app -->|"serves endpoints"| node_health_demo
node_api_app -->|"stores resolution outcome"| node_records
node_api_app -->|"learns resolution"| node_agent

click node_dashboard "https://github.com/daggupatileelanaren/resolveiq/blob/main/frontend/src/App.tsx"
click node_client_api "https://github.com/daggupatileelanaren/resolveiq/blob/main/frontend/src/api.ts"
click node_api_app "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/main.py"
click node_schemas "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/schemas.py"
click node_db_session "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/database.py"
click node_records "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/models/models.py"
click node_agent "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/services/agent_service.py"
click node_llm "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/services/llm_service.py"
click node_hindsight_service "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/services/hindsight_service.py"
click node_settings "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/config.py"
click node_dashboard_view "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/main.py"
click node_health_demo "https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/main.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_dashboard,node_client_api toneBlue
class node_api_app,node_schemas,node_dashboard_view,node_health_demo toneAmber
class node_db_session,node_records,node_postgres toneMint
class node_agent,node_llm,node_hindsight_service,node_hindsight,node_groq toneRose
class node_settings,node_engineer toneIndigo
```

## Components

### Engineer Dashboard

- [Dashboard UI](https://github.com/daggupatileelanaren/resolveiq/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [API Client](https://github.com/daggupatileelanaren/resolveiq/blob/main/frontend/src/api.ts): `frontend/src/api.ts`

### Incident API

- [FastAPI Routes](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/main.py): `backend/app/main.py`
- [API Schemas](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/schemas.py): `backend/app/schemas.py`
- [Dashboard Metrics](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/main.py): `backend/app/main.py`
- [Health and Demo](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/main.py): `backend/app/main.py`

### Incident Data

- [DB Session](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/database.py): `backend/app/database.py`
- [Incident Records](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/models/models.py): `backend/app/models/models.py`
- **PostgreSQL**

### Investigation Learning

- [Agent Orchestrator](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/services/agent_service.py): `backend/app/services/agent_service.py`
- [AI Analysis](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/services/llm_service.py): `backend/app/services/llm_service.py`
- [Memory Service](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/services/hindsight_service.py): `backend/app/services/hindsight_service.py`
- **Hindsight Cloud**
- **Groq API**

### Runtime Configuration

- [Settings](https://github.com/daggupatileelanaren/resolveiq/blob/main/backend/app/config.py): `backend/app/config.py`

### Other components

- **Engineer**

## Connections

- Engineer → Dashboard UI: uses (evidence: `README.md`)
- Dashboard UI → API Client: requests (evidence: `frontend/src/App.tsx`)
- API Client → FastAPI Routes: calls API (evidence: `frontend/src/api.ts`)
- FastAPI Routes → DB Session: opens session (evidence: `backend/app/main.py`)
- FastAPI Routes → Incident Records: queries and updates (evidence: `backend/app/main.py`)
- DB Session → PostgreSQL: persists data
- FastAPI Routes → API Schemas: validates and serializes (evidence: `backend/app/main.py`)
- FastAPI Routes → Agent Orchestrator: investigates (evidence: `backend/app/main.py`)
- Agent Orchestrator → Memory Service: recalls and retains (evidence: `backend/app/services/agent_service.py`)
- Agent Orchestrator → AI Analysis: analyzes (evidence: `backend/app/services/agent_service.py`)
- AI Analysis → Groq API: requests completion (evidence: `backend/app/services/llm_service.py`)
- Memory Service → Hindsight Cloud: calls memory API (evidence: `backend/app/services/hindsight_service.py`)
- Memory Service → Settings: reads credentials (evidence: `backend/app/services/hindsight_service.py`)
- AI Analysis → Settings: reads model config (evidence: `backend/app/services/llm_service.py`)
- DB Session → Settings: reads database URL (evidence: `backend/app/database.py`)
- FastAPI Routes → Memory Service: reads memory stats (evidence: `backend/app/main.py`)
- FastAPI Routes → Dashboard Metrics: serves metrics (evidence: `backend/app/main.py`)
- API Client → Health and Demo: requests status and demo (evidence: `frontend/src/api.ts`)
- FastAPI Routes → Health and Demo: serves endpoints (evidence: `backend/app/main.py`)
- FastAPI Routes → Incident Records: stores resolution outcome (evidence: `backend/app/main.py`)
- FastAPI Routes → Agent Orchestrator: learns resolution (evidence: `backend/app/main.py`)
