# kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform architecture

> Architecture diagram of the GitHub repository kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-03). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform
- Repository: https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform

## Overview

Healthify AI is a healthcare web application for authenticated report management and AI-assisted interpretation. A user registers or signs in, uploads a report, and can view reports, request analysis, review analysis history, and ask report-related questions. The frontend calls separate authentication, report, and AI services; the report service stores metadata and uses S3, while the AI service parses PDFs, generates responses through Ollama, and persists analysis context. The graph focuses on application runtime: README documents the service roles and Ollama integration, while sampled source shows several internal calls. Gateway routing and deployment infrastructure are not included in the provided tree.

Main entry points: [`frontend/health-ai-frontend/src/services/aiService.js`](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/aiService.js) (AI client), [`frontend/health-ai-frontend/src/App.js`](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/App.js) (App routing), [`services/ai-service/app/routers/ai_routes.py`](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/routers/ai_routes.py) (Analysis endpoints), [`frontend/health-ai-frontend/src/services/reportService.js`](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/reportService.js) (Report client)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Web application"]
  node_app["App routing<br/>[App.js]"]
  node_auth_ui["Auth state<br/>[AuthContext.jsx]"]
  node_login["Login and registration<br/>[Login.jsx]"]
  node_upload_ui["Report upload<br/>[ReportUpload.jsx]"]
  node_reports_ui["Report list<br/>[ReportList.jsx]"]
  node_history_ui["Analysis history"]
  node_chat_ui["Report chat<br/>[ChatWindow.jsx]"]
  node_auth_client["Auth client<br/>[authService.js]"]
  node_report_client["Report client<br/>[reportService.js]"]
  node_ai_client["AI client<br/>[aiService.js]"]
  node_api_client["HTTP clients<br/>[api.js]"]
end

subgraph group_auth["Authentication"]
  node_auth_routes["Auth endpoints<br/>[auth_routes.py]"]
  node_auth_db[("Auth database<br/>[database.py]")]
end

subgraph group_reports["Report management"]
  node_report_routes["Report endpoints<br/>[report_routes.py]"]
  node_report_db[("Report database<br/>[database.py]")]
  node_s3[("Amazon S3")]
end

subgraph group_analysis["AI analysis"]
  node_ai_routes["Analysis endpoints<br/>[ai_routes.py]"]
  node_pdf_parser["PDF extraction<br/>[pdf_parser.py]"]
  node_ai_engine["Analysis and Q&amp;A<br/>[ai_engine.py]"]
  node_analysis_context["Analysis records<br/>[report_context.py]"]
  node_ai_db[("Analysis database<br/>[database.py]")]
end

node_user(("Patient"))
node_ollama["Ollama model"]

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_upload_ui
node_app -->|"routes to"| node_reports_ui
node_app -->|"routes to"| node_history_ui
node_login -->|"uses"| node_auth_ui
node_auth_ui -->|"calls"| node_auth_client
node_auth_client -->|"uses"| node_api_client
node_auth_client -->|"requests"| node_auth_routes
node_auth_routes -->|"reads and writes"| node_auth_db
node_upload_ui -->|"uses"| node_report_client
node_reports_ui -->|"uses"| node_report_client
node_upload_ui -->|"uses"| node_ai_client
node_reports_ui -->|"uses"| node_ai_client
node_history_ui -->|"calls"| node_ai_client
node_chat_ui -->|"calls"| node_ai_client
node_report_client -->|"uses"| node_api_client
node_ai_client -->|"uses"| node_api_client
node_report_client -->|"requests"| node_report_routes
node_ai_client -->|"requests"| node_ai_routes
node_report_routes -->|"stores metadata"| node_report_db
node_report_routes -->|"uploads and deletes"| node_s3
node_ai_routes -->|"extracts text"| node_pdf_parser
node_ai_routes -->|"requests analysis"| node_ai_engine
node_ai_routes -->|"manages records"| node_analysis_context
node_analysis_context -->|"uses models"| node_ai_db
node_ai_engine -->|"sends prompts"| node_ollama

click node_app "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/App.js"
click node_auth_ui "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/contexts/AuthContext.jsx"
click node_login "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/Login.jsx"
click node_upload_ui "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/ReportUpload.jsx"
click node_reports_ui "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/ReportList.jsx"
click node_history_ui "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/AnalysisHistory.jsx"
click node_chat_ui "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/ChatWindow.jsx"
click node_auth_client "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/authService.js"
click node_report_client "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/reportService.js"
click node_ai_client "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/aiService.js"
click node_api_client "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/api.js"
click node_auth_routes "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/auth-service/app/routers/auth_routes.py"
click node_auth_db "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/auth-service/app/database.py"
click node_report_routes "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/report-service/app/routers/report_routes.py"
click node_report_db "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/report-service/app/database.py"
click node_ai_routes "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/routers/ai_routes.py"
click node_pdf_parser "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/pdf_parser.py"
click node_ai_engine "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/ai_engine.py"
click node_analysis_context "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/report_context.py"
click node_ai_db "https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/database.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_app,node_auth_ui,node_login,node_upload_ui,node_reports_ui,node_history_ui,node_chat_ui,node_auth_client,node_report_client,node_ai_client,node_api_client toneBlue
class node_auth_routes,node_auth_db toneAmber
class node_report_routes,node_report_db,node_s3 toneMint
class node_ai_routes,node_pdf_parser,node_ai_engine,node_analysis_context,node_ai_db toneRose
class node_user,node_ollama toneIndigo
```

## Components

### Web application

- [App routing](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/App.js): `frontend/health-ai-frontend/src/App.js`
- [Auth state](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/contexts/AuthContext.jsx): `frontend/health-ai-frontend/src/contexts/AuthContext.jsx`
- [Login and registration](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/Login.jsx): `frontend/health-ai-frontend/src/components/Login.jsx`
- [Report upload](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/ReportUpload.jsx): `frontend/health-ai-frontend/src/components/ReportUpload.jsx`
- [Report list](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/ReportList.jsx): `frontend/health-ai-frontend/src/components/ReportList.jsx`
- [Analysis history](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/AnalysisHistory.jsx): `frontend/health-ai-frontend/src/components/AnalysisHistory.jsx`
- [Report chat](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/components/ChatWindow.jsx): `frontend/health-ai-frontend/src/components/ChatWindow.jsx`
- [Auth client](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/authService.js): `frontend/health-ai-frontend/src/services/authService.js`
- [Report client](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/reportService.js): `frontend/health-ai-frontend/src/services/reportService.js`
- [AI client](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/aiService.js): `frontend/health-ai-frontend/src/services/aiService.js`
- [HTTP clients](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/frontend/health-ai-frontend/src/services/api.js): `frontend/health-ai-frontend/src/services/api.js`

### Authentication

- [Auth endpoints](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/auth-service/app/routers/auth_routes.py): `services/auth-service/app/routers/auth_routes.py`
- [Auth database](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/auth-service/app/database.py): `services/auth-service/app/database.py`

### Report management

- [Report endpoints](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/report-service/app/routers/report_routes.py): `services/report-service/app/routers/report_routes.py`
- [Report database](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/report-service/app/database.py): `services/report-service/app/database.py`
- **Amazon S3**

### AI analysis

- [Analysis endpoints](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/routers/ai_routes.py): `services/ai-service/app/routers/ai_routes.py`
- [PDF extraction](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/pdf_parser.py): `services/ai-service/app/pdf_parser.py`
- [Analysis and Q&A](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/ai_engine.py): `services/ai-service/app/ai_engine.py`
- [Analysis records](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/report_context.py): `services/ai-service/app/report_context.py`
- [Analysis database](https://github.com/kaleeswarg25/healthify-ai-production-grade-cloud-native-ai-healthcare-platform/blob/master/services/ai-service/app/database.py): `services/ai-service/app/database.py`

### Other components

- **Patient**
- **Ollama model**

## Connections

- Patient → App routing: uses (evidence: `README.md`)
- App routing → Login and registration: routes to (evidence: `frontend/health-ai-frontend/src/App.js`)
- App routing → Report upload: routes to (evidence: `frontend/health-ai-frontend/src/App.js`)
- App routing → Report list: routes to (evidence: `frontend/health-ai-frontend/src/App.js`)
- App routing → Analysis history: routes to (evidence: `frontend/health-ai-frontend/src/App.js`)
- Login and registration → Auth state: uses (evidence: `frontend/health-ai-frontend/src/components/Login.jsx`)
- Auth state → Auth client: calls (evidence: `frontend/health-ai-frontend/src/contexts/AuthContext.jsx`)
- Auth client → HTTP clients: uses (evidence: `frontend/health-ai-frontend/src/services/authService.js`)
- Auth client → Auth endpoints: requests (evidence: `frontend/health-ai-frontend/src/services/authService.js`)
- Auth endpoints → Auth database: reads and writes (evidence: `services/auth-service/app/routers/auth_routes.py`)
- Report upload → Report client: uses (evidence: `frontend/health-ai-frontend/src/components/ReportUpload.jsx`)
- Report list → Report client: uses (evidence: `frontend/health-ai-frontend/src/components/ReportList.jsx`)
- Report upload → AI client: uses (evidence: `frontend/health-ai-frontend/src/components/ReportUpload.jsx`)
- Report list → AI client: uses (evidence: `frontend/health-ai-frontend/src/components/ReportList.jsx`)
- Analysis history → AI client: calls (evidence: `frontend/health-ai-frontend/src/components/AnalysisHistory.jsx`)
- Report chat → AI client: calls (evidence: `frontend/health-ai-frontend/src/components/ChatWindow.jsx`)
- Report client → HTTP clients: uses (evidence: `frontend/health-ai-frontend/src/services/reportService.js`)
- AI client → HTTP clients: uses (evidence: `frontend/health-ai-frontend/src/services/aiService.js`)
- Report client → Report endpoints: requests (evidence: `frontend/health-ai-frontend/src/services/reportService.js`)
- AI client → Analysis endpoints: requests (evidence: `frontend/health-ai-frontend/src/services/aiService.js`)
- Report endpoints → Report database: stores metadata (evidence: `services/report-service/app/routers/report_routes.py`)
- Report endpoints → Amazon S3: uploads and deletes (evidence: `services/report-service/app/routers/report_routes.py`)
- Analysis endpoints → PDF extraction: extracts text (evidence: `services/ai-service/app/routers/ai_routes.py`)
- Analysis endpoints → Analysis and Q&A: requests analysis (evidence: `services/ai-service/app/routers/ai_routes.py`)
- Analysis endpoints → Analysis records: manages records (evidence: `services/ai-service/app/routers/ai_routes.py`)
- Analysis records → Analysis database: uses models (evidence: `services/ai-service/app/report_context.py`)
- Analysis and Q&A → Ollama model: sends prompts (evidence: `services/ai-service/app/ai_engine.py`)
