# suhaasteja/healthcare_dashboard architecture

> Architecture diagram of the GitHub repository suhaasteja/healthcare_dashboard, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/suhaasteja/healthcare_dashboard
- Repository: https://github.com/suhaasteja/healthcare_dashboard

## Overview

##### Project type and purpose
- This is a static, single‑page Patient Dashboard web application (front‑end only) that runs entirely in the browser.
- Its sole responsibility is to fetch patient data from an external API and render an interactive UI (charts, tables, cards).

##### File structure
- index.html: the shell of the SPA, loads all assets.
- styles.css: global and responsive styling.
- script.js: application logic, data fetching, DOM manipulation, Chart.js integration.
- Readme.md: describes features, tech stack, API endpoint.

##### README for additional insights
- Uses fetch() with Basic Authentication to call:
https://fedskillstest.coalitiontechnologies.workers.dev
- Chart.js for line charts of blood pressure.
- UI sections: Overview, Patients, Schedule, Messages, Transactions, Profile, History, Diagnostics, Lab Results.

##### Detailed breakdown of components
- Browser Client
- index.html
- styles.css
- script.js
– fetchPatientData()
– renderPatientList()
– renderProfile(), renderHistory(), renderDiagnostics(), renderLabResults()
- Chart.js integration
- Chart initialization and update calls
- External API Service
- Endpoint URL
- Basic Auth header
- External CDNs
- Google Fonts

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Browser Client"
        direction TB
        HTML["index.html"]:::browser
        Styles["styles.css"]:::browser
        Script["script.js"]:::browser
        Chart["Chart.js"]:::chart
    end

    CDN["Google Fonts & Icons CDN"]:::cdn
    API["External API (Basic Auth)"]:::api
    Assets["assets/"]:::assets
    Readme["Readme.md"]:::docs

    Script -->|"GET /patients, GET /patient/:id"| API
    API -->|"JSON payload"| Script
    Script -->|"Chart data"| Chart
    Script ---|"GET /patient/:id/labResults"| API
    HTML -->|"loads CDN assets"| CDN

    click HTML "https://github.com/suhaasteja/healthcare_dashboard/blob/main/index.html"
    click Styles "https://github.com/suhaasteja/healthcare_dashboard/blob/main/styles.css"
    click Script "https://github.com/suhaasteja/healthcare_dashboard/blob/main/script.js"
    click Chart "https://github.com/suhaasteja/healthcare_dashboard/blob/main/index.html"
    click API "https://github.com/suhaasteja/healthcare_dashboard/blob/main/script.js"
    click Assets "https://github.com/suhaasteja/healthcare_dashboard/tree/main/assets/"
    click Readme "https://github.com/suhaasteja/healthcare_dashboard/blob/main/Readme.md"

    classDef browser fill:#D0E8FF,stroke:#0066CC,color:#000;
    classDef chart fill:#FFE4B3,stroke:#FF8C00,color:#000;
    classDef api fill:#DFF2D8,stroke:#4CAF50,color:#000;
    classDef cdn fill:#ECECEC,stroke:#999999,color:#000;
    classDef assets fill:#FFF5CC,stroke:#CC9900,color:#000;
    classDef docs fill:#F2D9E6,stroke:#CC3366,color:#000;
```
