# munindra-37/cure-360 architecture

> Architecture diagram of the GitHub repository munindra-37/cure-360, 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/munindra-37/cure-360
- Repository: https://github.com/munindra-37/cure-360

## Overview

AarogyaConnect 360 is a multi-role healthcare portal for patients, hospitals, and family caregivers. Patients can describe symptoms for multilingual triage and appointment suggestions, find and book doctors, manage prescriptions and diet, and access health records; hospital workflows include queues and report comparison, while family members get a view-only care portal. The browser app coordinates feature modules and calls a FastAPI server, which applies AI services and persists shared state. The README is empty; several listed features are represented by source files but their runtime wiring was not shown, so uncertain links are omitted.

Main entry points: [`MAIN/app/main.py`](https://github.com/munindra-37/cure-360/blob/main/MAIN/app/main.py) (Healthcare API), [`MAIN/static/js/app.js`](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/app.js) (Portal shell), [`MAIN/static/js/voice_ai.js`](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/voice_ai.js) (Voice assistant), [`MAIN/static/js/pharmacy.js`](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/pharmacy.js) (Pharmacy manager)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Web portals"]
  node_browser["Portal shell<br/>[app.js]"]
  node_family["Family portal<br/>[family.js]"]
  node_translations["Translations<br/>[i18n.js]"]
end

subgraph group_server["API and services"]
  node_api["Healthcare API<br/>[main.py]"]
  node_intelligence["AI engine<br/>[ai_engine.py]"]
  node_speech["Speech synthesis<br/>[tts_service.py]"]
end

subgraph group_care["Care features"]
  node_voice["Voice assistant<br/>[voice_ai.js]"]
  node_doctor_map["Doctor discovery<br/>[map.js]"]
  node_pharmacy["Pharmacy manager<br/>[pharmacy.js]"]
  node_health_charts["Health reports<br/>[charts.js]"]
  node_diet["Diet assistant<br/>[diet_agent.js]"]
  node_emergency["Emergency hub<br/>[emergency.js]"]
  node_queue["OPD queue<br/>[queue.js]"]
  node_schemes["Health schemes<br/>[schemes.js]"]
end

subgraph group_state["Shared state"]
  node_store[("Persistent state<br/>[data_store.py]")]
end

node_patient(("Portal user"))

node_patient -->|"uses"| node_browser
node_browser -->|"initializes"| node_voice
node_browser -->|"initializes"| node_queue
node_browser -->|"initializes"| node_translations
node_browser -->|"invokes upload"| node_pharmacy
node_doctor_map -->|"books through"| node_voice
node_voice -->|"requests triage"| node_api
node_voice -->|"books appointment"| node_api
node_pharmacy -->|"uploads prescription"| node_api
node_health_charts -->|"requests reports"| node_api
node_browser -->|"uploads records"| node_api
node_browser -->|"logs caregiver vitals"| node_api
node_api -->|"reads and updates"| node_store
node_api -->|"runs triage and analysis"| node_intelligence
node_api -->|"generates audio"| node_speech

click node_browser "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/app.js"
click node_voice "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/voice_ai.js"
click node_doctor_map "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/map.js"
click node_pharmacy "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/pharmacy.js"
click node_health_charts "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/charts.js"
click node_diet "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/diet_agent.js"
click node_emergency "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/emergency.js"
click node_family "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/family.js"
click node_queue "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/queue.js"
click node_schemes "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/schemes.js"
click node_translations "https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/i18n.js"
click node_api "https://github.com/munindra-37/cure-360/blob/main/MAIN/app/main.py"
click node_intelligence "https://github.com/munindra-37/cure-360/blob/main/MAIN/app/ai_engine.py"
click node_speech "https://github.com/munindra-37/cure-360/blob/main/MAIN/app/tts_service.py"
click node_store "https://github.com/munindra-37/cure-360/blob/main/MAIN/app/data_store.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_browser,node_family,node_translations,node_patient toneBlue
class node_api,node_intelligence,node_speech toneAmber
class node_voice,node_doctor_map,node_pharmacy,node_health_charts,node_diet,node_emergency,node_queue,node_schemes toneMint
class node_store toneRose
```

## Components

### Web portals

- [Portal shell](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/app.js): `MAIN/static/js/app.js`
- [Family portal](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/family.js): `MAIN/static/js/family.js`
- [Translations](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/i18n.js): `MAIN/static/js/i18n.js`

### API and services

- [Healthcare API](https://github.com/munindra-37/cure-360/blob/main/MAIN/app/main.py): `MAIN/app/main.py`
- [AI engine](https://github.com/munindra-37/cure-360/blob/main/MAIN/app/ai_engine.py): `MAIN/app/ai_engine.py`
- [Speech synthesis](https://github.com/munindra-37/cure-360/blob/main/MAIN/app/tts_service.py): `MAIN/app/tts_service.py`

### Care features

- [Voice assistant](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/voice_ai.js): `MAIN/static/js/voice_ai.js`
- [Doctor discovery](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/map.js): `MAIN/static/js/map.js`
- [Pharmacy manager](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/pharmacy.js): `MAIN/static/js/pharmacy.js`
- [Health reports](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/charts.js): `MAIN/static/js/charts.js`
- [Diet assistant](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/diet_agent.js): `MAIN/static/js/diet_agent.js`
- [Emergency hub](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/emergency.js): `MAIN/static/js/emergency.js`
- [OPD queue](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/queue.js): `MAIN/static/js/queue.js`
- [Health schemes](https://github.com/munindra-37/cure-360/blob/main/MAIN/static/js/schemes.js): `MAIN/static/js/schemes.js`

### Shared state

- [Persistent state](https://github.com/munindra-37/cure-360/blob/main/MAIN/app/data_store.py): `MAIN/app/data_store.py`

### Other components

- **Portal user**

## Connections

- Portal user → Portal shell: uses
- Portal shell → Voice assistant: initializes (evidence: `MAIN/static/js/app.js`)
- Portal shell → OPD queue: initializes (evidence: `MAIN/static/js/app.js`)
- Portal shell → Translations: initializes (evidence: `MAIN/static/js/app.js`)
- Portal shell → Pharmacy manager: invokes upload (evidence: `MAIN/static/js/app.js`)
- Doctor discovery → Voice assistant: books through (evidence: `MAIN/static/js/map.js`)
- Voice assistant → Healthcare API: requests triage (evidence: `MAIN/static/js/voice_ai.js`)
- Voice assistant → Healthcare API: books appointment (evidence: `MAIN/static/js/voice_ai.js`)
- Pharmacy manager → Healthcare API: uploads prescription (evidence: `MAIN/static/js/pharmacy.js`)
- Health reports → Healthcare API: requests reports (evidence: `MAIN/static/js/charts.js`)
- Portal shell → Healthcare API: uploads records (evidence: `MAIN/static/js/app.js`)
- Portal shell → Healthcare API: logs caregiver vitals (evidence: `MAIN/static/js/app.js`)
- Healthcare API → Persistent state: reads and updates (evidence: `MAIN/app/main.py`)
- Healthcare API → AI engine: runs triage and analysis (evidence: `MAIN/app/main.py`)
- Healthcare API → Speech synthesis: generates audio (evidence: `MAIN/app/main.py`)
