# chiefzz7/atipic-touch architecture

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

- Interactive diagram: https://gitdiagram.com/chiefzz7/atipic-touch
- Repository: https://github.com/chiefzz7/atipic-touch

## Overview

AtipicTouch is an IoT-and-cloud system for tracking food selectivity in nonverbal children. Its documented workflow is device data collection, offline mobile synchronization, cloud recording, and therapist review; the available mobile entry point is only a placeholder, and no hardware source is present in this tree. The backend exposes user, child, food-catalog, and feeding-log APIs; the web tree includes therapist dashboard, patient, report, and settings screens. Web-to-API and device-to-mobile connections are documented capabilities, not demonstrated in the sampled implementation.

Main entry points: [`backend/app/main.py`](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/main.py) (API Application), [`backend/app/core/dependencies.py`](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/core/dependencies.py) (User Authentication), [`backend/app/core/database.py`](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/core/database.py) (Database Session), [`web/src/screens/Settings/index.js`](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Settings/index.js) (Settings Screen)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Cloud API"]
  node_api["API Application<br/>[main.py]"]
  node_dbsession["Database Session<br/>[database.py]"]
  node_records[("Domain Models<br/>[domain.py]")]
end

subgraph group_identity["Identity"]
  node_authroutes["Authentication Routes<br/>[auth_routes.py]"]
  node_auth["Token Security<br/>[security.py]"]
  node_authdep["User Authentication<br/>[dependencies.py]"]
  node_users["User Routes<br/>[user_routes.py]"]
  node_usercreate["User Creation<br/>[user_service.py]"]
end

subgraph group_domain["Care Records"]
  node_children["Child Profiles<br/>[child_routes.py]"]
  node_foods["Food Catalog<br/>[food_routes.py]"]
  node_logs["Feeding Logs<br/>[log_routes.py]"]
end

subgraph group_web["Therapist Dashboard"]
  node_webapp["Web Entry<br/>[App.js]"]
  node_login["Login Screen<br/>[index.js]"]
  node_register["Registration Screen<br/>[index.js]"]
  node_patients["Patient Selection<br/>[index.js]"]
  node_dashboard["Dashboard Screen<br/>[index.js]"]
  node_dashlayout["Dashboard Layout<br/>[DashboardLayout.js]"]
  node_charts["Chart Widgets<br/>[ChartWidgets.js]"]
  node_logtable["Logs Table<br/>[LogsTableWidget.js]"]
  node_reports["Reports Screen<br/>[index.js]"]
  node_reportwidgets["Report Widgets<br/>[ReportWidgets.js]"]
  node_settings["Settings Screen<br/>[index.js]"]
  node_profiletab["Profile Settings<br/>[ProfileTab.js]"]
  node_signaturetab["Signature Settings<br/>[SignatureTab.js]"]
  node_systemtab["System Settings<br/>[SystemTab.js]"]
end

subgraph group_mobile["Mobile Gateway"]
  node_mobileapp["Mobile Placeholder<br/>[App.js]"]
  node_offlinequeue["Offline Queue<br/>[queue.js]"]
end

node_caregiver(("Caregiver"))
node_therapist(("Therapist"))
node_device["IoT Device"]

node_api -->|"registers route"| node_users
node_api -->|"registers route"| node_authroutes
node_api -->|"registers route"| node_children
node_api -->|"registers route"| node_foods
node_api -->|"registers route"| node_logs
node_users -->|"creates user"| node_usercreate
node_usercreate -->|"hashes password"| node_auth
node_users -->|"writes profile"| node_dbsession
node_children -->|"reads and writes"| node_dbsession
node_foods -->|"reads and writes"| node_dbsession
node_logs -->|"reads and writes"| node_dbsession
node_authdep -->|"loads user"| node_dbsession
node_authdep -->|"loads user model"| node_records
node_logs -->|"authenticates requests"| node_authdep
node_children -->|"authenticates requests"| node_authdep
node_foods -->|"authenticates requests"| node_authdep
node_authroutes -->|"uses token security"| node_auth
node_webapp -->|"renders login"| node_login
node_webapp -->|"renders registration"| node_register
node_dashboard -->|"renders layout"| node_dashlayout
node_dashboard -->|"renders charts"| node_charts
node_dashboard -->|"renders logs"| node_logtable
node_patients -->|"renders layout"| node_dashlayout
node_reports -->|"renders layout"| node_dashlayout
node_reports -->|"renders reports"| node_reportwidgets
node_settings -->|"renders layout"| node_dashlayout
node_settings -->|"renders tab"| node_profiletab
node_settings -->|"renders tab"| node_signaturetab
node_settings -->|"renders tab"| node_systemtab
node_device -.->|"sends sensor data"| node_mobileapp
node_mobileapp -.->|"queues offline data"| node_offlinequeue
node_offlinequeue -.->|"syncs queued data"| node_api
node_therapist -.->|"uses dashboard"| node_webapp
node_caregiver -.->|"records feeding"| node_device
node_webapp -.->|"requests cloud data"| node_api

click node_api "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/main.py"
click node_dbsession "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/core/database.py"
click node_records "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/models/domain.py"
click node_authroutes "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/auth_routes.py"
click node_auth "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/core/security.py"
click node_authdep "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/core/dependencies.py"
click node_users "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/user_routes.py"
click node_usercreate "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/services/user_service.py"
click node_children "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/child_routes.py"
click node_foods "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/food_routes.py"
click node_logs "https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/log_routes.py"
click node_webapp "https://github.com/chiefzz7/atipic-touch/blob/main/web/App.js"
click node_login "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Login/index.js"
click node_register "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Register/index.js"
click node_patients "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/PatientSelection/index.js"
click node_dashboard "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Dashboard/index.js"
click node_dashlayout "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/layout/DashboardLayout.js"
click node_charts "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/dashboard/ChartWidgets.js"
click node_logtable "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/dashboard/LogsTableWidget.js"
click node_reports "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Reports/index.js"
click node_reportwidgets "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/report/ReportWidgets.js"
click node_settings "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Settings/index.js"
click node_profiletab "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/settings/ProfileTab.js"
click node_signaturetab "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/settings/SignatureTab.js"
click node_systemtab "https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/settings/SystemTab.js"
click node_mobileapp "https://github.com/chiefzz7/atipic-touch/blob/main/mobile/App.js"
click node_offlinequeue "https://github.com/chiefzz7/atipic-touch/blob/main/mobile/src/database/queue.js"

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_api,node_dbsession,node_records toneBlue
class node_authroutes,node_auth,node_authdep,node_users,node_usercreate toneAmber
class node_children,node_foods,node_logs,node_therapist toneMint
class node_webapp,node_login,node_register,node_patients,node_dashboard,node_dashlayout,node_charts,node_logtable,node_reports,node_reportwidgets,node_settings,node_profiletab,node_signaturetab,node_systemtab toneRose
class node_mobileapp,node_offlinequeue,node_caregiver,node_device toneIndigo
```

## Components

### Cloud API

- [API Application](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/main.py): `backend/app/main.py`
- [Database Session](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/core/database.py): `backend/app/core/database.py`
- [Domain Models](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/models/domain.py): `backend/app/models/domain.py`

### Identity

- [Authentication Routes](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/auth_routes.py): `backend/app/routes/auth_routes.py`
- [Token Security](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/core/security.py): `backend/app/core/security.py`
- [User Authentication](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/core/dependencies.py): `backend/app/core/dependencies.py`
- [User Routes](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/user_routes.py): `backend/app/routes/user_routes.py`
- [User Creation](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/services/user_service.py): `backend/app/services/user_service.py`

### Care Records

- [Child Profiles](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/child_routes.py): `backend/app/routes/child_routes.py`
- [Food Catalog](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/food_routes.py): `backend/app/routes/food_routes.py`
- [Feeding Logs](https://github.com/chiefzz7/atipic-touch/blob/main/backend/app/routes/log_routes.py): `backend/app/routes/log_routes.py`

### Therapist Dashboard

- [Web Entry](https://github.com/chiefzz7/atipic-touch/blob/main/web/App.js): `web/App.js`
- [Login Screen](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Login/index.js): `web/src/screens/Login/index.js`
- [Registration Screen](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Register/index.js): `web/src/screens/Register/index.js`
- [Patient Selection](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/PatientSelection/index.js): `web/src/screens/PatientSelection/index.js`
- [Dashboard Screen](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Dashboard/index.js): `web/src/screens/Dashboard/index.js`
- [Dashboard Layout](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/layout/DashboardLayout.js): `web/src/components/layout/DashboardLayout.js`
- [Chart Widgets](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/dashboard/ChartWidgets.js): `web/src/components/dashboard/ChartWidgets.js`
- [Logs Table](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/dashboard/LogsTableWidget.js): `web/src/components/dashboard/LogsTableWidget.js`
- [Reports Screen](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Reports/index.js): `web/src/screens/Reports/index.js`
- [Report Widgets](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/report/ReportWidgets.js): `web/src/components/report/ReportWidgets.js`
- [Settings Screen](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/screens/Settings/index.js): `web/src/screens/Settings/index.js`
- [Profile Settings](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/settings/ProfileTab.js): `web/src/components/settings/ProfileTab.js`
- [Signature Settings](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/settings/SignatureTab.js): `web/src/components/settings/SignatureTab.js`
- [System Settings](https://github.com/chiefzz7/atipic-touch/blob/main/web/src/components/settings/SystemTab.js): `web/src/components/settings/SystemTab.js`

### Mobile Gateway

- [Mobile Placeholder](https://github.com/chiefzz7/atipic-touch/blob/main/mobile/App.js): `mobile/App.js`
- [Offline Queue](https://github.com/chiefzz7/atipic-touch/blob/main/mobile/src/database/queue.js): `mobile/src/database/queue.js`

### Other components

- **Caregiver**
- **Therapist**
- **IoT Device**

## Connections

- API Application → User Routes: registers route (evidence: `backend/app/main.py`)
- API Application → Authentication Routes: registers route (evidence: `backend/app/main.py`)
- API Application → Child Profiles: registers route (evidence: `backend/app/main.py`)
- API Application → Food Catalog: registers route (evidence: `backend/app/main.py`)
- API Application → Feeding Logs: registers route (evidence: `backend/app/main.py`)
- User Routes → User Creation: creates user (evidence: `backend/app/routes/user_routes.py`)
- User Creation → Token Security: hashes password (evidence: `backend/app/services/user_service.py`)
- User Routes → Database Session: writes profile (evidence: `backend/app/routes/user_routes.py`)
- Child Profiles → Database Session: reads and writes (evidence: `backend/app/routes/child_routes.py`)
- Food Catalog → Database Session: reads and writes (evidence: `backend/app/routes/food_routes.py`)
- Feeding Logs → Database Session: reads and writes (evidence: `backend/app/routes/log_routes.py`)
- User Authentication → Database Session: loads user (evidence: `backend/app/core/dependencies.py`)
- User Authentication → Domain Models: loads user model (evidence: `backend/app/core/dependencies.py`)
- Feeding Logs → User Authentication: authenticates requests (evidence: `backend/app/routes/log_routes.py`)
- Child Profiles → User Authentication: authenticates requests (evidence: `backend/app/routes/child_routes.py`)
- Food Catalog → User Authentication: authenticates requests (evidence: `backend/app/routes/food_routes.py`)
- Authentication Routes → Token Security: uses token security (evidence: `backend/app/routes/auth_routes.py`)
- Web Entry → Login Screen: renders login (evidence: `web/App.js`)
- Web Entry → Registration Screen: renders registration (evidence: `web/App.js`)
- Dashboard Screen → Dashboard Layout: renders layout (evidence: `web/src/screens/Dashboard/index.js`)
- Dashboard Screen → Chart Widgets: renders charts (evidence: `web/src/screens/Dashboard/index.js`)
- Dashboard Screen → Logs Table: renders logs (evidence: `web/src/screens/Dashboard/index.js`)
- Patient Selection → Dashboard Layout: renders layout (evidence: `web/src/screens/PatientSelection/index.js`)
- Reports Screen → Dashboard Layout: renders layout (evidence: `web/src/screens/Reports/index.js`)
- Reports Screen → Report Widgets: renders reports (evidence: `web/src/screens/Reports/index.js`)
- Settings Screen → Dashboard Layout: renders layout (evidence: `web/src/screens/Settings/index.js`)
- Settings Screen → Profile Settings: renders tab (evidence: `web/src/screens/Settings/index.js`)
- Settings Screen → Signature Settings: renders tab (evidence: `web/src/screens/Settings/index.js`)
- Settings Screen → System Settings: renders tab (evidence: `web/src/screens/Settings/index.js`)
- IoT Device → Mobile Placeholder: sends sensor data
- Mobile Placeholder → Offline Queue: queues offline data
- Offline Queue → API Application: syncs queued data
- Therapist → Web Entry: uses dashboard
- Caregiver → IoT Device: records feeding
- Web Entry → API Application: requests cloud data
