# healthscreen-ai/ai-powered-health-screening-platform architecture

> Architecture diagram of the GitHub repository healthscreen-ai/ai-powered-health-screening-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-14). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/healthscreen-ai/ai-powered-health-screening-platform
- Repository: https://github.com/healthscreen-ai/ai-powered-health-screening-platform

## Overview

This is a full-stack AI-assisted health-screening platform. A user registers or signs in, then submits symptoms or a skin image; the backend authenticates the request, predicts a screening result, and stores an assessment. Users can review assessment history on the dashboard. The README also describes longitudinal history and condition trends. The sampled code confirms the symptom and image prediction paths and frontend routing; API-to-backend links for unsampled dashboard and authentication calls are shown as unverified where needed.

Main entry points: [`frontend/src/utils/api.js`](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/utils/api.js) (API client), [`frontend/src/App.jsx`](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/App.jsx) (Route shell), [`backend/routers/image_diagnosis.py`](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/image_diagnosis.py) (Image screening), [`backend/routers/symptom.py`](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/symptom.py) (Symptom screening)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web application"]
  node_app["Route shell<br/>[App.jsx]"]
  node_register["Registration<br/>[Register.jsx]"]
  node_login["Login<br/>[Login.jsx]"]
  node_symptom_ui["Symptom form<br/>[SymptomChecker.jsx]"]
  node_image_ui["Image upload<br/>[ImageDiagnosis.jsx]"]
  node_dashboard["Health dashboard<br/>[Dashboard.jsx]"]
  node_api_client["API client<br/>[api.js]"]
  node_result_card["Result display<br/>[ResultCard.jsx]"]
end

subgraph group_api["API and screening"]
  node_auth_router["Authentication API<br/>[auth.py]"]
  node_jwt["JWT identity<br/>[jwt.py]"]
  node_symptom_api["Symptom screening<br/>[symptom.py]"]
  node_image_api["Image screening<br/>[image_diagnosis.py]"]
  node_history_api["Assessment history<br/>[assessments.py]"]
  node_image_processing["Image preprocessing<br/>[image_utils.py]"]
  node_api_app["FastAPI assembly<br/>[main.py]"]
end

subgraph group_data["Persistence and models"]
  node_database[("Assessment database<br/>[database.py]")]
  node_symptom_model["Symptom artifacts<br/>[symptom_model.pkl]"]
  node_skin_model["Skin model<br/>[skin_model.pt]"]
end

node_user(("User"))

node_user -->|"uses"| node_app
node_app -->|"routes to"| node_register
node_app -->|"routes to"| node_login
node_app -->|"routes to"| node_symptom_ui
node_app -->|"routes to"| node_image_ui
node_app -->|"routes to"| node_dashboard
node_register -->|"submits via"| node_api_client
node_login -.->|"requests via"| node_api_client
node_symptom_ui -->|"requests via"| node_api_client
node_image_ui -->|"uploads via"| node_api_client
node_dashboard -->|"loads history"| node_api_client
node_symptom_ui -->|"renders"| node_result_card
node_image_ui -->|"renders"| node_result_card
node_api_client -.->|"calls API"| node_auth_router
node_api_client -.->|"calls API"| node_symptom_api
node_api_client -.->|"calls API"| node_image_api
node_api_client -.->|"calls API"| node_history_api
node_api_app -->|"mounts"| node_auth_router
node_api_app -->|"mounts"| node_symptom_api
node_api_app -->|"mounts"| node_image_api
node_api_app -->|"mounts"| node_history_api
node_auth_router -->|"issues tokens"| node_jwt
node_symptom_api -->|"authenticates with"| node_jwt
node_image_api -->|"authenticates with"| node_jwt
node_history_api -->|"authenticates with"| node_jwt
node_auth_router -->|"reads and writes"| node_database
node_jwt -->|"looks up user"| node_database
node_symptom_api -->|"saves assessment"| node_database
node_image_api -->|"saves assessment"| node_database
node_history_api -->|"queries history"| node_database
node_symptom_api -->|"loads artifacts"| node_symptom_model
node_image_api -->|"loads model"| node_skin_model
node_image_api -->|"preprocesses with"| node_image_processing

click node_app "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/App.jsx"
click node_register "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/Register.jsx"
click node_login "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/Login.jsx"
click node_symptom_ui "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/SymptomChecker.jsx"
click node_image_ui "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/ImageDiagnosis.jsx"
click node_dashboard "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/Dashboard.jsx"
click node_api_client "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/utils/api.js"
click node_result_card "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/components/ResultCard.jsx"
click node_auth_router "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/auth.py"
click node_jwt "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/utils/jwt.py"
click node_symptom_api "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/symptom.py"
click node_image_api "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/image_diagnosis.py"
click node_history_api "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/assessments.py"
click node_image_processing "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/utils/image_utils.py"
click node_api_app "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/main.py"
click node_database "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/models/database.py"
click node_symptom_model "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/ml_models/symptom_model.pkl"
click node_skin_model "https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/ml_models/skin_model.pt"

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_register,node_login,node_symptom_ui,node_image_ui,node_dashboard,node_api_client,node_result_card,node_user toneBlue
class node_auth_router,node_jwt,node_symptom_api,node_image_api,node_history_api,node_image_processing,node_api_app toneAmber
class node_database,node_symptom_model,node_skin_model toneMint
```

## Components

### Web application

- [Route shell](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/App.jsx): `frontend/src/App.jsx`
- [Registration](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/Register.jsx): `frontend/src/pages/Register.jsx`
- [Login](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/Login.jsx): `frontend/src/pages/Login.jsx`
- [Symptom form](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/SymptomChecker.jsx): `frontend/src/pages/SymptomChecker.jsx`
- [Image upload](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/ImageDiagnosis.jsx): `frontend/src/pages/ImageDiagnosis.jsx`
- [Health dashboard](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/pages/Dashboard.jsx): `frontend/src/pages/Dashboard.jsx`
- [API client](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/utils/api.js): `frontend/src/utils/api.js`
- [Result display](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/frontend/src/components/ResultCard.jsx): `frontend/src/components/ResultCard.jsx`

### API and screening

- [Authentication API](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/auth.py): `backend/routers/auth.py`
- [JWT identity](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/utils/jwt.py): `backend/utils/jwt.py`
- [Symptom screening](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/symptom.py): `backend/routers/symptom.py`
- [Image screening](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/image_diagnosis.py): `backend/routers/image_diagnosis.py`
- [Assessment history](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/routers/assessments.py): `backend/routers/assessments.py`
- [Image preprocessing](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/utils/image_utils.py): `backend/utils/image_utils.py`
- [FastAPI assembly](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/main.py): `backend/main.py`

### Persistence and models

- [Assessment database](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/backend/models/database.py): `backend/models/database.py`
- [Symptom artifacts](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/ml_models/symptom_model.pkl): `ml_models/symptom_model.pkl`
- [Skin model](https://github.com/healthscreen-ai/ai-powered-health-screening-platform/blob/main/ml_models/skin_model.pt): `ml_models/skin_model.pt`

### Other components

- **User**

## Connections

- User → Route shell: uses (evidence: `README.md`)
- Route shell → Registration: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Login: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Symptom form: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Image upload: routes to (evidence: `frontend/src/App.jsx`)
- Route shell → Health dashboard: routes to (evidence: `frontend/src/App.jsx`)
- Registration → API client: submits via (evidence: `frontend/src/pages/Register.jsx`)
- Login → API client: requests via (evidence: `frontend/src/pages/Login.jsx`)
- Symptom form → API client: requests via (evidence: `frontend/src/pages/SymptomChecker.jsx`)
- Image upload → API client: uploads via (evidence: `frontend/src/pages/ImageDiagnosis.jsx`)
- Health dashboard → API client: loads history (evidence: `frontend/src/pages/Dashboard.jsx`)
- Symptom form → Result display: renders (evidence: `frontend/src/pages/SymptomChecker.jsx`)
- Image upload → Result display: renders (evidence: `frontend/src/pages/ImageDiagnosis.jsx`)
- API client → Authentication API: calls API
- API client → Symptom screening: calls API
- API client → Image screening: calls API
- API client → Assessment history: calls API
- FastAPI assembly → Authentication API: mounts (evidence: `backend/main.py`)
- FastAPI assembly → Symptom screening: mounts (evidence: `backend/main.py`)
- FastAPI assembly → Image screening: mounts (evidence: `backend/main.py`)
- FastAPI assembly → Assessment history: mounts (evidence: `backend/main.py`)
- Authentication API → JWT identity: issues tokens (evidence: `backend/routers/auth.py`)
- Symptom screening → JWT identity: authenticates with (evidence: `backend/routers/symptom.py`)
- Image screening → JWT identity: authenticates with (evidence: `backend/routers/image_diagnosis.py`)
- Assessment history → JWT identity: authenticates with (evidence: `backend/routers/assessments.py`)
- Authentication API → Assessment database: reads and writes (evidence: `backend/routers/auth.py`)
- JWT identity → Assessment database: looks up user (evidence: `backend/utils/jwt.py`)
- Symptom screening → Assessment database: saves assessment (evidence: `backend/routers/symptom.py`)
- Image screening → Assessment database: saves assessment (evidence: `backend/routers/image_diagnosis.py`)
- Assessment history → Assessment database: queries history (evidence: `backend/routers/assessments.py`)
- Symptom screening → Symptom artifacts: loads artifacts (evidence: `backend/routers/symptom.py`)
- Image screening → Skin model: loads model (evidence: `backend/routers/image_diagnosis.py`)
- Image screening → Image preprocessing: preprocesses with (evidence: `backend/routers/image_diagnosis.py`)
