# vishwaksen21/cure-blend architecture

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

- Interactive diagram: https://gitdiagram.com/vishwaksen21/cure-blend
- Repository: https://github.com/vishwaksen21/cure-blend

## Overview

CureBlend is an educational health assistant with web and CLI entry points. Its main workflow takes symptom descriptions, produces disease predictions, then presents herbal and pharmaceutical options alongside safety guidance, severity information, and optional AI insights. The graph also includes dataset and medical-knowledge components and the documented graph-embedding capability. Several source excerpts are partial, so uncertain internal calls and data wiring are omitted; feature coverage beyond the sampled implementations follows the README.

Main entry points: [`src/ai_assistant.py`](https://github.com/vishwaksen21/cure-blend/blob/main/src/ai_assistant.py) (Health assistant), [`main.py`](https://github.com/vishwaksen21/cure-blend/blob/main/main.py) (CLI interface), [`src/personalized_recommender.py`](https://github.com/vishwaksen21/cure-blend/blob/main/src/personalized_recommender.py) (Personalized recommendations), [`streamlit_app.py`](https://github.com/vishwaksen21/cure-blend/blob/main/streamlit_app.py) (Web interface)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["User experience"]
  node_web["Web interface<br/>[streamlit_app.py]"]
  node_cli["CLI interface<br/>[main.py]"]
end

subgraph group_clinical["Analysis and guidance"]
  node_assistant["Health assistant<br/>[ai_assistant.py]"]
  node_predictor["Symptom prediction"]
  node_multidisease["Multi-disease analysis"]
  node_severity["Severity assessment"]
  node_safety["Safety checks<br/>[safety_checks.py]"]
  node_herbal["Herbal safety"]
  node_recommend["Personalized recommendations"]
  node_explain["Model explanations<br/>[explainability.py]"]
  node_insights["AI insights<br/>[ai_assistant.py]"]
  node_feedback["User feedback<br/>[feedback_system.py]"]
end

subgraph group_knowledge["Medical knowledge"]
  node_drugs["Drug recommendations<br/>[drug_database.py]"]
  node_medicaldb[("Medical knowledge store")]
end

subgraph group_data["Data and modeling"]
  node_orchestrator["Data orchestration"]
  node_datasets["Dataset management<br/>[dataset_manager.py]"]
  node_graph["Medical knowledge graph<br/>[build_graph.py]"]
  node_embeddings["Graph embeddings<br/>[embeddings.py]"]
end

node_user(("Person"))
node_llm{{"AI model service"}}

node_user -->|"enters symptoms"| node_web
node_user -->|"enters symptoms"| node_cli
node_web -->|"requests analysis"| node_assistant
node_cli -->|"requests analysis"| node_assistant
node_cli -->|"analyzes overlap"| node_multidisease
node_assistant -->|"predicts disease"| node_predictor
node_assistant -->|"gets recommendations"| node_recommend
node_assistant -->|"checks safety"| node_safety
node_assistant -->|"assesses severity"| node_severity
node_assistant -.->|"generates insights"| node_insights
node_insights -.->|"requests generation"| node_llm
node_recommend -->|"looks up drugs"| node_drugs
node_recommend -->|"checks herbal safety"| node_herbal
node_assistant -->|"reads medical data"| node_medicaldb
node_orchestrator -->|"reads datasets"| node_datasets
node_graph -->|"generates vectors"| node_embeddings

click node_web "https://github.com/vishwaksen21/cure-blend/blob/main/streamlit_app.py"
click node_cli "https://github.com/vishwaksen21/cure-blend/blob/main/main.py"
click node_assistant "https://github.com/vishwaksen21/cure-blend/blob/main/src/ai_assistant.py"
click node_predictor "https://github.com/vishwaksen21/cure-blend/blob/main/src/symptom_predictor.py"
click node_multidisease "https://github.com/vishwaksen21/cure-blend/blob/main/src/multi_disease_detector.py"
click node_severity "https://github.com/vishwaksen21/cure-blend/blob/main/src/severity_classifier.py"
click node_safety "https://github.com/vishwaksen21/cure-blend/blob/main/src/safety_checks.py"
click node_herbal "https://github.com/vishwaksen21/cure-blend/blob/main/src/herbal_safety_checker.py"
click node_recommend "https://github.com/vishwaksen21/cure-blend/blob/main/src/personalized_recommender.py"
click node_drugs "https://github.com/vishwaksen21/cure-blend/blob/main/src/drug_database.py"
click node_medicaldb "https://github.com/vishwaksen21/cure-blend/blob/main/src/database_manager.py"
click node_explain "https://github.com/vishwaksen21/cure-blend/blob/main/src/explainability.py"
click node_insights "https://github.com/vishwaksen21/cure-blend/blob/main/src/ai_assistant.py"
click node_feedback "https://github.com/vishwaksen21/cure-blend/blob/main/src/feedback_system.py"
click node_orchestrator "https://github.com/vishwaksen21/cure-blend/blob/main/src/data_orchestrator.py"
click node_datasets "https://github.com/vishwaksen21/cure-blend/blob/main/src/dataset_manager.py"
click node_graph "https://github.com/vishwaksen21/cure-blend/blob/main/src/build_graph.py"
click node_embeddings "https://github.com/vishwaksen21/cure-blend/blob/main/src/embeddings.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_cli toneBlue
class node_assistant,node_predictor,node_multidisease,node_severity,node_safety,node_herbal,node_recommend,node_explain,node_insights,node_feedback toneAmber
class node_drugs,node_medicaldb toneMint
class node_orchestrator,node_datasets,node_graph,node_embeddings toneRose
class node_user,node_llm toneIndigo
```

## Components

### User experience

- [Web interface](https://github.com/vishwaksen21/cure-blend/blob/main/streamlit_app.py): `streamlit_app.py`
- [CLI interface](https://github.com/vishwaksen21/cure-blend/blob/main/main.py): `main.py`

### Analysis and guidance

- [Health assistant](https://github.com/vishwaksen21/cure-blend/blob/main/src/ai_assistant.py): `src/ai_assistant.py`
- [Symptom prediction](https://github.com/vishwaksen21/cure-blend/blob/main/src/symptom_predictor.py): `src/symptom_predictor.py`
- [Multi-disease analysis](https://github.com/vishwaksen21/cure-blend/blob/main/src/multi_disease_detector.py): `src/multi_disease_detector.py`
- [Severity assessment](https://github.com/vishwaksen21/cure-blend/blob/main/src/severity_classifier.py): `src/severity_classifier.py`
- [Safety checks](https://github.com/vishwaksen21/cure-blend/blob/main/src/safety_checks.py): `src/safety_checks.py`
- [Herbal safety](https://github.com/vishwaksen21/cure-blend/blob/main/src/herbal_safety_checker.py): `src/herbal_safety_checker.py`
- [Personalized recommendations](https://github.com/vishwaksen21/cure-blend/blob/main/src/personalized_recommender.py): `src/personalized_recommender.py`
- [Model explanations](https://github.com/vishwaksen21/cure-blend/blob/main/src/explainability.py): `src/explainability.py`
- [AI insights](https://github.com/vishwaksen21/cure-blend/blob/main/src/ai_assistant.py): `src/ai_assistant.py`
- [User feedback](https://github.com/vishwaksen21/cure-blend/blob/main/src/feedback_system.py): `src/feedback_system.py`

### Medical knowledge

- [Drug recommendations](https://github.com/vishwaksen21/cure-blend/blob/main/src/drug_database.py): `src/drug_database.py`
- [Medical knowledge store](https://github.com/vishwaksen21/cure-blend/blob/main/src/database_manager.py): `src/database_manager.py`

### Data and modeling

- [Data orchestration](https://github.com/vishwaksen21/cure-blend/blob/main/src/data_orchestrator.py): `src/data_orchestrator.py`
- [Dataset management](https://github.com/vishwaksen21/cure-blend/blob/main/src/dataset_manager.py): `src/dataset_manager.py`
- [Medical knowledge graph](https://github.com/vishwaksen21/cure-blend/blob/main/src/build_graph.py): `src/build_graph.py`
- [Graph embeddings](https://github.com/vishwaksen21/cure-blend/blob/main/src/embeddings.py): `src/embeddings.py`

### Other components

- **Person**
- **AI model service**

## Connections

- Person → Web interface: enters symptoms
- Person → CLI interface: enters symptoms
- Web interface → Health assistant: requests analysis
- CLI interface → Health assistant: requests analysis
- CLI interface → Multi-disease analysis: analyzes overlap
- Health assistant → Symptom prediction: predicts disease
- Health assistant → Personalized recommendations: gets recommendations
- Health assistant → Safety checks: checks safety
- Health assistant → Severity assessment: assesses severity
- Health assistant → AI insights: generates insights
- AI insights → AI model service: requests generation
- Personalized recommendations → Drug recommendations: looks up drugs
- Personalized recommendations → Herbal safety: checks herbal safety
- Health assistant → Medical knowledge store: reads medical data
- Data orchestration → Dataset management: reads datasets
- Medical knowledge graph → Graph embeddings: generates vectors
