# fypproj-hub/autohealx architecture

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

- Interactive diagram: https://gitdiagram.com/fypproj-hub/autohealx
- Repository: https://github.com/fypproj-hub/autohealx

## Overview

AutoHealX presents an AI-assisted monitoring and self-healing operations dashboard. Users enter through the web app, authenticate, and use dashboard modules for CPU/memory monitoring, failure prediction, network intelligence, diagnosis, log analysis, and recovery. The sampled runtime implements these operational views primarily as browser-side simulations and ML utilities; authentication is the sampled path to a Flask service and MongoDB. The README describes broader autonomous remediation ambitions, but sampled code does not establish real production-system monitoring or remediation. Edges reflect excerpts, SOURCE INDEX references, or documented behavior; unsampled links are omitted.

Main entry points: [`frontend/src/pages/Dashboard.jsx`](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/Dashboard.jsx) (Operations dashboard), [`frontend/src/App.jsx`](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/App.jsx) (App router), [`frontend/src/utils/auth.js`](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/auth.js) (Auth client), [`frontend/src/pages/CPUMemoryLab.jsx`](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/CPUMemoryLab.jsx) (CPU and memory lab)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry and access"]
  node_app["App router<br/>[App.jsx]"]
  node_dashboard["Operations dashboard<br/>[Dashboard.jsx]"]
  node_auth["Auth client<br/>[auth.js]"]
end

subgraph group_monitor["Monitoring and prediction"]
  node_cpu_lab["CPU and memory lab<br/>[CPUMemoryLab.jsx]"]
  node_system_sim["System simulation<br/>[useSystemSim.js]"]
  node_ml_tools["System ML tools<br/>[mlTools.js]"]
  node_failure_page["Failure prediction"]
  node_failure_sim["Failure simulation<br/>[useFailureSim.js]"]
  node_failure_ml["Failure models<br/>[failureMl.js]"]
  node_network_page["Network intelligence"]
  node_network_sim["Network simulation<br/>[useNetworkSim.js]"]
  node_network_ml["Network models<br/>[networkMl.js]"]
end

subgraph group_response["Diagnosis and recovery"]
  node_diagnosis["AI diagnosis<br/>[AIDiagnosis.jsx]"]
  node_diagnosis_ml["Diagnosis models<br/>[diagnosisModels.js]"]
  node_heal_page["Auto-heal operations"]
  node_heal_sim["Recovery simulation<br/>[useHealSim.js]"]
  node_heal_ml["Recovery models<br/>[healMl.js]"]
end

subgraph group_platform["Operations and configuration"]
  node_logs_page["System logs<br/>[SystemLogs.jsx]"]
  node_log_sim["Log simulation<br/>[useLogSim.js]"]
  node_log_ml["Log analytics<br/>[logMl.js]"]
  node_settings["Safety settings<br/>[SettingsSafety.jsx]"]
  node_app_settings["App settings<br/>[appSettings.js]"]
end

subgraph group_backend["Authentication service"]
  node_backend_api["Flask API<br/>[app.py]"]
  node_mongo[("MongoDB Atlas")]
end

node_user(("Operator"))

node_user -->|"opens"| node_app
node_app -->|"routes to"| node_dashboard
node_dashboard -->|"opens module"| node_failure_page
node_dashboard -->|"opens module"| node_cpu_lab
node_dashboard -->|"opens module"| node_network_page
node_dashboard -->|"opens module"| node_diagnosis
node_dashboard -->|"opens module"| node_heal_page
node_dashboard -->|"opens module"| node_logs_page
node_dashboard -->|"opens module"| node_settings
node_dashboard -->|"checks user"| node_auth
node_auth -->|"posts credentials"| node_backend_api
node_backend_api -->|"stores users"| node_mongo
node_cpu_lab -->|"reads simulation"| node_system_sim
node_system_sim -->|"uses model"| node_ml_tools
node_failure_page -->|"uses simulation"| node_failure_sim
node_failure_sim -->|"runs predictions"| node_failure_ml
node_network_sim -->|"runs models"| node_network_ml
node_network_page -.->|"uses simulation"| node_network_sim
node_heal_page -->|"uses simulation"| node_heal_sim
node_heal_sim -->|"selects recovery"| node_heal_ml
node_logs_page -.->|"uses simulation"| node_log_sim
node_log_sim -->|"generates insights"| node_log_ml
node_diagnosis -.->|"uses models"| node_diagnosis_ml
node_settings -.->|"loads settings"| node_app_settings

click node_app "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/App.jsx"
click node_dashboard "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/Dashboard.jsx"
click node_auth "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/auth.js"
click node_backend_api "https://github.com/fypproj-hub/autohealx/blob/main/backend/app.py"
click node_cpu_lab "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/CPUMemoryLab.jsx"
click node_system_sim "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useSystemSim.js"
click node_ml_tools "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/mlTools.js"
click node_failure_page "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/FailurePrediction.jsx"
click node_failure_sim "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useFailureSim.js"
click node_failure_ml "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/failureMl.js"
click node_network_page "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/NetworkIntelligence.jsx"
click node_network_sim "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useNetworkSim.js"
click node_network_ml "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/networkMl.js"
click node_diagnosis "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/AIDiagnosis.jsx"
click node_diagnosis_ml "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/diagnosisModels.js"
click node_heal_page "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/AutoHealOperations.jsx"
click node_heal_sim "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useHealSim.js"
click node_heal_ml "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/healMl.js"
click node_logs_page "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/SystemLogs.jsx"
click node_log_sim "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useLogSim.js"
click node_log_ml "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/logMl.js"
click node_settings "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/SettingsSafety.jsx"
click node_app_settings "https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/appSettings.js"

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_app,node_dashboard,node_auth toneBlue
class node_cpu_lab,node_system_sim,node_ml_tools,node_failure_page,node_failure_sim,node_failure_ml,node_network_page,node_network_sim,node_network_ml toneAmber
class node_diagnosis,node_diagnosis_ml,node_heal_page,node_heal_sim,node_heal_ml toneMint
class node_logs_page,node_log_sim,node_log_ml,node_settings,node_app_settings toneRose
class node_backend_api,node_mongo,node_user toneIndigo
```

## Components

### Web entry and access

- [App router](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Operations dashboard](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [Auth client](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/auth.js): `frontend/src/utils/auth.js`

### Monitoring and prediction

- [CPU and memory lab](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/CPUMemoryLab.jsx): `frontend/src/pages/CPUMemoryLab.jsx`
- [System simulation](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useSystemSim.js): `frontend/src/hooks/useSystemSim.js`
- [System ML tools](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/mlTools.js): `frontend/src/utils/mlTools.js`
- [Failure prediction](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/FailurePrediction.jsx): `frontend/src/pages/FailurePrediction.jsx`
- [Failure simulation](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useFailureSim.js): `frontend/src/hooks/useFailureSim.js`
- [Failure models](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/failureMl.js): `frontend/src/utils/failureMl.js`
- [Network intelligence](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/NetworkIntelligence.jsx): `frontend/src/pages/NetworkIntelligence.jsx`
- [Network simulation](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useNetworkSim.js): `frontend/src/hooks/useNetworkSim.js`
- [Network models](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/networkMl.js): `frontend/src/utils/networkMl.js`

### Diagnosis and recovery

- [AI diagnosis](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/AIDiagnosis.jsx): `frontend/src/pages/AIDiagnosis.jsx`
- [Diagnosis models](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/diagnosisModels.js): `frontend/src/utils/diagnosisModels.js`
- [Auto-heal operations](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/AutoHealOperations.jsx): `frontend/src/pages/AutoHealOperations.jsx`
- [Recovery simulation](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useHealSim.js): `frontend/src/hooks/useHealSim.js`
- [Recovery models](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/healMl.js): `frontend/src/utils/healMl.js`

### Operations and configuration

- [System logs](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/SystemLogs.jsx): `frontend/src/pages/SystemLogs.jsx`
- [Log simulation](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/hooks/useLogSim.js): `frontend/src/hooks/useLogSim.js`
- [Log analytics](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/logMl.js): `frontend/src/utils/logMl.js`
- [Safety settings](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/pages/SettingsSafety.jsx): `frontend/src/pages/SettingsSafety.jsx`
- [App settings](https://github.com/fypproj-hub/autohealx/blob/main/frontend/src/utils/appSettings.js): `frontend/src/utils/appSettings.js`

### Authentication service

- [Flask API](https://github.com/fypproj-hub/autohealx/blob/main/backend/app.py): `backend/app.py`
- **MongoDB Atlas**

### Other components

- **Operator**

## Connections

- Operator → App router: opens (evidence: `frontend/src/App.jsx`)
- App router → Operations dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Operations dashboard → Failure prediction: opens module (evidence: `frontend/src/pages/Dashboard.jsx`)
- Operations dashboard → CPU and memory lab: opens module (evidence: `frontend/src/pages/Dashboard.jsx`)
- Operations dashboard → Network intelligence: opens module (evidence: `frontend/src/pages/Dashboard.jsx`)
- Operations dashboard → AI diagnosis: opens module (evidence: `frontend/src/pages/Dashboard.jsx`)
- Operations dashboard → Auto-heal operations: opens module (evidence: `frontend/src/pages/Dashboard.jsx`)
- Operations dashboard → System logs: opens module (evidence: `frontend/src/pages/Dashboard.jsx`)
- Operations dashboard → Safety settings: opens module (evidence: `frontend/src/pages/Dashboard.jsx`)
- Operations dashboard → Auth client: checks user (evidence: `frontend/src/pages/Dashboard.jsx`)
- Auth client → Flask API: posts credentials (evidence: `frontend/src/utils/auth.js`)
- Flask API → MongoDB Atlas: stores users
- CPU and memory lab → System simulation: reads simulation (evidence: `frontend/src/pages/CPUMemoryLab.jsx`)
- System simulation → System ML tools: uses model (evidence: `frontend/src/hooks/useSystemSim.js`)
- Failure prediction → Failure simulation: uses simulation (evidence: `frontend/src/pages/FailurePrediction.jsx`)
- Failure simulation → Failure models: runs predictions (evidence: `frontend/src/hooks/useFailureSim.js`)
- Network simulation → Network models: runs models (evidence: `frontend/src/hooks/useNetworkSim.js`)
- Network intelligence → Network simulation: uses simulation
- Auto-heal operations → Recovery simulation: uses simulation (evidence: `frontend/src/pages/AutoHealOperations.jsx`)
- Recovery simulation → Recovery models: selects recovery (evidence: `frontend/src/hooks/useHealSim.js`)
- System logs → Log simulation: uses simulation
- Log simulation → Log analytics: generates insights (evidence: `frontend/src/hooks/useLogSim.js`)
- AI diagnosis → Diagnosis models: uses models
- Safety settings → App settings: loads settings
