# logithp/hybrid-qml-disease-detection architecture

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

- Interactive diagram: https://gitdiagram.com/logithp/hybrid-qml-disease-detection
- Repository: https://github.com/logithp/hybrid-qml-disease-detection

## Overview

This is a research web platform for tabular disease-detection workflows, combining AI-assisted preprocessing, classical SVMs, and simulated VQCs. The principal flow is dataset upload and inspection, preparation and feature selection, model training/evaluation, then predictions from saved models with provenance. The graph preserves documented comparison, quantum, feedback, and reporting capabilities. Source evidence is strongest for application setup, route registration, training dependencies, and preprocessing; other capability links rely on the README, since their implementation excerpts were not provided.

Main entry points: [`Diseases_Detection_Paltform/backend/app/api/v1/router.py`](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/router.py) (API routes), [`Diseases_Detection_Paltform/backend/app/services/training_service.py`](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/services/training_service.py) (Training service), [`Diseases_Detection_Paltform/backend/app/main.py`](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/main.py) (FastAPI application), [`Diseases_Detection_Paltform/backend/app/api/v1/features.py`](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/features.py) (Feature selection)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Web experience"]
  node_web["Web application<br/>[router.tsx]"]
  node_datasets["Datasets<br/>[datasets.py]"]
end

subgraph group_data["Data preparation"]
  node_profile["Dataset inspection<br/>[datasets.py]"]
  node_prep["Preprocessing<br/>[interface.py]"]
  node_prep_pipeline["Transform pipeline"]
  node_features["Feature selection<br/>[features.py]"]
end

subgraph group_modeling["Modeling and results"]
  node_training["Training service"]
  node_classical["Classical SVM"]
  node_vqc["Quantum VQC<br/>[model.py]"]
  node_checkpoints["Saved checkpoints<br/>[loader.py]"]
  node_evaluation["Evaluation and comparison<br/>[evaluation.py]"]
  node_predictions["Predictions<br/>[predictions.py]"]
  node_feedback["Feedback and retraining<br/>[feedback.py]"]
  node_experiments["Experiments and reports<br/>[experiments.py]"]
end

subgraph group_platform["Platform services"]
  node_api["FastAPI application<br/>[main.py]"]
  node_router["API routes<br/>[router.py]"]
  node_database[("MongoDB<br/>[session.py]")]
  node_artifacts["Artifact storage"]
end

node_user(("Research user"))

node_user -->|"uses"| node_web
node_web -->|"REST requests"| node_api
node_api -->|"mounts routes"| node_router
node_router -->|"registers"| node_datasets
node_router -->|"registers"| node_features
node_router -->|"registers"| node_evaluation
node_router -->|"registers"| node_predictions
node_router -->|"registers"| node_feedback
node_router -->|"registers"| node_experiments
node_api -->|"initializes"| node_database
node_api -->|"stores files"| node_artifacts
node_datasets -->|"inspects upload"| node_profile
node_profile -->|"informs preparation"| node_prep
node_prep -->|"applies transforms"| node_prep_pipeline
node_prep_pipeline -->|"supports selection"| node_features
node_features -->|"supplies features"| node_training
node_training -->|"fits or loads"| node_classical
node_training -->|"fits or loads"| node_vqc
node_training -->|"loads checkpoints"| node_checkpoints
node_training -->|"records metrics"| node_evaluation
node_training -->|"enables inference"| node_predictions
node_predictions -->|"reads saved model"| node_artifacts
node_feedback -.->|"supports retraining"| node_training
node_experiments -.->|"reviews results"| node_evaluation

click node_web "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/frontend/src/router.tsx"
click node_datasets "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/datasets.py"
click node_profile "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/datasets.py"
click node_prep "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/agents/preprocessing_agent/interface.py"
click node_prep_pipeline "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/agents/preprocessing_agent/pipeline/preprocessing_pipeline.py"
click node_features "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/features.py"
click node_training "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/services/training_service.py"
click node_classical "https://github.com/logithp/hybrid-qml-disease-detection/tree/main/Diseases_Detection_Paltform/backend/app/ml/classical/svm"
click node_vqc "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/ml/quantum/vqc/model.py"
click node_checkpoints "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/ml/loader.py"
click node_evaluation "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/evaluation.py"
click node_predictions "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/predictions.py"
click node_feedback "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/feedback.py"
click node_experiments "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/experiments.py"
click node_api "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/main.py"
click node_router "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/router.py"
click node_database "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/database/session.py"
click node_artifacts "https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/services/artifact_service.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_web,node_datasets,node_user toneBlue
class node_profile,node_prep,node_prep_pipeline,node_features toneAmber
class node_training,node_classical,node_vqc,node_checkpoints,node_evaluation,node_predictions,node_feedback,node_experiments toneMint
class node_api,node_router,node_database,node_artifacts toneRose
```

## Components

### Web experience

- [Web application](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/frontend/src/router.tsx): `Diseases_Detection_Paltform/frontend/src/router.tsx`
- [Datasets](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/datasets.py): `Diseases_Detection_Paltform/backend/app/api/v1/datasets.py`

### Data preparation

- [Dataset inspection](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/datasets.py): `Diseases_Detection_Paltform/backend/app/api/v1/datasets.py`
- [Preprocessing](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/agents/preprocessing_agent/interface.py): `Diseases_Detection_Paltform/backend/app/agents/preprocessing_agent/interface.py`
- [Transform pipeline](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/agents/preprocessing_agent/pipeline/preprocessing_pipeline.py): `Diseases_Detection_Paltform/backend/app/agents/preprocessing_agent/pipeline/preprocessing_pipeline.py`
- [Feature selection](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/features.py): `Diseases_Detection_Paltform/backend/app/api/v1/features.py`

### Modeling and results

- [Training service](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/services/training_service.py): `Diseases_Detection_Paltform/backend/app/services/training_service.py`
- [Classical SVM](https://github.com/logithp/hybrid-qml-disease-detection/tree/main/Diseases_Detection_Paltform/backend/app/ml/classical/svm): `Diseases_Detection_Paltform/backend/app/ml/classical/svm`
- [Quantum VQC](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/ml/quantum/vqc/model.py): `Diseases_Detection_Paltform/backend/app/ml/quantum/vqc/model.py`
- [Saved checkpoints](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/ml/loader.py): `Diseases_Detection_Paltform/backend/app/ml/loader.py`
- [Evaluation and comparison](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/evaluation.py): `Diseases_Detection_Paltform/backend/app/api/v1/evaluation.py`
- [Predictions](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/predictions.py): `Diseases_Detection_Paltform/backend/app/api/v1/predictions.py`
- [Feedback and retraining](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/feedback.py): `Diseases_Detection_Paltform/backend/app/api/v1/feedback.py`
- [Experiments and reports](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/experiments.py): `Diseases_Detection_Paltform/backend/app/api/v1/experiments.py`

### Platform services

- [FastAPI application](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/main.py): `Diseases_Detection_Paltform/backend/app/main.py`
- [API routes](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/api/v1/router.py): `Diseases_Detection_Paltform/backend/app/api/v1/router.py`
- [MongoDB](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/database/session.py): `Diseases_Detection_Paltform/backend/app/database/session.py`
- [Artifact storage](https://github.com/logithp/hybrid-qml-disease-detection/blob/main/Diseases_Detection_Paltform/backend/app/services/artifact_service.py): `Diseases_Detection_Paltform/backend/app/services/artifact_service.py`

### Other components

- **Research user**

## Connections

- Research user → Web application: uses (evidence: `README.md`)
- Web application → FastAPI application: REST requests (evidence: `README.md`)
- FastAPI application → API routes: mounts routes (evidence: `Diseases_Detection_Paltform/backend/app/main.py`)
- API routes → Datasets: registers (evidence: `Diseases_Detection_Paltform/backend/app/api/v1/router.py`)
- API routes → Feature selection: registers (evidence: `Diseases_Detection_Paltform/backend/app/api/v1/router.py`)
- API routes → Evaluation and comparison: registers (evidence: `Diseases_Detection_Paltform/backend/app/api/v1/router.py`)
- API routes → Predictions: registers (evidence: `Diseases_Detection_Paltform/backend/app/api/v1/router.py`)
- API routes → Feedback and retraining: registers (evidence: `Diseases_Detection_Paltform/backend/app/api/v1/router.py`)
- API routes → Experiments and reports: registers (evidence: `Diseases_Detection_Paltform/backend/app/api/v1/router.py`)
- FastAPI application → MongoDB: initializes (evidence: `Diseases_Detection_Paltform/backend/app/main.py`)
- FastAPI application → Artifact storage: stores files (evidence: `README.md`)
- Datasets → Dataset inspection: inspects upload (evidence: `README.md`)
- Dataset inspection → Preprocessing: informs preparation (evidence: `README.md`)
- Preprocessing → Transform pipeline: applies transforms
- Transform pipeline → Feature selection: supports selection (evidence: `README.md`)
- Feature selection → Training service: supplies features (evidence: `Diseases_Detection_Paltform/backend/app/services/training_service.py`)
- Training service → Classical SVM: fits or loads (evidence: `Diseases_Detection_Paltform/backend/app/services/training_service.py`)
- Training service → Quantum VQC: fits or loads (evidence: `Diseases_Detection_Paltform/backend/app/services/training_service.py`)
- Training service → Saved checkpoints: loads checkpoints (evidence: `Diseases_Detection_Paltform/backend/app/services/training_service.py`)
- Training service → Evaluation and comparison: records metrics (evidence: `README.md`)
- Training service → Predictions: enables inference (evidence: `README.md`)
- Predictions → Artifact storage: reads saved model (evidence: `README.md`)
- Feedback and retraining → Training service: supports retraining (evidence: `README.md`)
- Experiments and reports → Evaluation and comparison: reviews results (evidence: `README.md`)
