# yosemitecrew/yosemite-crew architecture

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

- Interactive diagram: https://gitdiagram.com/yosemitecrew/yosemite-crew
- Repository: https://github.com/yosemitecrew/yosemite-crew

## Overview

Yosemite Crew is an animal-health operating system centered on a veterinary practice information management system (PIMS), with web and mobile apps, integrations, and developer-facing capabilities around it. A typical user workflow is to use a connected app to work with veterinary practice functions and receive the resulting information or service. The tree shows broad backend domains—appointments, clinical records, billing, labs, and integrations—plus a desktop client with offline synchronization and a shared PDF library. Most backend routing and persistence connections were not sampled, so those internal relationships are not asserted here.

Main entry points: [`apps/backend/src`](https://github.com/yosemitecrew/yosemite-crew/tree/main/apps/backend/src) (Backend API), [`apps/desktop/src/main.ts`](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/main.ts) (Desktop shell), [`apps/frontend/src/app`](https://github.com/yosemitecrew/yosemite-crew/tree/main/apps/frontend/src/app) (Web platform), [`apps/mobileAppYC`](https://github.com/yosemitecrew/yosemite-crew/tree/main/apps/mobileAppYC) (Mobile app)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clients["User clients"]
  node_frontend["Web platform"]
  node_mobile["Mobile app"]
end

subgraph group_backend["PIMS backend"]
  node_api["Backend API"]
  node_appointments["Appointments"]
  node_clinical["Clinical records"]
  node_billing["Finance"]
  node_lab_ingestion["Lab ingestion"]
  node_lab_queries["Lab result queries"]
  node_quarantine["Ingestion quarantine"]
  node_lab_integrations["Lab integrations<br/>[idexx.adapter.ts]"]
end

subgraph group_platform["Shared platform"]
  node_auth["Authentication<br/>[auth-service.ts]"]
  node_pdf["PDF documents<br/>[PdfEngine.ts]"]
  node_generic_pdf["Generic PDF engine"]
end

subgraph group_desktop["Desktop client"]
  node_desktop["Desktop shell<br/>[main.ts]"]
  node_ipc["Desktop IPC<br/>[ipc-handlers.ts]"]
  node_tabs["Tab manager<br/>[tab-manager.ts]"]
  node_offline_store[("Offline store<br/>[offline-store.ts]")]
  node_sync["Sync engine<br/>[sync-engine.ts]"]
end

node_staff(("Veterinary team"))

node_staff -->|"uses"| node_frontend
node_staff -->|"uses"| node_mobile
node_frontend -.->|"connects to PIMS"| node_api
node_mobile -.->|"connects to PIMS"| node_api
node_desktop -->|"registers IPC"| node_ipc
node_desktop -->|"uses tabs"| node_tabs
node_sync -->|"reads and writes"| node_offline_store
node_api -.->|"exposes functions"| node_appointments
node_api -.->|"exposes functions"| node_clinical
node_api -.->|"exposes functions"| node_billing
node_api -.->|"exposes functions"| node_lab_ingestion
node_api -.->|"exposes functions"| node_lab_queries
node_lab_ingestion -.->|"uses"| node_quarantine
node_api -.->|"integrates with"| node_lab_integrations
node_pdf -.->|"shares rendering"| node_generic_pdf

click node_frontend "https://github.com/yosemitecrew/yosemite-crew/tree/main/apps/frontend/src/app"
click node_mobile "https://github.com/yosemitecrew/yosemite-crew/tree/main/apps/mobileAppYC"
click node_api "https://github.com/yosemitecrew/yosemite-crew/tree/main/apps/backend/src"
click node_appointments "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/controllers/web/appointment.controller.ts"
click node_clinical "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/controllers/web/patient-problem.controller.ts"
click node_billing "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/controllers/app/finance.controller.ts"
click node_lab_ingestion "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/controllers/web/super-admin-lab-ingestion.controller.ts"
click node_lab_queries "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/services/idexx-results-query.service.ts"
click node_quarantine "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/services/lab-ingestion-quarantine.service.ts"
click node_lab_integrations "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/integrations/idexx/idexx.adapter.ts"
click node_auth "https://github.com/yosemitecrew/yosemite-crew/blob/main/packages/auth/src/auth-service.ts"
click node_pdf "https://github.com/yosemitecrew/yosemite-crew/blob/main/packages/lib/src/pdf/PdfEngine.ts"
click node_generic_pdf "https://github.com/yosemitecrew/yosemite-crew/blob/main/packages/lib/src/pdf/GenericPdfEngine.ts"
click node_desktop "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/main.ts"
click node_ipc "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/core/ipc-handlers.ts"
click node_tabs "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/core/tab-manager.ts"
click node_offline_store "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/sync/offline-store.ts"
click node_sync "https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/sync/sync-engine.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_frontend,node_mobile toneBlue
class node_api,node_appointments,node_clinical,node_billing,node_lab_ingestion,node_lab_queries,node_quarantine,node_lab_integrations toneAmber
class node_auth,node_pdf,node_generic_pdf toneMint
class node_desktop,node_ipc,node_tabs,node_offline_store,node_sync toneRose
class node_staff toneIndigo
```

## Components

### User clients

- [Web platform](https://github.com/yosemitecrew/yosemite-crew/tree/main/apps/frontend/src/app): `apps/frontend/src/app`
- [Mobile app](https://github.com/yosemitecrew/yosemite-crew/tree/main/apps/mobileAppYC): `apps/mobileAppYC`

### PIMS backend

- [Backend API](https://github.com/yosemitecrew/yosemite-crew/tree/main/apps/backend/src): `apps/backend/src`
- [Appointments](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/controllers/web/appointment.controller.ts): `apps/backend/src/controllers/web/appointment.controller.ts`
- [Clinical records](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/controllers/web/patient-problem.controller.ts): `apps/backend/src/controllers/web/patient-problem.controller.ts`
- [Finance](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/controllers/app/finance.controller.ts): `apps/backend/src/controllers/app/finance.controller.ts`
- [Lab ingestion](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/controllers/web/super-admin-lab-ingestion.controller.ts): `apps/backend/src/controllers/web/super-admin-lab-ingestion.controller.ts`
- [Lab result queries](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/services/idexx-results-query.service.ts): `apps/backend/src/services/idexx-results-query.service.ts`
- [Ingestion quarantine](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/services/lab-ingestion-quarantine.service.ts): `apps/backend/src/services/lab-ingestion-quarantine.service.ts`
- [Lab integrations](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/backend/src/integrations/idexx/idexx.adapter.ts): `apps/backend/src/integrations/idexx/idexx.adapter.ts`

### Shared platform

- [Authentication](https://github.com/yosemitecrew/yosemite-crew/blob/main/packages/auth/src/auth-service.ts): `packages/auth/src/auth-service.ts`
- [PDF documents](https://github.com/yosemitecrew/yosemite-crew/blob/main/packages/lib/src/pdf/PdfEngine.ts): `packages/lib/src/pdf/PdfEngine.ts`
- [Generic PDF engine](https://github.com/yosemitecrew/yosemite-crew/blob/main/packages/lib/src/pdf/GenericPdfEngine.ts): `packages/lib/src/pdf/GenericPdfEngine.ts`

### Desktop client

- [Desktop shell](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/main.ts): `apps/desktop/src/main.ts`
- [Desktop IPC](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/core/ipc-handlers.ts): `apps/desktop/src/core/ipc-handlers.ts`
- [Tab manager](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/core/tab-manager.ts): `apps/desktop/src/core/tab-manager.ts`
- [Offline store](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/sync/offline-store.ts): `apps/desktop/src/sync/offline-store.ts`
- [Sync engine](https://github.com/yosemitecrew/yosemite-crew/blob/main/apps/desktop/src/sync/sync-engine.ts): `apps/desktop/src/sync/sync-engine.ts`

### Other components

- **Veterinary team**

## Connections

- Veterinary team → Web platform: uses (evidence: `README.md`)
- Veterinary team → Mobile app: uses (evidence: `README.md`)
- Web platform → Backend API: connects to PIMS (evidence: `README.md`)
- Mobile app → Backend API: connects to PIMS (evidence: `README.md`)
- Desktop shell → Desktop IPC: registers IPC (evidence: `apps/desktop/src/main.ts`)
- Desktop shell → Tab manager: uses tabs (evidence: `apps/desktop/src/main.ts`)
- Sync engine → Offline store: reads and writes (evidence: `apps/desktop/src/sync/sync-engine.ts`)
- Backend API → Appointments: exposes functions
- Backend API → Clinical records: exposes functions
- Backend API → Finance: exposes functions
- Backend API → Lab ingestion: exposes functions
- Backend API → Lab result queries: exposes functions
- Lab ingestion → Ingestion quarantine: uses
- Backend API → Lab integrations: integrates with
- PDF documents → Generic PDF engine: shares rendering
