# hommebrenard/gmao-carnet-sante-machine architecture

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

- Interactive diagram: https://gitdiagram.com/hommebrenard/gmao-carnet-sante-machine
- Repository: https://github.com/hommebrenard/gmao-carnet-sante-machine

## Overview

Carnet de Santé Équipement is a browser-based industrial CMMS. Users select and review an equipment record, then track its work orders, preventive/regulatory schedule, spare parts, documents and indicators; separate planning and supplier views support maintenance coordination. App.tsx owns the main state and dispatches data to the views. The README documents technical passport export and safety/compliance content, while sampled print code confirms PDF generation. State is initialized from demo data and localStorage; no remote persistence is evidenced. Some UI wiring is omitted in the excerpts, so uncertain calls are not shown.

Main entry points: [`src/App.tsx`](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/App.tsx) (Application state), [`src/components/EquipmentCard.tsx`](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/EquipmentCard.tsx) (Equipment card), [`src/main.tsx`](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/main.tsx) (React entry), [`src/components/ChangePhotoModal.tsx`](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/ChangePhotoModal.tsx) (Photo editing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application shell"]
  node_entry["React entry<br/>[main.tsx]"]
  node_appstate["Application state<br/>[App.tsx]"]
  node_initialdata["Seed records<br/>[initialData.ts]"]
  node_types["Domain types<br/>[types.ts]"]
end

subgraph group_asset["Equipment records"]
  node_equipment["Equipment card<br/>[EquipmentCard.tsx]"]
  node_details["Equipment details"]
  node_health["Health record"]
  node_photo["Photo editing"]
  node_imageutils["Image processing<br/>[imageUtils.ts]"]
end

subgraph group_maintenance["Maintenance operations"]
  node_interventions["Work orders"]
  node_newintervention["Create work order"]
  node_planning["Maintenance planning<br/>[PlanningView.tsx]"]
  node_planningtab["Planning tab<br/>[PlanningTab.tsx]"]
  node_maintenanceview["Maintenance view"]
  node_suppliers["Supplier directory<br/>[SuppliersView.tsx]"]
end

subgraph group_resources["Resources and reporting"]
  node_articles["Spare parts<br/>[ArticlesTab.tsx]"]
  node_indicators["Operational indicators<br/>[IndicatorsTab.tsx]"]
  node_documents["Equipment documents<br/>[DocumentsTab.tsx]"]
  node_newdocument["Add document"]
end

subgraph group_export["Passport export"]
  node_passport["Technical passport"]
  node_printutils["Print and PDF<br/>[printUtils.ts]"]
end

node_operator(("Maintenance user"))
node_browser[("Browser storage")]

node_operator -->|"opens"| node_entry
node_entry -->|"renders"| node_appstate
node_appstate -->|"initializes"| node_initialdata
node_appstate -->|"reads and writes"| node_browser
node_appstate -->|"renders"| node_equipment
node_appstate -->|"renders"| node_planning
node_appstate -->|"renders"| node_maintenanceview
node_appstate -->|"renders"| node_suppliers
node_equipment -->|"shows"| node_details
node_equipment -->|"shows"| node_interventions
node_equipment -->|"shows"| node_articles
node_equipment -->|"shows"| node_indicators
node_equipment -->|"shows"| node_documents
node_appstate -->|"opens"| node_newintervention
node_appstate -->|"opens"| node_newdocument
node_appstate -->|"opens"| node_health
node_appstate -->|"opens"| node_photo
node_photo -->|"compresses image"| node_imageutils
node_appstate -->|"renders"| node_planningtab
node_appstate -->|"opens"| node_passport
node_passport -->|"exports PDF"| node_printutils
node_operator -->|"selects equipment"| node_appstate

click node_entry "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/main.tsx"
click node_appstate "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/App.tsx"
click node_equipment "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/EquipmentCard.tsx"
click node_details "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/EquipmentDetails.tsx"
click node_health "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/HealthRecordModal.tsx"
click node_photo "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/ChangePhotoModal.tsx"
click node_imageutils "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/utils/imageUtils.ts"
click node_interventions "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/InterventionsTab.tsx"
click node_newintervention "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/NewInterventionModal.tsx"
click node_planning "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/PlanningView.tsx"
click node_planningtab "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/PlanningTab.tsx"
click node_maintenanceview "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/MaintenanceView.tsx"
click node_suppliers "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/SuppliersView.tsx"
click node_articles "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/ArticlesTab.tsx"
click node_indicators "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/IndicatorsTab.tsx"
click node_documents "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/DocumentsTab.tsx"
click node_newdocument "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/NewDocumentModal.tsx"
click node_initialdata "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/data/initialData.ts"
click node_types "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/types.ts"
click node_passport "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/PrintEquipmentModal.tsx"
click node_printutils "https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/utils/printUtils.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_appstate,node_initialdata,node_types,node_operator toneBlue
class node_equipment,node_details,node_health,node_photo,node_imageutils,node_browser toneAmber
class node_interventions,node_newintervention,node_planning,node_planningtab,node_maintenanceview,node_suppliers toneMint
class node_articles,node_indicators,node_documents,node_newdocument toneRose
class node_passport,node_printutils toneIndigo
```

## Components

### Application shell

- [React entry](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/main.tsx): `src/main.tsx`
- [Application state](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/App.tsx): `src/App.tsx`
- [Seed records](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/data/initialData.ts): `src/data/initialData.ts`
- [Domain types](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/types.ts): `src/types.ts`

### Equipment records

- [Equipment card](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/EquipmentCard.tsx): `src/components/EquipmentCard.tsx`
- [Equipment details](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/EquipmentDetails.tsx): `src/components/EquipmentDetails.tsx`
- [Health record](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/HealthRecordModal.tsx): `src/components/HealthRecordModal.tsx`
- [Photo editing](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/ChangePhotoModal.tsx): `src/components/ChangePhotoModal.tsx`
- [Image processing](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/utils/imageUtils.ts): `src/utils/imageUtils.ts`

### Maintenance operations

- [Work orders](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/InterventionsTab.tsx): `src/components/InterventionsTab.tsx`
- [Create work order](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/NewInterventionModal.tsx): `src/components/NewInterventionModal.tsx`
- [Maintenance planning](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/PlanningView.tsx): `src/components/PlanningView.tsx`
- [Planning tab](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/PlanningTab.tsx): `src/components/PlanningTab.tsx`
- [Maintenance view](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/MaintenanceView.tsx): `src/components/MaintenanceView.tsx`
- [Supplier directory](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/SuppliersView.tsx): `src/components/SuppliersView.tsx`

### Resources and reporting

- [Spare parts](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/ArticlesTab.tsx): `src/components/ArticlesTab.tsx`
- [Operational indicators](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/IndicatorsTab.tsx): `src/components/IndicatorsTab.tsx`
- [Equipment documents](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/DocumentsTab.tsx): `src/components/DocumentsTab.tsx`
- [Add document](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/NewDocumentModal.tsx): `src/components/NewDocumentModal.tsx`

### Passport export

- [Technical passport](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/components/PrintEquipmentModal.tsx): `src/components/PrintEquipmentModal.tsx`
- [Print and PDF](https://github.com/hommebrenard/gmao-carnet-sante-machine/blob/main/src/utils/printUtils.ts): `src/utils/printUtils.ts`

### Other components

- **Maintenance user**
- **Browser storage**

## Connections

- Maintenance user → React entry: opens
- React entry → Application state: renders
- Application state → Seed records: initializes
- Application state → Browser storage: reads and writes
- Application state → Equipment card: renders
- Application state → Maintenance planning: renders
- Application state → Maintenance view: renders
- Application state → Supplier directory: renders
- Equipment card → Equipment details: shows
- Equipment card → Work orders: shows
- Equipment card → Spare parts: shows
- Equipment card → Operational indicators: shows
- Equipment card → Equipment documents: shows
- Application state → Create work order: opens
- Application state → Add document: opens
- Application state → Health record: opens
- Application state → Photo editing: opens
- Photo editing → Image processing: compresses image
- Application state → Planning tab: renders
- Application state → Technical passport: opens
- Technical passport → Print and PDF: exports PDF
- Maintenance user → Application state: selects equipment
