# abhishek4643/purvalaksana architecture

> Architecture diagram of the GitHub repository abhishek4643/purvalaksana, 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/abhishek4643/purvalaksana
- Repository: https://github.com/abhishek4643/purvalaksana

## Overview

PurvaLaksana is a Streamlit healthcare companion for patients and clinicians. The principal flow is login and role-based routing: patients reach the analysis portal, while doctors review patient records and analysis results. The patient portal combines medical-image screening, cardiac risk and report analysis, and documented assistant, reporting, and hospital-locator capabilities; Google Fit provides a separate health-data workflow. Edges reflect shown routing and database operations or README-documented capabilities. Several feature implementations were not sampled, so their internal calls are not inferred.

Main entry points: [`pages/1Home.py`](https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py) (Patient Portal), [`login.py`](https://github.com/abhishek4643/purvalaksana/blob/main/login.py) (Login and Routing), [`pages/googlefit.py`](https://github.com/abhishek4643/purvalaksana/blob/main/pages/googlefit.py) (Google Fit Monitoring), [`pages/doctor_dashboard_new.py`](https://github.com/abhishek4643/purvalaksana/blob/main/pages/doctor_dashboard_new.py) (Doctor Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Access"]
  node_login["Login and Routing<br/>[login.py]"]
end

subgraph group_patient["Patient Portal"]
  node_patient_home["Patient Portal<br/>[1Home.py]"]
end

subgraph group_clinical["Clinical Analysis"]
  node_image_screening["Image Screening<br/>[1Home.py]"]
  node_cardiac_risk["Cardiac Risk"]
  node_heart_report["Heart Report Analysis"]
  node_blood_reports["Blood Report Analysis<br/>[1Home.py]"]
end

subgraph group_care["Care Tools"]
  node_pdf_reports["PDF Reports<br/>[1Home.py]"]
  node_medical_assistant["AI Chat Assistant<br/>[1Home.py]"]
  node_hospital_locator["Hospital Locator<br/>[1Home.py]"]
  node_translation_voice["Language and Voice<br/>[1Home.py]"]
  node_google_fit["Google Fit Monitoring<br/>[googlefit.py]"]
end

subgraph group_doctor["Doctor Workspace"]
  node_doctor_dashboard["Doctor Dashboard"]
  node_patient_records[("Patient and Analysis Records")]
end

node_patient_actor(("Patient"))
node_doctor_actor(("Doctor"))
node_google_fit_service["Google Fit API"]
node_supabase_auth["Supabase Authentication"]
node_supabase_store[("Supabase Data Store")]

node_patient_actor -->|"signs in"| node_login
node_doctor_actor -->|"signs in"| node_login
node_login -->|"authenticates"| node_supabase_auth
node_login -->|"reads and creates profiles"| node_supabase_store
node_login -->|"routes patients"| node_patient_home
node_login -->|"routes doctors"| node_doctor_dashboard
node_patient_home -->|"offers screening"| node_image_screening
node_patient_home -->|"offers assessment"| node_cardiac_risk
node_patient_home -->|"offers analysis"| node_heart_report
node_patient_home -->|"offers analysis"| node_blood_reports
node_patient_home -->|"generates reports"| node_pdf_reports
node_patient_home -->|"offers assistance"| node_medical_assistant
node_patient_home -->|"locates hospitals"| node_hospital_locator
node_patient_home -->|"offers language and voice tools"| node_translation_voice
node_patient_actor -->|"monitors health data"| node_google_fit
node_google_fit -->|"fetches fitness data"| node_google_fit_service
node_doctor_dashboard -->|"manages records"| node_patient_records
node_patient_records -->|"reads and deletes results"| node_supabase_store

click node_login "https://github.com/abhishek4643/purvalaksana/blob/main/login.py"
click node_patient_home "https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py"
click node_image_screening "https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py"
click node_cardiac_risk "https://github.com/abhishek4643/purvalaksana/blob/main/pages/HeartDiseasePrediction.py"
click node_heart_report "https://github.com/abhishek4643/purvalaksana/blob/main/pages/heart_report_analyzer.py"
click node_blood_reports "https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py"
click node_pdf_reports "https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py"
click node_medical_assistant "https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py"
click node_hospital_locator "https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py"
click node_translation_voice "https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py"
click node_google_fit "https://github.com/abhishek4643/purvalaksana/blob/main/pages/googlefit.py"
click node_doctor_dashboard "https://github.com/abhishek4643/purvalaksana/blob/main/pages/doctor_dashboard_new.py"
click node_patient_records "https://github.com/abhishek4643/purvalaksana/blob/main/pages/doctor_dashboard_new.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_login toneBlue
class node_patient_home,node_supabase_store toneAmber
class node_image_screening,node_cardiac_risk,node_heart_report,node_blood_reports,node_google_fit_service toneMint
class node_pdf_reports,node_medical_assistant,node_hospital_locator,node_translation_voice,node_google_fit toneRose
class node_doctor_dashboard,node_patient_records,node_patient_actor,node_doctor_actor,node_supabase_auth toneIndigo
```

## Components

### Access

- [Login and Routing](https://github.com/abhishek4643/purvalaksana/blob/main/login.py): `login.py`

### Patient Portal

- [Patient Portal](https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py): `pages/1Home.py`

### Clinical Analysis

- [Image Screening](https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py): `pages/1Home.py`
- [Cardiac Risk](https://github.com/abhishek4643/purvalaksana/blob/main/pages/HeartDiseasePrediction.py): `pages/HeartDiseasePrediction.py`
- [Heart Report Analysis](https://github.com/abhishek4643/purvalaksana/blob/main/pages/heart_report_analyzer.py): `pages/heart_report_analyzer.py`
- [Blood Report Analysis](https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py): `pages/1Home.py`

### Care Tools

- [PDF Reports](https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py): `pages/1Home.py`
- [AI Chat Assistant](https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py): `pages/1Home.py`
- [Hospital Locator](https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py): `pages/1Home.py`
- [Language and Voice](https://github.com/abhishek4643/purvalaksana/blob/main/pages/1Home.py): `pages/1Home.py`
- [Google Fit Monitoring](https://github.com/abhishek4643/purvalaksana/blob/main/pages/googlefit.py): `pages/googlefit.py`

### Doctor Workspace

- [Doctor Dashboard](https://github.com/abhishek4643/purvalaksana/blob/main/pages/doctor_dashboard_new.py): `pages/doctor_dashboard_new.py`
- [Patient and Analysis Records](https://github.com/abhishek4643/purvalaksana/blob/main/pages/doctor_dashboard_new.py): `pages/doctor_dashboard_new.py`

### Other components

- **Patient**
- **Doctor**
- **Google Fit API**
- **Supabase Authentication**
- **Supabase Data Store**

## Connections

- Patient → Login and Routing: signs in (evidence: `README.md`)
- Doctor → Login and Routing: signs in (evidence: `README.md`)
- Login and Routing → Supabase Authentication: authenticates (evidence: `login.py`)
- Login and Routing → Supabase Data Store: reads and creates profiles (evidence: `login.py`)
- Login and Routing → Patient Portal: routes patients (evidence: `login.py`)
- Login and Routing → Doctor Dashboard: routes doctors (evidence: `login.py`)
- Patient Portal → Image Screening: offers screening (evidence: `README.md`)
- Patient Portal → Cardiac Risk: offers assessment (evidence: `README.md`)
- Patient Portal → Heart Report Analysis: offers analysis (evidence: `README.md`)
- Patient Portal → Blood Report Analysis: offers analysis (evidence: `README.md`)
- Patient Portal → PDF Reports: generates reports (evidence: `README.md`)
- Patient Portal → AI Chat Assistant: offers assistance (evidence: `README.md`)
- Patient Portal → Hospital Locator: locates hospitals (evidence: `README.md`)
- Patient Portal → Language and Voice: offers language and voice tools (evidence: `README.md`)
- Patient → Google Fit Monitoring: monitors health data (evidence: `README.md`)
- Google Fit Monitoring → Google Fit API: fetches fitness data (evidence: `pages/googlefit.py`)
- Doctor Dashboard → Patient and Analysis Records: manages records (evidence: `pages/doctor_dashboard_new.py`)
- Patient and Analysis Records → Supabase Data Store: reads and deletes results (evidence: `pages/doctor_dashboard_new.py`)
