# bhawenmaroo/indihealth architecture

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

- Interactive diagram: https://gitdiagram.com/bhawenmaroo/indihealth
- Repository: https://github.com/bhawenmaroo/indihealth

## Overview

IndiHealth 360 is a healthcare workflow prototype with a patient mobile app, Doctor/Laboratory/Admin web workspaces, and a separate API foundation. The patient-facing flow covers care discovery, provider or test selection, simulated booking, booking review, and pet profiles; the portals cover provider operations and lab workflows. The README says the API is not connected to either client, and demo mutations remain local. Portal internals and some API routes were not sampled, so their documented capabilities are represented without invented internal call paths.

Main entry points: [`apps/api/src/index.ts`](https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts) (API Server), [`apps/api/prisma/schema.prisma`](https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/prisma/schema.prisma) (PostgreSQL Store), [`apps/portals/src/main.tsx`](https://github.com/bhawenmaroo/indihealth/blob/main/apps/portals/src/main.tsx) (Portal Workspaces), [`apps/mobile/app/index.tsx`](https://github.com/bhawenmaroo/indihealth/blob/main/apps/mobile/app/index.tsx) (Patient App)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_patient["Patient App"]
  node_mobile_app["Patient App<br/>[index.tsx]"]
end

subgraph group_workspaces["Care Workspaces"]
  node_portal_switcher["Portal Workspaces<br/>[main.tsx]"]
  node_doctor_workspace["Doctor Workspace<br/>[main.tsx]"]
  node_lab_workspace["Laboratory Workspace<br/>[main.tsx]"]
  node_admin_workspace["Admin Workspace<br/>[main.tsx]"]
end

subgraph group_backend["API Services"]
  node_api_server["API Server<br/>[index.ts]"]
  node_identity["Accounts &amp; Roles<br/>[index.ts]"]
  node_care_catalog["Care Catalog<br/>[index.ts]"]
  node_appointments["Appointments<br/>[index.ts]"]
  node_pet_profiles["Pet Profiles<br/>[index.ts]"]
  node_audit_log["Audit Log<br/>[index.ts]"]
  node_database[("PostgreSQL Store<br/>[schema.prisma]")]
end

subgraph group_shared["Shared Package"]
  node_shared_types["Shared Types &amp; Fixtures<br/>[index.ts]"]
  node_shared_api["Shared API Module<br/>[api.ts]"]
end

node_patient_actor(("Patient"))

node_patient_actor -->|"uses"| node_mobile_app
node_mobile_app -->|"imports"| node_shared_types
node_portal_switcher -->|"offers"| node_doctor_workspace
node_portal_switcher -->|"offers"| node_lab_workspace
node_portal_switcher -->|"offers"| node_admin_workspace
node_api_server -->|"routes"| node_identity
node_api_server -->|"routes"| node_care_catalog
node_api_server -->|"routes"| node_appointments
node_api_server -->|"routes"| node_pet_profiles
node_api_server -->|"records"| node_audit_log
node_identity -->|"reads/writes"| node_database
node_care_catalog -->|"reads"| node_database
node_appointments -->|"reads/writes"| node_database
node_pet_profiles -->|"reads/writes"| node_database
node_audit_log -->|"writes"| node_database

click node_mobile_app "https://github.com/bhawenmaroo/indihealth/blob/main/apps/mobile/app/index.tsx"
click node_portal_switcher "https://github.com/bhawenmaroo/indihealth/blob/main/apps/portals/src/main.tsx"
click node_doctor_workspace "https://github.com/bhawenmaroo/indihealth/blob/main/apps/portals/src/main.tsx"
click node_lab_workspace "https://github.com/bhawenmaroo/indihealth/blob/main/apps/portals/src/main.tsx"
click node_admin_workspace "https://github.com/bhawenmaroo/indihealth/blob/main/apps/portals/src/main.tsx"
click node_api_server "https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts"
click node_identity "https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts"
click node_care_catalog "https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts"
click node_appointments "https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts"
click node_pet_profiles "https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts"
click node_audit_log "https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts"
click node_database "https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/prisma/schema.prisma"
click node_shared_types "https://github.com/bhawenmaroo/indihealth/blob/main/packages/shared/src/index.ts"
click node_shared_api "https://github.com/bhawenmaroo/indihealth/blob/main/packages/shared/src/api.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_app toneBlue
class node_portal_switcher,node_doctor_workspace,node_lab_workspace,node_admin_workspace toneAmber
class node_api_server,node_identity,node_care_catalog,node_appointments,node_pet_profiles,node_audit_log,node_database toneMint
class node_shared_types,node_shared_api toneRose
class node_patient_actor toneIndigo
```

## Components

### Patient App

- [Patient App](https://github.com/bhawenmaroo/indihealth/blob/main/apps/mobile/app/index.tsx): `apps/mobile/app/index.tsx`

### Care Workspaces

- [Portal Workspaces](https://github.com/bhawenmaroo/indihealth/blob/main/apps/portals/src/main.tsx): `apps/portals/src/main.tsx`
- [Doctor Workspace](https://github.com/bhawenmaroo/indihealth/blob/main/apps/portals/src/main.tsx): `apps/portals/src/main.tsx`
- [Laboratory Workspace](https://github.com/bhawenmaroo/indihealth/blob/main/apps/portals/src/main.tsx): `apps/portals/src/main.tsx`
- [Admin Workspace](https://github.com/bhawenmaroo/indihealth/blob/main/apps/portals/src/main.tsx): `apps/portals/src/main.tsx`

### API Services

- [API Server](https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- [Accounts & Roles](https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- [Care Catalog](https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- [Appointments](https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- [Pet Profiles](https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- [Audit Log](https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- [PostgreSQL Store](https://github.com/bhawenmaroo/indihealth/blob/main/apps/api/prisma/schema.prisma): `apps/api/prisma/schema.prisma`

### Shared Package

- [Shared Types & Fixtures](https://github.com/bhawenmaroo/indihealth/blob/main/packages/shared/src/index.ts): `packages/shared/src/index.ts`
- [Shared API Module](https://github.com/bhawenmaroo/indihealth/blob/main/packages/shared/src/api.ts): `packages/shared/src/api.ts`

### Other components

- **Patient**

## Connections

- Patient → Patient App: uses (evidence: `README.md`)
- Patient App → Shared Types & Fixtures: imports (evidence: `apps/mobile/app/index.tsx`)
- Portal Workspaces → Doctor Workspace: offers (evidence: `README.md`)
- Portal Workspaces → Laboratory Workspace: offers (evidence: `README.md`)
- Portal Workspaces → Admin Workspace: offers (evidence: `README.md`)
- API Server → Accounts & Roles: routes (evidence: `apps/api/src/index.ts`)
- API Server → Care Catalog: routes (evidence: `apps/api/src/index.ts`)
- API Server → Appointments: routes (evidence: `apps/api/src/index.ts`)
- API Server → Pet Profiles: routes (evidence: `apps/api/src/index.ts`)
- API Server → Audit Log: records (evidence: `apps/api/src/index.ts`)
- Accounts & Roles → PostgreSQL Store: reads/writes (evidence: `apps/api/src/index.ts`)
- Care Catalog → PostgreSQL Store: reads (evidence: `apps/api/src/index.ts`)
- Appointments → PostgreSQL Store: reads/writes (evidence: `apps/api/src/index.ts`)
- Pet Profiles → PostgreSQL Store: reads/writes (evidence: `apps/api/src/index.ts`)
- Audit Log → PostgreSQL Store: writes (evidence: `apps/api/src/index.ts`)
