# adeena-falah/carefree-aiding_caretakers_3 architecture

> Architecture diagram of the GitHub repository adeena-falah/carefree-aiding_caretakers_3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/adeena-falah/carefree-aiding_caretakers_3
- Repository: https://github.com/adeena-falah/carefree-aiding_caretakers_3

## Overview

Carefree is a role-based caregiving and health-monitoring platform. Caretakers and guardians use separate portals to sign in and manage or review patient information; caretaker workflows include tasks, appointments, notifications, expenses, and health records. Analysts can use the documented stress and insurance-cost prediction capabilities. The API is the runtime entry point, with route modules handling domain operations and Oracle providing persistence. The excerpts confirm several API-to-database interactions and task/appointment notification calls; frontend wiring and prediction internals are not fully sampled, so those links are limited to documented capabilities.

Main entry points: [`main.py`](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/main.py) (FastAPI app), [`database.py`](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/database.py) (Oracle access), [`routes/notifications.py`](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/notifications.py) (Notifications), [`routes/tasks.py`](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/tasks.py) (Care tasks)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web portals"]
  node_caretaker_portal["Caretaker portal<br/>[caretaker.html]"]
  node_guardian_portal["Guardian portal<br/>[guardian.html]"]
  node_login_portal["Login portal<br/>[login.html]"]
end

subgraph group_api["API workflows"]
  node_api_app["FastAPI app<br/>[main.py]"]
  node_authentication["Authentication<br/>[auth.py]"]
  node_patients["Patient management<br/>[patients.py]"]
  node_tasks["Care tasks<br/>[tasks.py]"]
  node_appointments["Appointments<br/>[appointments.py]"]
  node_notifications["Notifications<br/>[notifications.py]"]
  node_expenses["Expense tracking<br/>[expenses.py]"]
end

subgraph group_health["Health analytics"]
  node_vitals["Vitals records<br/>[vitals.py]"]
  node_symptoms["Symptom records<br/>[symptoms.py]"]
  node_predictions_api["Prediction API<br/>[predictions.py]"]
  node_ml_engine["Prediction models<br/>[ml_models.py]"]
  node_lifestyle_data["Lifestyle dataset"]
  node_insurance_data["Insurance dataset<br/>[insurance.csv]"]
end

subgraph group_persistence["Persistence"]
  node_db_access["Oracle access<br/>[database.py]"]
  node_oracle[("Oracle database<br/>[carefree.sql]")]
end

node_caretakers(("Caretakers"))
node_guardians(("Guardians"))
node_analysts(("Analysts"))

node_caretakers -->|"sign in"| node_login_portal
node_guardians -->|"sign in"| node_login_portal
node_analysts -.->|"request predictions"| node_api_app
node_caretakers -->|"manage care"| node_caretaker_portal
node_guardians -->|"monitor care"| node_guardian_portal
node_login_portal -->|"authenticate"| node_api_app
node_caretaker_portal -->|"use API"| node_api_app
node_guardian_portal -->|"use API"| node_api_app
node_api_app -->|"dispatches"| node_authentication
node_api_app -->|"dispatches"| node_patients
node_api_app -->|"dispatches"| node_tasks
node_api_app -->|"dispatches"| node_appointments
node_api_app -->|"dispatches"| node_expenses
node_api_app -->|"dispatches"| node_notifications
node_api_app -->|"dispatches"| node_vitals
node_api_app -->|"dispatches"| node_symptoms
node_api_app -->|"dispatches"| node_predictions_api
node_authentication -->|"queries"| node_db_access
node_patients -->|"queries"| node_db_access
node_tasks -->|"queries"| node_db_access
node_appointments -->|"queries"| node_db_access
node_notifications -->|"queries"| node_db_access
node_tasks -->|"creates reminders"| node_notifications
node_appointments -->|"creates reminders"| node_notifications
node_db_access -->|"connects"| node_oracle
node_predictions_api -.->|"uses models"| node_ml_engine
node_ml_engine -.->|"uses data"| node_lifestyle_data
node_ml_engine -.->|"uses data"| node_insurance_data

click node_caretaker_portal "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/templates/caretaker.html"
click node_guardian_portal "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/templates/guardian.html"
click node_login_portal "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/templates/login.html"
click node_api_app "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/main.py"
click node_authentication "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/auth.py"
click node_patients "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/patients.py"
click node_tasks "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/tasks.py"
click node_appointments "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/appointments.py"
click node_notifications "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/notifications.py"
click node_expenses "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/expenses.py"
click node_vitals "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/vitals.py"
click node_symptoms "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/symptoms.py"
click node_predictions_api "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/predictions.py"
click node_ml_engine "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/ml_models.py"
click node_lifestyle_data "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/Sleep_health_and_lifestyle_dataset.csv"
click node_insurance_data "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/insurance.csv"
click node_db_access "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/database.py"
click node_oracle "https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/carefree.sql"

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_caretaker_portal,node_guardian_portal,node_login_portal toneBlue
class node_api_app,node_authentication,node_patients,node_tasks,node_appointments,node_notifications,node_expenses toneAmber
class node_vitals,node_symptoms,node_predictions_api,node_ml_engine,node_lifestyle_data,node_insurance_data toneMint
class node_db_access,node_oracle toneRose
class node_caretakers,node_guardians,node_analysts toneIndigo
```

## Components

### Web portals

- [Caretaker portal](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/templates/caretaker.html): `templates/caretaker.html`
- [Guardian portal](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/templates/guardian.html): `templates/guardian.html`
- [Login portal](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/templates/login.html): `templates/login.html`

### API workflows

- [FastAPI app](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/main.py): `main.py`
- [Authentication](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/auth.py): `routes/auth.py`
- [Patient management](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/patients.py): `routes/patients.py`
- [Care tasks](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/tasks.py): `routes/tasks.py`
- [Appointments](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/appointments.py): `routes/appointments.py`
- [Notifications](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/notifications.py): `routes/notifications.py`
- [Expense tracking](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/expenses.py): `routes/expenses.py`

### Health analytics

- [Vitals records](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/vitals.py): `routes/vitals.py`
- [Symptom records](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/symptoms.py): `routes/symptoms.py`
- [Prediction API](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/routes/predictions.py): `routes/predictions.py`
- [Prediction models](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/ml_models.py): `ml_models.py`
- [Lifestyle dataset](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/Sleep_health_and_lifestyle_dataset.csv): `Sleep_health_and_lifestyle_dataset.csv`
- [Insurance dataset](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/insurance.csv): `insurance.csv`

### Persistence

- [Oracle access](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/database.py): `database.py`
- [Oracle database](https://github.com/adeena-falah/carefree-aiding_caretakers_3/blob/main/carefree.sql): `carefree.sql`

### Other components

- **Caretakers**
- **Guardians**
- **Analysts**

## Connections

- Caretakers → Login portal: sign in
- Guardians → Login portal: sign in
- Analysts → FastAPI app: request predictions
- Caretakers → Caretaker portal: manage care
- Guardians → Guardian portal: monitor care
- Login portal → FastAPI app: authenticate
- Caretaker portal → FastAPI app: use API
- Guardian portal → FastAPI app: use API
- FastAPI app → Authentication: dispatches
- FastAPI app → Patient management: dispatches
- FastAPI app → Care tasks: dispatches
- FastAPI app → Appointments: dispatches
- FastAPI app → Expense tracking: dispatches
- FastAPI app → Notifications: dispatches
- FastAPI app → Vitals records: dispatches
- FastAPI app → Symptom records: dispatches
- FastAPI app → Prediction API: dispatches
- Authentication → Oracle access: queries
- Patient management → Oracle access: queries
- Care tasks → Oracle access: queries
- Appointments → Oracle access: queries
- Notifications → Oracle access: queries
- Care tasks → Notifications: creates reminders
- Appointments → Notifications: creates reminders
- Oracle access → Oracle database: connects
- Prediction API → Prediction models: uses models
- Prediction models → Lifestyle dataset: uses data
- Prediction models → Insurance dataset: uses data
