# shanawazshaik42/careecho architecture

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

## Overview

CareEcho’s main workflow turns a discharge paper into a patient schedule, then guides each dose through spoken reminders, a meal check, tablet verification, and dose logging. Family or health workers configure care; patients use the voice screen. The runtime is concentrated in app.py, with data.json as documented JSON storage. The README describes caregiver alerts and revisit guidance, but the excerpts do not show their implementation details, so those links are documented rather than inferred from source.

Main entry points: [`app.py`](https://github.com/shanawazshaik42/careecho/blob/main/app.py) (Voice screen), [`data.json`](https://github.com/shanawazshaik42/careecho/blob/main/data.json) (Patient data)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_setup["Care setup"]
  node_setupui["Setup page<br/>[app.py]"]
  node_paperextract["Paper extraction<br/>[app.py]"]
  node_schedule["Care schedule<br/>[app.py]"]
end

subgraph group_guidance["Patient guidance"]
  node_voiceui["Voice screen<br/>[app.py]"]
  node_doseprompt["Dose prompts<br/>[app.py]"]
  node_mealcheck["Meal check<br/>[app.py]"]
  node_pillverify["Tablet verification<br/>[app.py]"]
  node_missedalert["Missed-dose alert<br/>[app.py]"]
  node_dietadvice["Diet guidance<br/>[app.py]"]
  node_revisit["Revisit guidance<br/>[app.py]"]
end

subgraph group_caredata["Care state"]
  node_doselog["Dose logging<br/>[app.py]"]
  node_store[("Patient data<br/>[data.json]")]
end

subgraph group_integrations["External services"]
  node_gemini["Gemini API"]
  node_speech["Speech synthesis"]
end

node_caregiver(("Family or worker"))
node_patient(("Patient"))

node_caregiver -->|"configures care"| node_setupui
node_setupui -->|"submits paper"| node_paperextract
node_paperextract -->|"extracts schedule"| node_gemini
node_setupui -->|"confirms schedule"| node_schedule
node_schedule -->|"saves schedule"| node_store
node_patient -->|"uses screen"| node_voiceui
node_voiceui -->|"requests prompt"| node_doseprompt
node_doseprompt -.->|"reads schedule"| node_store
node_voiceui -->|"checks meal"| node_mealcheck
node_voiceui -->|"submits photo"| node_pillverify
node_pillverify -->|"checks tablets"| node_gemini
node_voiceui -->|"reports dose"| node_doselog
node_doselog -->|"records dose"| node_store
node_store -.->|"supplies missed doses"| node_missedalert
node_missedalert -->|"alerts caregiver"| node_caregiver
node_voiceui -->|"requests guidance"| node_dietadvice
node_voiceui -.->|"requests reminder"| node_revisit
node_doseprompt -->|"speaks prompt"| node_speech
node_dietadvice -->|"speaks advice"| node_speech

click node_setupui "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_paperextract "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_schedule "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_voiceui "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_doseprompt "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_mealcheck "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_pillverify "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_doselog "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_missedalert "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_dietadvice "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_revisit "https://github.com/shanawazshaik42/careecho/blob/main/app.py"
click node_store "https://github.com/shanawazshaik42/careecho/blob/main/data.json"

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_setupui,node_paperextract,node_schedule toneBlue
class node_voiceui,node_doseprompt,node_mealcheck,node_pillverify,node_missedalert,node_dietadvice,node_revisit toneAmber
class node_doselog,node_store toneMint
class node_gemini,node_speech,node_caregiver toneRose
class node_patient toneIndigo
```

## Components

### Care setup

- [Setup page](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`
- [Paper extraction](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`
- [Care schedule](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`

### Patient guidance

- [Voice screen](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`
- [Dose prompts](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`
- [Meal check](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`
- [Tablet verification](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`
- [Missed-dose alert](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`
- [Diet guidance](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`
- [Revisit guidance](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`

### Care state

- [Dose logging](https://github.com/shanawazshaik42/careecho/blob/main/app.py): `app.py`
- [Patient data](https://github.com/shanawazshaik42/careecho/blob/main/data.json): `data.json`

### External services

- **Gemini API**
- **Speech synthesis**

### Other components

- **Family or worker**
- **Patient**

## Connections

- Family or worker → Setup page: configures care (evidence: `README.md`)
- Setup page → Paper extraction: submits paper (evidence: `README.md`)
- Paper extraction → Gemini API: extracts schedule (evidence: `README.md`)
- Setup page → Care schedule: confirms schedule (evidence: `README.md`)
- Care schedule → Patient data: saves schedule (evidence: `README.md`)
- Patient → Voice screen: uses screen (evidence: `README.md`)
- Voice screen → Dose prompts: requests prompt (evidence: `app.py`)
- Dose prompts → Patient data: reads schedule
- Voice screen → Meal check: checks meal (evidence: `README.md`)
- Voice screen → Tablet verification: submits photo (evidence: `README.md`)
- Tablet verification → Gemini API: checks tablets (evidence: `README.md`)
- Voice screen → Dose logging: reports dose (evidence: `README.md`)
- Dose logging → Patient data: records dose (evidence: `README.md`)
- Patient data → Missed-dose alert: supplies missed doses (evidence: `README.md`)
- Missed-dose alert → Family or worker: alerts caregiver (evidence: `README.md`)
- Voice screen → Diet guidance: requests guidance (evidence: `README.md`)
- Voice screen → Revisit guidance: requests reminder (evidence: `app.py`)
- Dose prompts → Speech synthesis: speaks prompt (evidence: `README.md`)
- Diet guidance → Speech synthesis: speaks advice (evidence: `README.md`)
