# andifishman/eldertech6 architecture

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

- Interactive diagram: https://gitdiagram.com/andifishman/eldertech6
- Repository: https://github.com/andifishman/eldertech6

## Overview

ElderTech is a resident-facing mobile app backed by an API, with a separate administrative backoffice. Residents use the app for schedules, learning content, messaging, assistant chat, requests, and leisure; staff manage residents and these services in the backoffice. The backend exposes domain APIs and integrates with persistence and external providers. The tree and sampled files support the overall feature map, but no README was supplied and most feature-specific implementations were not sampled, so uncertain internal wiring is omitted.

Main entry points: [`backend/src/core/provider/ProviderManager.ts`](https://github.com/andifishman/eldertech6/blob/main/backend/src/core/provider/ProviderManager.ts) (Provider manager), [`backend/src/controllers/assistant.controller.ts`](https://github.com/andifishman/eldertech6/blob/main/backend/src/controllers/assistant.controller.ts) (Assistant controller), [`backend/src/services/assistant/AssistantService.ts`](https://github.com/andifishman/eldertech6/blob/main/backend/src/services/assistant/AssistantService.ts) (Assistant service), [`backend/src/app.ts`](https://github.com/andifishman/eldertech6/blob/main/backend/src/app.ts) (API application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_resident["Resident app"]
  node_mobile_routes["App navigation<br/>[_layout.tsx]"]
  node_resident_features["Resident features"]
  node_mobile_services["Mobile services"]
  node_api_client["API client<br/>[apiClient.ts]"]
end

subgraph group_backend["Backend API"]
  node_backend_app["API application<br/>[app.ts]"]
  node_assistant_routes["Assistant routes"]
  node_assistant_controller["Assistant controller"]
  node_assistant_service["Assistant service"]
  node_hablemos_controller["Hablemos controller"]
  node_hablemos_service["Hablemos service<br/>[HablemosService.ts]"]
  node_domain_services["Domain services"]
  node_repositories["Repositories"]
  node_provider_manager["Provider manager<br/>[ProviderManager.ts]"]
  node_search_service["External search<br/>[SearchService.ts]"]
end

subgraph group_admin["Admin backoffice"]
  node_admin_router["Backoffice routes<br/>[App.tsx]"]
  node_admin_features["Management features"]
  node_admin_api["Backoffice API client<br/>[apiClient.ts]"]
end

subgraph group_integrations["Data and providers"]
  node_supabase[("Supabase<br/>[supabase.ts]")]
  node_ai_providers["AI providers"]
  node_search_provider["Tavily search"]
  node_push_provider["Push notifications"]
end

node_resident_user(("Resident"))
node_admin_user(("Staff administrator"))
node_expo_service["Expo notifications"]

node_resident_user -->|"uses"| node_mobile_routes
node_mobile_routes -->|"routes to"| node_resident_features
node_resident_features -->|"uses"| node_mobile_services
node_mobile_services -->|"requests"| node_api_client
node_api_client -->|"calls API"| node_backend_app
node_backend_app -->|"mounts"| node_assistant_routes
node_assistant_routes -->|"dispatches"| node_assistant_controller
node_assistant_controller -->|"calls"| node_assistant_service
node_assistant_controller -->|"calls"| node_hablemos_service
node_hablemos_controller -->|"calls"| node_hablemos_service
node_assistant_service -->|"persists and reads"| node_repositories
node_domain_services -->|"uses"| node_repositories
node_admin_user -->|"uses"| node_admin_router
node_admin_router -->|"routes to"| node_admin_features
node_admin_features -->|"requests"| node_admin_api
node_admin_api -->|"calls API"| node_backend_app
node_repositories -->|"reads and writes"| node_supabase
node_assistant_service -.->|"delegates"| node_provider_manager
node_search_service -->|"executes through"| node_provider_manager
node_provider_manager -.->|"dispatches"| node_ai_providers
node_provider_manager -->|"dispatches"| node_search_provider
node_domain_services -.->|"sends notifications"| node_push_provider
node_push_provider -.->|"sends pushes"| node_expo_service

click node_mobile_routes "https://github.com/andifishman/eldertech6/blob/main/app/_layout.tsx"
click node_resident_features "https://github.com/andifishman/eldertech6/tree/main/app"
click node_mobile_services "https://github.com/andifishman/eldertech6/tree/main/src/services"
click node_api_client "https://github.com/andifishman/eldertech6/blob/main/src/services/apiClient.ts"
click node_backend_app "https://github.com/andifishman/eldertech6/blob/main/backend/src/app.ts"
click node_assistant_routes "https://github.com/andifishman/eldertech6/blob/main/backend/src/routes/assistant.routes.ts"
click node_assistant_controller "https://github.com/andifishman/eldertech6/blob/main/backend/src/controllers/assistant.controller.ts"
click node_assistant_service "https://github.com/andifishman/eldertech6/blob/main/backend/src/services/assistant/AssistantService.ts"
click node_hablemos_controller "https://github.com/andifishman/eldertech6/blob/main/backend/src/controllers/hablemos.controller.ts"
click node_hablemos_service "https://github.com/andifishman/eldertech6/blob/main/backend/src/services/hablemos/HablemosService.ts"
click node_domain_services "https://github.com/andifishman/eldertech6/tree/main/backend/src/services"
click node_repositories "https://github.com/andifishman/eldertech6/tree/main/backend/src/repositories"
click node_provider_manager "https://github.com/andifishman/eldertech6/blob/main/backend/src/core/provider/ProviderManager.ts"
click node_search_service "https://github.com/andifishman/eldertech6/blob/main/backend/src/services/search/SearchService.ts"
click node_admin_router "https://github.com/andifishman/eldertech6/blob/main/backoffice/src/App.tsx"
click node_admin_features "https://github.com/andifishman/eldertech6/tree/main/backoffice/src/features"
click node_admin_api "https://github.com/andifishman/eldertech6/blob/main/backoffice/src/lib/apiClient.ts"
click node_supabase "https://github.com/andifishman/eldertech6/blob/main/src/services/supabase.ts"
click node_ai_providers "https://github.com/andifishman/eldertech6/tree/main/backend/src/providers/chat"
click node_search_provider "https://github.com/andifishman/eldertech6/blob/main/backend/src/providers/search/TavilySearchProvider.ts"
click node_push_provider "https://github.com/andifishman/eldertech6/blob/main/backend/src/providers/notifications/ExpoPushProvider.ts"

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_mobile_routes,node_resident_features,node_mobile_services,node_api_client toneBlue
class node_backend_app,node_assistant_routes,node_assistant_controller,node_assistant_service,node_hablemos_controller,node_hablemos_service,node_domain_services,node_repositories,node_provider_manager,node_search_service toneAmber
class node_admin_router,node_admin_features,node_admin_api toneMint
class node_supabase,node_ai_providers,node_search_provider,node_push_provider toneRose
class node_resident_user,node_admin_user,node_expo_service toneIndigo
```

## Components

### Resident app

- [App navigation](https://github.com/andifishman/eldertech6/blob/main/app/_layout.tsx): `app/_layout.tsx`
- [Resident features](https://github.com/andifishman/eldertech6/tree/main/app): `app`
- [Mobile services](https://github.com/andifishman/eldertech6/tree/main/src/services): `src/services`
- [API client](https://github.com/andifishman/eldertech6/blob/main/src/services/apiClient.ts): `src/services/apiClient.ts`

### Backend API

- [API application](https://github.com/andifishman/eldertech6/blob/main/backend/src/app.ts): `backend/src/app.ts`
- [Assistant routes](https://github.com/andifishman/eldertech6/blob/main/backend/src/routes/assistant.routes.ts): `backend/src/routes/assistant.routes.ts`
- [Assistant controller](https://github.com/andifishman/eldertech6/blob/main/backend/src/controllers/assistant.controller.ts): `backend/src/controllers/assistant.controller.ts`
- [Assistant service](https://github.com/andifishman/eldertech6/blob/main/backend/src/services/assistant/AssistantService.ts): `backend/src/services/assistant/AssistantService.ts`
- [Hablemos controller](https://github.com/andifishman/eldertech6/blob/main/backend/src/controllers/hablemos.controller.ts): `backend/src/controllers/hablemos.controller.ts`
- [Hablemos service](https://github.com/andifishman/eldertech6/blob/main/backend/src/services/hablemos/HablemosService.ts): `backend/src/services/hablemos/HablemosService.ts`
- [Domain services](https://github.com/andifishman/eldertech6/tree/main/backend/src/services): `backend/src/services`
- [Repositories](https://github.com/andifishman/eldertech6/tree/main/backend/src/repositories): `backend/src/repositories`
- [Provider manager](https://github.com/andifishman/eldertech6/blob/main/backend/src/core/provider/ProviderManager.ts): `backend/src/core/provider/ProviderManager.ts`
- [External search](https://github.com/andifishman/eldertech6/blob/main/backend/src/services/search/SearchService.ts): `backend/src/services/search/SearchService.ts`

### Admin backoffice

- [Backoffice routes](https://github.com/andifishman/eldertech6/blob/main/backoffice/src/App.tsx): `backoffice/src/App.tsx`
- [Management features](https://github.com/andifishman/eldertech6/tree/main/backoffice/src/features): `backoffice/src/features`
- [Backoffice API client](https://github.com/andifishman/eldertech6/blob/main/backoffice/src/lib/apiClient.ts): `backoffice/src/lib/apiClient.ts`

### Data and providers

- [Supabase](https://github.com/andifishman/eldertech6/blob/main/src/services/supabase.ts): `src/services/supabase.ts`
- [AI providers](https://github.com/andifishman/eldertech6/tree/main/backend/src/providers/chat): `backend/src/providers/chat`
- [Tavily search](https://github.com/andifishman/eldertech6/blob/main/backend/src/providers/search/TavilySearchProvider.ts): `backend/src/providers/search/TavilySearchProvider.ts`
- [Push notifications](https://github.com/andifishman/eldertech6/blob/main/backend/src/providers/notifications/ExpoPushProvider.ts): `backend/src/providers/notifications/ExpoPushProvider.ts`

### Other components

- **Resident**
- **Staff administrator**
- **Expo notifications**

## Connections

- Resident → App navigation: uses
- App navigation → Resident features: routes to
- Resident features → Mobile services: uses
- Mobile services → API client: requests
- API client → API application: calls API
- API application → Assistant routes: mounts
- Assistant routes → Assistant controller: dispatches
- Assistant controller → Assistant service: calls
- Assistant controller → Hablemos service: calls
- Hablemos controller → Hablemos service: calls
- Assistant service → Repositories: persists and reads
- Domain services → Repositories: uses
- Staff administrator → Backoffice routes: uses
- Backoffice routes → Management features: routes to
- Management features → Backoffice API client: requests
- Backoffice API client → API application: calls API
- Repositories → Supabase: reads and writes
- Assistant service → Provider manager: delegates
- External search → Provider manager: executes through
- Provider manager → AI providers: dispatches
- Provider manager → Tavily search: dispatches
- Domain services → Push notifications: sends notifications
- Push notifications → Expo notifications: sends pushes
