# maksim-sharshov/coredev-fixops architecture

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

- Interactive diagram: https://gitdiagram.com/maksim-sharshov/coredev-fixops
- Repository: https://github.com/maksim-sharshov/coredev-fixops

## Overview

FixOps monitors labeled containers for structured application errors, then orchestrates code indexing, root-cause analysis, AI patch generation, isolated testing, and repair reporting. After verification, users can apply or roll back repairs; applying can rebuild the workload and commit and push changes. The dashboard presents container health and persisted incident details, with workflow progress streamed live. The README documents the workflow stages and user-visible capabilities; unsampled API, WebSocket, and service implementations limit some lower-level relationship detail.

Main entry points: [`backend/services/workflow.py`](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/workflow.py) (Repair workflow), [`frontend/src/hooks/useAppState.tsx`](https://github.com/maksim-sharshov/coredev-fixops/blob/main/frontend/src/hooks/useAppState.tsx) (Dashboard state), [`backend/services/docker_watcher.py`](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/docker_watcher.py) (Log watcher), [`backend/api/router.py`](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/api/router.py) (HTTP API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_detection["Detection and orchestration"]
  node_watcher["Log watcher<br/>[docker_watcher.py]"]
  node_analyze["Error analysis entry<br/>[analyze_error.py]"]
  node_workflow["Repair workflow<br/>[workflow.py]"]
end

subgraph group_analysis["Code analysis and repair"]
  node_indexer["AST indexer<br/>[indexer.py]"]
  node_callgraph["Call graph resolver<br/>[graph.py]"]
  node_rootcause["Root cause analysis<br/>[error_analyzer.py]"]
  node_context["Prompt context builder<br/>[context_builder.py]"]
  node_llm["DeepSeek client<br/>[deepseek.py]"]
  node_executor["Patch and test executor<br/>[executor.py]"]
end

subgraph group_operations["Operations and persistence"]
  node_api["HTTP API<br/>[router.py]"]
  node_ws["WebSocket API<br/>[ws.py]"]
  node_containers["Container operations"]
  node_git["Git integration<br/>[git_service.py]"]
  node_incidents[("Incident records<br/>[models.py]")]
  node_redis[("Chat history<br/>[history_manager.py]")]
end

subgraph group_dashboard["Dashboard"]
  node_dashboard["Dashboard pages<br/>[App.tsx]"]
  node_state["Dashboard state<br/>[useAppState.tsx]"]
  node_jobview["Incident live view<br/>[useJobSocket.ts]"]
  node_client["Frontend API client<br/>[api.ts]"]
end

node_app(("Monitored application"))
node_docker["Docker workloads"]
node_engineer(("Developer or operator"))

node_app -->|"emits logs"| node_docker
node_docker -->|"streams logs"| node_watcher
node_watcher -->|"starts analysis"| node_analyze
node_analyze -->|"runs workflow"| node_workflow
node_workflow -->|"indexes project"| node_indexer
node_workflow -->|"builds call graph"| node_callgraph
node_workflow -->|"locates cause"| node_rootcause
node_workflow -->|"builds prompt"| node_context
node_workflow -->|"requests patch"| node_llm
node_workflow -->|"applies and tests"| node_executor
node_watcher -->|"publishes progress"| node_ws
node_engineer -->|"views and operates"| node_dashboard
node_dashboard -->|"provides state"| node_state
node_state -->|"loads containers"| node_client
node_state -->|"loads history via API"| node_incidents
node_state -->|"receives monitoring events"| node_ws
node_jobview -->|"receives job events"| node_ws
node_jobview -->|"hydrates incident"| node_client
node_client -->|"requests endpoints"| node_api
node_api -->|"handles container actions"| node_containers
node_api -->|"serves incident history"| node_incidents
node_containers -->|"rebuilds workload"| node_docker
node_containers -->|"syncs and pushes"| node_git
node_llm -->|"stores conversation history"| node_redis

click node_watcher "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/docker_watcher.py"
click node_analyze "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/analyze_error.py"
click node_workflow "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/workflow.py"
click node_indexer "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/indexer.py"
click node_callgraph "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/graph.py"
click node_rootcause "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/error_analyzer.py"
click node_context "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/context_builder.py"
click node_llm "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/ai/deepseek.py"
click node_executor "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/executor.py"
click node_api "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/api/router.py"
click node_ws "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/api/ws.py"
click node_containers "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/container_manager.py"
click node_git "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/git_service.py"
click node_incidents "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/db/psql/models/models.py"
click node_redis "https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/ai/history_manager.py"
click node_dashboard "https://github.com/maksim-sharshov/coredev-fixops/blob/main/frontend/src/App.tsx"
click node_state "https://github.com/maksim-sharshov/coredev-fixops/blob/main/frontend/src/hooks/useAppState.tsx"
click node_jobview "https://github.com/maksim-sharshov/coredev-fixops/blob/main/frontend/src/hooks/useJobSocket.ts"
click node_client "https://github.com/maksim-sharshov/coredev-fixops/blob/main/frontend/src/services/api.ts"

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_watcher,node_analyze,node_workflow toneBlue
class node_indexer,node_callgraph,node_rootcause,node_context,node_llm,node_executor toneAmber
class node_api,node_ws,node_containers,node_git,node_incidents,node_redis toneMint
class node_dashboard,node_state,node_jobview,node_client toneRose
class node_app,node_docker,node_engineer toneIndigo
```

## Components

### Detection and orchestration

- [Log watcher](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/docker_watcher.py): `backend/services/docker_watcher.py`
- [Error analysis entry](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/analyze_error.py): `backend/services/analyze_error.py`
- [Repair workflow](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/workflow.py): `backend/services/workflow.py`

### Code analysis and repair

- [AST indexer](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/indexer.py): `backend/code_intel/indexer.py`
- [Call graph resolver](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/graph.py): `backend/code_intel/graph.py`
- [Root cause analysis](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/error_analyzer.py): `backend/code_intel/error_analyzer.py`
- [Prompt context builder](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/context_builder.py): `backend/code_intel/context_builder.py`
- [DeepSeek client](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/ai/deepseek.py): `backend/ai/deepseek.py`
- [Patch and test executor](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/code_intel/executor.py): `backend/code_intel/executor.py`

### Operations and persistence

- [HTTP API](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/api/router.py): `backend/api/router.py`
- [WebSocket API](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/api/ws.py): `backend/api/ws.py`
- [Container operations](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/container_manager.py): `backend/services/container_manager.py`
- [Git integration](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/services/git_service.py): `backend/services/git_service.py`
- [Incident records](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/db/psql/models/models.py): `backend/db/psql/models/models.py`
- [Chat history](https://github.com/maksim-sharshov/coredev-fixops/blob/main/backend/ai/history_manager.py): `backend/ai/history_manager.py`

### Dashboard

- [Dashboard pages](https://github.com/maksim-sharshov/coredev-fixops/blob/main/frontend/src/App.tsx): `frontend/src/App.tsx`
- [Dashboard state](https://github.com/maksim-sharshov/coredev-fixops/blob/main/frontend/src/hooks/useAppState.tsx): `frontend/src/hooks/useAppState.tsx`
- [Incident live view](https://github.com/maksim-sharshov/coredev-fixops/blob/main/frontend/src/hooks/useJobSocket.ts): `frontend/src/hooks/useJobSocket.ts`
- [Frontend API client](https://github.com/maksim-sharshov/coredev-fixops/blob/main/frontend/src/services/api.ts): `frontend/src/services/api.ts`

### Other components

- **Monitored application**
- **Docker workloads**
- **Developer or operator**

## Connections

- Monitored application → Docker workloads: emits logs
- Docker workloads → Log watcher: streams logs
- Log watcher → Error analysis entry: starts analysis (evidence: `backend/services/docker_watcher.py`)
- Error analysis entry → Repair workflow: runs workflow
- Repair workflow → AST indexer: indexes project (evidence: `backend/services/workflow.py`)
- Repair workflow → Call graph resolver: builds call graph (evidence: `backend/services/workflow.py`)
- Repair workflow → Root cause analysis: locates cause (evidence: `backend/services/workflow.py`)
- Repair workflow → Prompt context builder: builds prompt (evidence: `backend/services/workflow.py`)
- Repair workflow → DeepSeek client: requests patch (evidence: `backend/services/workflow.py`)
- Repair workflow → Patch and test executor: applies and tests (evidence: `backend/services/workflow.py`)
- Log watcher → WebSocket API: publishes progress (evidence: `backend/services/docker_watcher.py`)
- Developer or operator → Dashboard pages: views and operates
- Dashboard pages → Dashboard state: provides state (evidence: `frontend/src/App.tsx`)
- Dashboard state → Frontend API client: loads containers (evidence: `frontend/src/hooks/useAppState.tsx`)
- Dashboard state → Incident records: loads history via API
- Dashboard state → WebSocket API: receives monitoring events
- Incident live view → WebSocket API: receives job events
- Incident live view → Frontend API client: hydrates incident (evidence: `frontend/src/hooks/useJobSocket.ts`)
- Frontend API client → HTTP API: requests endpoints (evidence: `frontend/src/services/api.ts`)
- HTTP API → Container operations: handles container actions
- HTTP API → Incident records: serves incident history
- Container operations → Docker workloads: rebuilds workload
- Container operations → Git integration: syncs and pushes (evidence: `backend/services/container_manager.py`)
- DeepSeek client → Chat history: stores conversation history (evidence: `backend/ai/deepseek.py`)
