# pgafx11354/project15-teleassistance architecture

> Architecture diagram of the GitHub repository pgafx11354/project15-teleassistance, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-25). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pgafx11354/project15-teleassistance
- Repository: https://github.com/pgafx11354/project15-teleassistance

## Overview

This repository is a Streamlit teleassistance prototype for assessing fall risk. The principal workflow is: a user supplies a camera image and inactivity/scenario settings; the app runs vision and routine analyses, combines their outputs with inactivity context in an alert decision, and displays the results. The vision agent loads a CNN model; the routine agent currently returns a fixed anomaly result, and the alert agent applies rules rather than loading its supplied model path. Training files and score tables are present, but their runtime role is not established by the excerpts.

Main entry points: [`app.py`](https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/app.py) (Streamlit app), [`agents/vision_agent.py`](https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/agents/vision_agent.py) (Vision analysis), [`agents/routine_agent.py`](https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/agents/routine_agent.py) (Routine analysis), [`agents/alert_agent.py`](https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/agents/alert_agent.py) (Alert decision)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["User interface"]
  node_app["Streamlit app<br/>[app.py]"]
end

subgraph group_assessment["Risk assessment"]
  node_vision["Vision analysis<br/>[vision_agent.py]"]
  node_routine["Routine analysis<br/>[routine_agent.py]"]
  node_alert["Alert decision<br/>[alert_agent.py]"]
  node_cnn["Vision CNN"]
end

node_user(("User"))

node_user -->|"provides inputs"| node_app
node_app -->|"analyzes image"| node_vision
node_app -->|"analyzes scenario"| node_routine
node_app -->|"requests decision"| node_alert
node_vision -->|"loads model"| node_cnn
node_vision -->|"returns assessment"| node_app
node_routine -->|"returns assessment"| node_app
node_alert -->|"returns alert level"| node_app
node_app -->|"displays results"| node_user

click node_app "https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/app.py"
click node_vision "https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/agents/vision_agent.py"
click node_routine "https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/agents/routine_agent.py"
click node_alert "https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/agents/alert_agent.py"
click node_cnn "https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/models/vision_cnn_best.keras"

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_app,node_user toneBlue
class node_vision,node_routine,node_alert,node_cnn toneAmber
```

## Components

### User interface

- [Streamlit app](https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/app.py): `app.py`

### Risk assessment

- [Vision analysis](https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/agents/vision_agent.py): `agents/vision_agent.py`
- [Routine analysis](https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/agents/routine_agent.py): `agents/routine_agent.py`
- [Alert decision](https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/agents/alert_agent.py): `agents/alert_agent.py`
- [Vision CNN](https://github.com/pgafx11354/project15-teleassistance/blob/feat/cnn-routine/models/vision_cnn_best.keras): `models/vision_cnn_best.keras`

### Other components

- **User**

## Connections

- User → Streamlit app: provides inputs (evidence: `app.py`)
- Streamlit app → Vision analysis: analyzes image (evidence: `app.py`)
- Streamlit app → Routine analysis: analyzes scenario (evidence: `app.py`)
- Streamlit app → Alert decision: requests decision (evidence: `app.py`)
- Vision analysis → Vision CNN: loads model (evidence: `agents/vision_agent.py`)
- Vision analysis → Streamlit app: returns assessment (evidence: `app.py`)
- Routine analysis → Streamlit app: returns assessment (evidence: `app.py`)
- Alert decision → Streamlit app: returns alert level (evidence: `app.py`)
- Streamlit app → User: displays results (evidence: `app.py`)
