# sazzan39/fend-ai-elderly-care architecture

> Architecture diagram of the GitHub repository sazzan39/fend-ai-elderly-care, 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/sazzan39/fend-ai-elderly-care
- Repository: https://github.com/sazzan39/fend-ai-elderly-care

## Overview

Fend is a browser-based elder-care assistant combining a Rasa-backed text/voice conversation interface with Agora audio/video sessions. The user submits typed or spoken input, the browser sends it to the Rasa webhook, and returned text is displayed and spoken; a separate join/leave workflow manages live media. The README also documents emotional support, multilingual conversation, reminders, and caregiver assistance, but the sampled source does not show their implementation. The Rasa configuration files are present, but their contents were not sampled, so their wiring is left unspecified.

Main entry points: [`script.js`](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/script.js) (Chat interface), [`README.md`](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/README.md) (Health reminders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_conversation["Conversation experience"]
  node_chat["Chat interface<br/>[script.js]"]
  node_speech["Browser speech APIs"]
  node_rasa["Rasa webhook"]
  node_index["Main page<br/>[index.html]"]
end

subgraph group_media["Live media"]
  node_session["Call controls<br/>[script.js]"]
  node_agora["Agora RTC"]
  node_alternate["Alternate page<br/>[1.html]"]
end

subgraph group_assistant["Assistant capabilities"]
  node_domain["Conversation domain<br/>[domain.yml]"]
  node_reminders["Health reminders<br/>[README.md]"]
  node_emotional["Emotional support<br/>[README.md]"]
  node_multilingual["Multilingual support<br/>[README.md]"]
  node_caregivers["Caregiver assistance<br/>[README.md]"]
end

node_user(("Elderly user"))

node_user -->|"sends message"| node_chat
node_chat -->|"posts message"| node_rasa
node_rasa -->|"returns replies"| node_chat
node_chat -->|"uses voice"| node_speech
node_user -->|"joins call"| node_session
node_session -->|"joins and publishes"| node_agora
node_session -->|"subscribes to streams"| node_agora
node_user -->|"asks about tasks"| node_reminders
node_user -->|"shares feelings"| node_emotional
node_user -->|"converses in languages"| node_multilingual
node_caregivers -->|"receives information"| node_reminders

click node_chat "https://github.com/sazzan39/fend-ai-elderly-care/blob/main/script.js"
click node_domain "https://github.com/sazzan39/fend-ai-elderly-care/blob/main/domain.yml"
click node_reminders "https://github.com/sazzan39/fend-ai-elderly-care/blob/main/README.md"
click node_emotional "https://github.com/sazzan39/fend-ai-elderly-care/blob/main/README.md"
click node_multilingual "https://github.com/sazzan39/fend-ai-elderly-care/blob/main/README.md"
click node_caregivers "https://github.com/sazzan39/fend-ai-elderly-care/blob/main/README.md"
click node_session "https://github.com/sazzan39/fend-ai-elderly-care/blob/main/script.js"
click node_index "https://github.com/sazzan39/fend-ai-elderly-care/blob/main/index.html"
click node_alternate "https://github.com/sazzan39/fend-ai-elderly-care/blob/main/1.html"

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_chat,node_speech,node_rasa,node_index,node_user toneBlue
class node_session,node_agora,node_alternate toneAmber
class node_domain,node_reminders,node_emotional,node_multilingual,node_caregivers toneMint
```

## Components

### Conversation experience

- [Chat interface](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/script.js): `script.js`
- **Browser speech APIs**
- **Rasa webhook**
- [Main page](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/index.html): `index.html`

### Live media

- [Call controls](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/script.js): `script.js`
- **Agora RTC**
- [Alternate page](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/1.html): `1.html`

### Assistant capabilities

- [Conversation domain](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/domain.yml): `domain.yml`
- [Health reminders](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/README.md): `README.md`
- [Emotional support](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/README.md): `README.md`
- [Multilingual support](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/README.md): `README.md`
- [Caregiver assistance](https://github.com/sazzan39/fend-ai-elderly-care/blob/main/README.md): `README.md`

### Other components

- **Elderly user**

## Connections

- Elderly user → Chat interface: sends message (evidence: `README.md`)
- Chat interface → Rasa webhook: posts message (evidence: `script.js`)
- Rasa webhook → Chat interface: returns replies (evidence: `script.js`)
- Chat interface → Browser speech APIs: uses voice (evidence: `script.js`)
- Elderly user → Call controls: joins call (evidence: `script.js`)
- Call controls → Agora RTC: joins and publishes (evidence: `script.js`)
- Call controls → Agora RTC: subscribes to streams (evidence: `script.js`)
- Elderly user → Health reminders: asks about tasks (evidence: `README.md`)
- Elderly user → Emotional support: shares feelings (evidence: `README.md`)
- Elderly user → Multilingual support: converses in languages (evidence: `README.md`)
- Caregiver assistance → Health reminders: receives information (evidence: `README.md`)
