# rishat8903/aethermind-medi-waypoint architecture

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

- Interactive diagram: https://gitdiagram.com/rishat8903/aethermind-medi-waypoint
- Repository: https://github.com/rishat8903/aethermind-medi-waypoint

## Overview

Medi-Waypoint is a bilingual patient-navigation and closed-loop referral frontend, presented in the README as a static UI prototype that can be explored without backend login. Its main journey is patient triage, finding a suitable doctor and requesting an appointment, then carrying consented records through referrals and hospital follow-up. Clinician, emergency-department, staff-intake, and facility-admin views are distinct supporting workflows. Source excerpts show query hooks calling the API client and the mock API provider; other page-to-feature links follow the README’s documented capabilities, not inspected page implementations.

Main entry points: [`src/api/queries/hooks.ts`](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/api/queries/hooks.ts) (Query and mutation hooks), [`src/app/[locale]/(patient)/triage/page.tsx`](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/triage/page.tsx) (Triage sessions), [`src/app/[locale]/(clinician)/dashboard/page.tsx`](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/dashboard/page.tsx) (Clinician queues), [`src/app/[locale]/(public)/page.tsx`](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(public)/page.tsx) (Landing page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_experience["Entry and access"]
  node_landing["Landing page<br/>[page.tsx]"]
  node_authentication["Account access<br/>[page.tsx]"]
end

subgraph group_patient["Patient navigation"]
  node_triage["Triage sessions<br/>[page.tsx]"]
  node_doctor_search["Doctor search<br/>[page.tsx]"]
  node_appointments["Appointments<br/>[page.tsx]"]
  node_consents["Sharing consent<br/>[page.tsx]"]
  node_reports["Report wallet<br/>[page.tsx]"]
end

subgraph group_clinical["Clinical handover"]
  node_clinician_queue["Clinician queues<br/>[page.tsx]"]
  node_patient_chart["Patient chart<br/>[page.tsx]"]
  node_referrals["Referral tracking<br/>[page.tsx]"]
  node_emergency_department["Emergency department<br/>[page.tsx]"]
  node_staff_intake["Staff intake<br/>[page.tsx]"]
  node_facility_admin["Facility administration<br/>[page.tsx]"]
end

subgraph group_platform["Application services"]
  node_query_hooks["Query and mutation hooks<br/>[hooks.ts]"]
  node_api_client["API client<br/>[client.ts]"]
  node_mock_api["Mock API<br/>[mockClient.ts]"]
  node_fixtures[("Prototype data<br/>[fixtures.ts]")]
  node_offline_queue["Offline referral queue<br/>[unifiedQueue.ts]"]
  node_voice_triage["Voice interaction<br/>[VoicePanel.tsx]"]
  node_localization["Bilingual formatting<br/>[format.ts]"]
end

node_visitor(("Patient or visitor"))
node_staff(("Clinician or staff"))

node_visitor -->|"opens"| node_landing
node_visitor -->|"signs in"| node_authentication
node_staff -->|"reviews cases"| node_clinician_queue
node_staff -->|"registers patients"| node_staff_intake
node_landing -->|"guides patients"| node_triage
node_triage -->|"guides care choice"| node_doctor_search
node_doctor_search -->|"previews slot requests"| node_appointments
node_appointments -->|"appears in queues"| node_clinician_queue
node_consents -->|"controls sharing"| node_reports
node_reports -->|"supports chart review"| node_patient_chart
node_clinician_queue -->|"tracks handovers"| node_referrals
node_referrals -->|"supports hospital arrival"| node_emergency_department
node_staff_intake -->|"creates referral"| node_referrals
node_staff -->|"manages facility"| node_facility_admin
node_triage -->|"offers voice UI"| node_voice_triage
node_triage -.->|"queues emergency work"| node_offline_queue
node_query_hooks -->|"calls requests"| node_api_client
node_api_client -->|"serves prototype requests"| node_mock_api
node_mock_api -->|"reads sample data"| node_fixtures
node_clinician_queue -->|"loads portal data"| node_query_hooks
node_doctor_search -->|"loads directory"| node_query_hooks
node_reports -->|"loads reports"| node_query_hooks
node_patient_chart -->|"loads chart data"| node_query_hooks
node_triage -.->|"submits triage"| node_query_hooks
node_landing -.->|"formats language"| node_localization

click node_landing "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(public)/page.tsx"
click node_authentication "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(auth)/login/page.tsx"
click node_triage "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/triage/page.tsx"
click node_doctor_search "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/doctors/page.tsx"
click node_appointments "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/appointments/page.tsx"
click node_consents "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/consents/page.tsx"
click node_reports "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/reports/page.tsx"
click node_clinician_queue "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/dashboard/page.tsx"
click node_patient_chart "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/patients/%5Bid%5D/page.tsx"
click node_referrals "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/referrals/%5Bid%5D/page.tsx"
click node_emergency_department "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/ed/page.tsx"
click node_staff_intake "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/patients/new/page.tsx"
click node_facility_admin "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(admin)/facility/page.tsx"
click node_query_hooks "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/api/queries/hooks.ts"
click node_api_client "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/api/client.ts"
click node_mock_api "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/data/mockClient.ts"
click node_fixtures "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/data/fixtures.ts"
click node_offline_queue "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/offline/unifiedQueue.ts"
click node_voice_triage "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/components/VoicePanel/VoicePanel.tsx"
click node_localization "https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/i18n/format.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_landing,node_authentication toneBlue
class node_triage,node_doctor_search,node_appointments,node_consents,node_reports toneAmber
class node_clinician_queue,node_patient_chart,node_referrals,node_emergency_department,node_staff_intake,node_facility_admin toneMint
class node_query_hooks,node_api_client,node_mock_api,node_fixtures,node_offline_queue,node_voice_triage,node_localization toneRose
class node_visitor,node_staff toneIndigo
```

## Components

### Entry and access

- [Landing page](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(public)/page.tsx): `src/app/[locale]/(public)/page.tsx`
- [Account access](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(auth)/login/page.tsx): `src/app/[locale]/(auth)/login/page.tsx`

### Patient navigation

- [Triage sessions](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/triage/page.tsx): `src/app/[locale]/(patient)/triage/page.tsx`
- [Doctor search](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/doctors/page.tsx): `src/app/[locale]/(patient)/doctors/page.tsx`
- [Appointments](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/appointments/page.tsx): `src/app/[locale]/(patient)/appointments/page.tsx`
- [Sharing consent](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/consents/page.tsx): `src/app/[locale]/(patient)/consents/page.tsx`
- [Report wallet](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(patient)/reports/page.tsx): `src/app/[locale]/(patient)/reports/page.tsx`

### Clinical handover

- [Clinician queues](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/dashboard/page.tsx): `src/app/[locale]/(clinician)/dashboard/page.tsx`
- [Patient chart](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/patients/%5Bid%5D/page.tsx): `src/app/[locale]/(clinician)/patients/[id]/page.tsx`
- [Referral tracking](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/referrals/%5Bid%5D/page.tsx): `src/app/[locale]/(clinician)/referrals/[id]/page.tsx`
- [Emergency department](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/ed/page.tsx): `src/app/[locale]/(clinician)/ed/page.tsx`
- [Staff intake](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(clinician)/patients/new/page.tsx): `src/app/[locale]/(clinician)/patients/new/page.tsx`
- [Facility administration](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/app/%5Blocale%5D/(admin)/facility/page.tsx): `src/app/[locale]/(admin)/facility/page.tsx`

### Application services

- [Query and mutation hooks](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/api/queries/hooks.ts): `src/api/queries/hooks.ts`
- [API client](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/api/client.ts): `src/api/client.ts`
- [Mock API](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/data/mockClient.ts): `src/data/mockClient.ts`
- [Prototype data](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/data/fixtures.ts): `src/data/fixtures.ts`
- [Offline referral queue](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/offline/unifiedQueue.ts): `src/offline/unifiedQueue.ts`
- [Voice interaction](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/components/VoicePanel/VoicePanel.tsx): `src/components/VoicePanel/VoicePanel.tsx`
- [Bilingual formatting](https://github.com/rishat8903/aethermind-medi-waypoint/blob/main/src/i18n/format.ts): `src/i18n/format.ts`

### Other components

- **Patient or visitor**
- **Clinician or staff**

## Connections

- Patient or visitor → Landing page: opens (evidence: `README.md`)
- Patient or visitor → Account access: signs in (evidence: `README.md`)
- Clinician or staff → Clinician queues: reviews cases (evidence: `README.md`)
- Clinician or staff → Staff intake: registers patients (evidence: `README.md`)
- Landing page → Triage sessions: guides patients (evidence: `README.md`)
- Triage sessions → Doctor search: guides care choice (evidence: `README.md`)
- Doctor search → Appointments: previews slot requests (evidence: `README.md`)
- Appointments → Clinician queues: appears in queues (evidence: `README.md`)
- Sharing consent → Report wallet: controls sharing (evidence: `README.md`)
- Report wallet → Patient chart: supports chart review (evidence: `README.md`)
- Clinician queues → Referral tracking: tracks handovers (evidence: `README.md`)
- Referral tracking → Emergency department: supports hospital arrival (evidence: `README.md`)
- Staff intake → Referral tracking: creates referral (evidence: `README.md`)
- Clinician or staff → Facility administration: manages facility (evidence: `README.md`)
- Triage sessions → Voice interaction: offers voice UI (evidence: `README.md`)
- Triage sessions → Offline referral queue: queues emergency work
- Query and mutation hooks → API client: calls requests (evidence: `src/api/queries/hooks.ts`)
- API client → Mock API: serves prototype requests (evidence: `src/api/queries/provider.tsx`)
- Mock API → Prototype data: reads sample data (evidence: `src/data/mockClient.ts`)
- Clinician queues → Query and mutation hooks: loads portal data
- Doctor search → Query and mutation hooks: loads directory (evidence: `src/app/[locale]/(patient)/doctors/page.tsx`)
- Report wallet → Query and mutation hooks: loads reports (evidence: `src/app/[locale]/(patient)/reports/page.tsx`)
- Patient chart → Query and mutation hooks: loads chart data (evidence: `src/app/[locale]/(clinician)/patients/[id]/page.tsx`)
- Triage sessions → Query and mutation hooks: submits triage
- Landing page → Bilingual formatting: formats language
