# gfani/merihcare architecture

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

- Interactive diagram: https://gitdiagram.com/gfani/merihcare
- Repository: https://github.com/gfani/merihcare

## Overview

This is a frontend prototype for an on-demand home-healthcare dispatch dashboard, with a separate provider-facing app. The main admin workflow is dashboard navigation into live tracking, patient/provider management, request review and reporting; the provider app presents job and account screens. The sampled request and provider pages show local UI state, not operational dispatch or persistence. Requirements document broader intended capabilities, but no backend or external integrations are evidenced in the sampled code.

Main entry points: [`src/app/pages/admin-dashboard.tsx`](https://github.com/gfani/merihcare/blob/main/src/app/pages/admin-dashboard.tsx) (Admin dashboard), [`src/app/routes.tsx`](https://github.com/gfani/merihcare/blob/main/src/app/routes.tsx) (Route selection), [`src/main.tsx`](https://github.com/gfani/merihcare/blob/main/src/main.tsx) (React mount), [`src/app/App.tsx`](https://github.com/gfani/merihcare/blob/main/src/app/App.tsx) (App router host)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Application entry"]
  node_main["React mount<br/>[main.tsx]"]
  node_app["App router host<br/>[App.tsx]"]
  node_routes["Route selection<br/>[routes.tsx]"]
end

subgraph group_admin["Admin operations"]
  node_adminpage["Admin dashboard"]
  node_nav["Admin navigation<br/>[sidebar.tsx]"]
  node_header["Dashboard header<br/>[header.tsx]"]
  node_stats["Summary metrics<br/>[stats-cards.tsx]"]
  node_map["Live map<br/>[map-view.tsx]"]
  node_live["Live requests<br/>[live-requests.tsx]"]
  node_online["Online providers<br/>[online-users.tsx]"]
  node_patients["Patient management<br/>[patients-page.tsx]"]
  node_providers["Provider management<br/>[providers-page.tsx]"]
  node_requests["Request management<br/>[requests-page.tsx]"]
  node_reports["Analytics reports<br/>[reports-page.tsx]"]
end

subgraph group_provider["Provider app"]
  node_providerpage["Provider route page<br/>[provider-app.tsx]"]
  node_providerapp["Provider app shell<br/>[provider-app.tsx]"]
  node_login["Provider login<br/>[login-screen.tsx]"]
  node_home["Provider home<br/>[home-screen.tsx]"]
  node_incoming["Incoming request"]
  node_active["Active job"]
  node_complete["Job completion"]
  node_history["Job history<br/>[history-page.tsx]"]
  node_earnings["Provider earnings<br/>[earnings-page.tsx]"]
  node_profile["Provider profile<br/>[profile-page.tsx]"]
end

subgraph group_ui["Shared interface"]
  node_ui["Reusable UI kit<br/>[button.tsx]"]
end

node_user(("Dashboard user"))

node_user -->|"opens app"| node_main
node_main -->|"mounts"| node_app
node_app -->|"hosts router"| node_routes
node_routes -->|"routes /"| node_adminpage
node_routes -->|"routes /provider"| node_providerpage
node_adminpage -->|"renders"| node_nav
node_adminpage -->|"renders"| node_header
node_adminpage -->|"renders dashboard"| node_stats
node_adminpage -->|"renders dashboard"| node_map
node_adminpage -->|"renders dashboard"| node_live
node_adminpage -->|"renders dashboard"| node_online
node_adminpage -->|"selects patients"| node_patients
node_adminpage -->|"selects providers"| node_providers
node_adminpage -->|"selects requests"| node_requests
node_adminpage -->|"selects reports"| node_reports
node_providerpage -->|"renders app"| node_providerapp
node_requests -->|"uses button"| node_ui
node_providers -->|"uses button"| node_ui

click node_main "https://github.com/gfani/merihcare/blob/main/src/main.tsx"
click node_app "https://github.com/gfani/merihcare/blob/main/src/app/App.tsx"
click node_routes "https://github.com/gfani/merihcare/blob/main/src/app/routes.tsx"
click node_adminpage "https://github.com/gfani/merihcare/blob/main/src/app/pages/admin-dashboard.tsx"
click node_providerpage "https://github.com/gfani/merihcare/blob/main/src/app/pages/provider-app.tsx"
click node_nav "https://github.com/gfani/merihcare/blob/main/src/app/components/sidebar.tsx"
click node_header "https://github.com/gfani/merihcare/blob/main/src/app/components/header.tsx"
click node_stats "https://github.com/gfani/merihcare/blob/main/src/app/components/stats-cards.tsx"
click node_map "https://github.com/gfani/merihcare/blob/main/src/app/components/map-view.tsx"
click node_live "https://github.com/gfani/merihcare/blob/main/src/app/components/live-requests.tsx"
click node_online "https://github.com/gfani/merihcare/blob/main/src/app/components/online-users.tsx"
click node_patients "https://github.com/gfani/merihcare/blob/main/src/app/components/patients-page.tsx"
click node_providers "https://github.com/gfani/merihcare/blob/main/src/app/components/providers-page.tsx"
click node_requests "https://github.com/gfani/merihcare/blob/main/src/app/components/requests-page.tsx"
click node_reports "https://github.com/gfani/merihcare/blob/main/src/app/components/reports-page.tsx"
click node_providerapp "https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/provider-app.tsx"
click node_login "https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/login-screen.tsx"
click node_home "https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/home-screen.tsx"
click node_incoming "https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/incoming-request-screen.tsx"
click node_active "https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/active-job-screen.tsx"
click node_complete "https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/job-completion-screen.tsx"
click node_history "https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/history-page.tsx"
click node_earnings "https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/earnings-page.tsx"
click node_profile "https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/profile-page.tsx"
click node_ui "https://github.com/gfani/merihcare/blob/main/src/app/components/ui/button.tsx"

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_main,node_app,node_routes,node_user toneBlue
class node_adminpage,node_nav,node_header,node_stats,node_map,node_live,node_online,node_patients,node_providers,node_requests,node_reports toneAmber
class node_providerpage,node_providerapp,node_login,node_home,node_incoming,node_active,node_complete,node_history,node_earnings,node_profile toneMint
class node_ui toneRose
```

## Components

### Application entry

- [React mount](https://github.com/gfani/merihcare/blob/main/src/main.tsx): `src/main.tsx`
- [App router host](https://github.com/gfani/merihcare/blob/main/src/app/App.tsx): `src/app/App.tsx`
- [Route selection](https://github.com/gfani/merihcare/blob/main/src/app/routes.tsx): `src/app/routes.tsx`

### Admin operations

- [Admin dashboard](https://github.com/gfani/merihcare/blob/main/src/app/pages/admin-dashboard.tsx): `src/app/pages/admin-dashboard.tsx`
- [Admin navigation](https://github.com/gfani/merihcare/blob/main/src/app/components/sidebar.tsx): `src/app/components/sidebar.tsx`
- [Dashboard header](https://github.com/gfani/merihcare/blob/main/src/app/components/header.tsx): `src/app/components/header.tsx`
- [Summary metrics](https://github.com/gfani/merihcare/blob/main/src/app/components/stats-cards.tsx): `src/app/components/stats-cards.tsx`
- [Live map](https://github.com/gfani/merihcare/blob/main/src/app/components/map-view.tsx): `src/app/components/map-view.tsx`
- [Live requests](https://github.com/gfani/merihcare/blob/main/src/app/components/live-requests.tsx): `src/app/components/live-requests.tsx`
- [Online providers](https://github.com/gfani/merihcare/blob/main/src/app/components/online-users.tsx): `src/app/components/online-users.tsx`
- [Patient management](https://github.com/gfani/merihcare/blob/main/src/app/components/patients-page.tsx): `src/app/components/patients-page.tsx`
- [Provider management](https://github.com/gfani/merihcare/blob/main/src/app/components/providers-page.tsx): `src/app/components/providers-page.tsx`
- [Request management](https://github.com/gfani/merihcare/blob/main/src/app/components/requests-page.tsx): `src/app/components/requests-page.tsx`
- [Analytics reports](https://github.com/gfani/merihcare/blob/main/src/app/components/reports-page.tsx): `src/app/components/reports-page.tsx`

### Provider app

- [Provider route page](https://github.com/gfani/merihcare/blob/main/src/app/pages/provider-app.tsx): `src/app/pages/provider-app.tsx`
- [Provider app shell](https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/provider-app.tsx): `src/app/components/provider-app/provider-app.tsx`
- [Provider login](https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/login-screen.tsx): `src/app/components/provider-app/login-screen.tsx`
- [Provider home](https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/home-screen.tsx): `src/app/components/provider-app/home-screen.tsx`
- [Incoming request](https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/incoming-request-screen.tsx): `src/app/components/provider-app/incoming-request-screen.tsx`
- [Active job](https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/active-job-screen.tsx): `src/app/components/provider-app/active-job-screen.tsx`
- [Job completion](https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/job-completion-screen.tsx): `src/app/components/provider-app/job-completion-screen.tsx`
- [Job history](https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/history-page.tsx): `src/app/components/provider-app/history-page.tsx`
- [Provider earnings](https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/earnings-page.tsx): `src/app/components/provider-app/earnings-page.tsx`
- [Provider profile](https://github.com/gfani/merihcare/blob/main/src/app/components/provider-app/profile-page.tsx): `src/app/components/provider-app/profile-page.tsx`

### Shared interface

- [Reusable UI kit](https://github.com/gfani/merihcare/blob/main/src/app/components/ui/button.tsx): `src/app/components/ui/button.tsx`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → React mount: opens app
- React mount → App router host: mounts
- App router host → Route selection: hosts router
- Route selection → Admin dashboard: routes /
- Route selection → Provider route page: routes /provider
- Admin dashboard → Admin navigation: renders
- Admin dashboard → Dashboard header: renders
- Admin dashboard → Summary metrics: renders dashboard
- Admin dashboard → Live map: renders dashboard
- Admin dashboard → Live requests: renders dashboard
- Admin dashboard → Online providers: renders dashboard
- Admin dashboard → Patient management: selects patients
- Admin dashboard → Provider management: selects providers
- Admin dashboard → Request management: selects requests
- Admin dashboard → Analytics reports: selects reports
- Provider route page → Provider app shell: renders app
- Request management → Reusable UI kit: uses button
- Provider management → Reusable UI kit: uses button
