# ramtnv/telehealth architecture

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

- Interactive diagram: https://gitdiagram.com/ramtnv/telehealth
- Repository: https://github.com/ramtnv/telehealth

## Overview

TeleHealth is a browser-based dispatch dashboard backed by a single-threaded, in-memory matching service. The main workflow is operator intake, FIFO waiting, longest-idle clinician matching, and consultation completion with follow-up matching. The overview and super-admin console share the live service; the service maintains clinician, patient, and consultation state. The excerpts show the entry point and service boundary, while the README documents dashboard behaviors not visible in the partial UI excerpts. No persistence or external integrations are present.

Main entry points: [`src/App.tsx`](https://github.com/ramtnv/telehealth/blob/main/src/App.tsx) (Dispatch dashboard), [`src/SuperAdminPage.tsx`](https://github.com/ramtnv/telehealth/blob/main/src/SuperAdminPage.tsx) (Super admin), [`src/DispatchService.ts`](https://github.com/ramtnv/telehealth/blob/main/src/DispatchService.ts) (Dispatch service), [`src/domain.ts`](https://github.com/ramtnv/telehealth/blob/main/src/domain.ts) (Dispatch records)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["Operations UI"]
  node_entry["Browser entry<br/>[main.tsx]"]
  node_dashboard["Dispatch dashboard<br/>[App.tsx]"]
  node_admin["Super admin<br/>[SuperAdminPage.tsx]"]
end

subgraph group_dispatch["Dispatch Workflow"]
  node_service["Dispatch service<br/>[DispatchService.ts]"]
end

subgraph group_model["Domain Model"]
  node_records["Dispatch records<br/>[domain.ts]"]
end

node_operator(("Care operator"))

node_operator -->|"operates"| node_dashboard
node_entry -->|"renders"| node_dashboard
node_dashboard -->|"reads and updates"| node_service
node_dashboard -->|"opens"| node_admin
node_admin -->|"updates"| node_service
node_service -->|"uses types"| node_records
node_dashboard -->|"uses types"| node_records
node_admin -->|"uses types"| node_records

click node_entry "https://github.com/ramtnv/telehealth/blob/main/src/main.tsx"
click node_dashboard "https://github.com/ramtnv/telehealth/blob/main/src/App.tsx"
click node_admin "https://github.com/ramtnv/telehealth/blob/main/src/SuperAdminPage.tsx"
click node_service "https://github.com/ramtnv/telehealth/blob/main/src/DispatchService.ts"
click node_records "https://github.com/ramtnv/telehealth/blob/main/src/domain.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_entry,node_dashboard,node_admin toneBlue
class node_service toneAmber
class node_records toneMint
class node_operator toneIndigo
```

## Components

### Operations UI

- [Browser entry](https://github.com/ramtnv/telehealth/blob/main/src/main.tsx): `src/main.tsx`
- [Dispatch dashboard](https://github.com/ramtnv/telehealth/blob/main/src/App.tsx): `src/App.tsx`
- [Super admin](https://github.com/ramtnv/telehealth/blob/main/src/SuperAdminPage.tsx): `src/SuperAdminPage.tsx`

### Dispatch Workflow

- [Dispatch service](https://github.com/ramtnv/telehealth/blob/main/src/DispatchService.ts): `src/DispatchService.ts`

### Domain Model

- [Dispatch records](https://github.com/ramtnv/telehealth/blob/main/src/domain.ts): `src/domain.ts`

### Other components

- **Care operator**

## Connections

- Care operator → Dispatch dashboard: operates (evidence: `README.md`)
- Browser entry → Dispatch dashboard: renders (evidence: `src/main.tsx`)
- Dispatch dashboard → Dispatch service: reads and updates (evidence: `src/App.tsx`)
- Dispatch dashboard → Super admin: opens (evidence: `README.md`)
- Super admin → Dispatch service: updates (evidence: `src/SuperAdminPage.tsx`)
- Dispatch service → Dispatch records: uses types (evidence: `src/DispatchService.ts`)
- Dispatch dashboard → Dispatch records: uses types (evidence: `src/App.tsx`)
- Super admin → Dispatch records: uses types (evidence: `src/SuperAdminPage.tsx`)
