# hommebrenard/maintenance-gmao- architecture

> Architecture diagram of the GitHub repository hommebrenard/maintenance-gmao-, 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/maintenance-gmao-
- Repository: https://github.com/hommebrenard/maintenance-gmao-

## Overview

This is a French-language maintenance-management (GMAO/CMMS) web application. Users sign in, navigate operational modules, manage equipment and work orders, and import or review maintenance data; the app persists selected operational records through Supabase. The tree exposes additional request, inventory, preventive-maintenance, reporting, messaging, and configuration modules. Several view and query implementations were not sampled, so their presence is shown without speculative internal wiring.

Main entry points: [`src/App.tsx`](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/App.tsx) (Application shell), [`src/lib/supabaseClient.ts`](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/lib/supabaseClient.ts) (Supabase client), [`src/components/AuthGate.tsx`](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/AuthGate.tsx) (Sign-in gate), [`src/main.tsx`](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/main.tsx) (React bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["App entry"]
  node_mount["React bootstrap<br/>[main.tsx]"]
  node_auth["Sign-in gate<br/>[AuthGate.tsx]"]
  node_app["Application shell<br/>[App.tsx]"]
  node_sidebar["Module navigation<br/>[Sidebar.tsx]"]
end

subgraph group_operations["Maintenance operations"]
  node_workorders["Work orders<br/>[WorkOrdersView.tsx]"]
  node_requests["Maintenance requests<br/>[RequestsView.tsx]"]
  node_preventive["Preventive plans<br/>[PreventiveView.tsx]"]
  node_health["Equipment health records"]
  node_messages["Team messages<br/>[MessagesView.tsx]"]
  node_reports["Reports<br/>[ReportsView.tsx]"]
  node_automations["Automations and meters"]
  node_import["Import preview<br/>[ImportModal.tsx]"]
  node_csv["CSV parsing and matching<br/>[csvParser.ts]"]
end

subgraph group_catalog["Assets and setup"]
  node_equipment["Equipment registry<br/>[EquipmentView.tsx]"]
  node_inventory["Parts inventory<br/>[InventoryView.tsx]"]
  node_locations["Locations and clients<br/>[LocationsView.tsx]"]
  node_suppliers["Suppliers and technicians<br/>[SuppliersView.tsx]"]
  node_library["Procedures and templates<br/>[ProceduresView.tsx]"]
end

subgraph group_persistence["Data and persistence"]
  node_woquery["Work order queries<br/>[work_orders.ts]"]
  node_eqquery["Equipment queries<br/>[equipment.ts]"]
  node_supabase["Supabase client<br/>[supabaseClient.ts]"]
  node_database[("Supabase data store")]
end

node_user(("Staff user"))

node_user -->|"opens app"| node_mount
node_mount -->|"renders gate"| node_auth
node_auth -->|"authenticates"| node_supabase
node_auth -->|"provides session"| node_app
node_app -->|"renders navigation"| node_sidebar
node_sidebar -->|"selects module"| node_app
node_app -->|"renders route"| node_health
node_app -->|"renders route"| node_inventory
node_app -->|"renders route"| node_workorders
node_workorders -->|"opens import"| node_import
node_import -->|"parses and matches"| node_csv
node_app -->|"loads and creates equipment"| node_eqquery
node_app -->|"creates and updates orders"| node_woquery
node_eqquery -->|"queries"| node_supabase
node_woquery -->|"queries"| node_supabase
node_supabase -->|"reads and writes"| node_database

click node_mount "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/main.tsx"
click node_auth "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/AuthGate.tsx"
click node_app "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/App.tsx"
click node_sidebar "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/Sidebar.tsx"
click node_workorders "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/WorkOrdersView.tsx"
click node_requests "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/RequestsView.tsx"
click node_preventive "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/PreventiveView.tsx"
click node_health "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/HealthRecordsView.tsx"
click node_messages "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/MessagesView.tsx"
click node_reports "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/ReportsView.tsx"
click node_automations "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/AutomationsView.tsx"
click node_equipment "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/EquipmentView.tsx"
click node_inventory "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/InventoryView.tsx"
click node_locations "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/LocationsView.tsx"
click node_suppliers "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/SuppliersView.tsx"
click node_library "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/ProceduresView.tsx"
click node_import "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/ImportModal.tsx"
click node_csv "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/utils/csvParser.ts"
click node_woquery "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/lib/queries/work_orders.ts"
click node_eqquery "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/lib/queries/equipment.ts"
click node_supabase "https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/lib/supabaseClient.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_mount,node_auth,node_app,node_sidebar,node_user toneBlue
class node_workorders,node_requests,node_preventive,node_health,node_messages,node_reports,node_automations,node_import,node_csv toneAmber
class node_equipment,node_inventory,node_locations,node_suppliers,node_library toneMint
class node_woquery,node_eqquery,node_supabase,node_database toneRose
```

## Components

### App entry

- [React bootstrap](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/main.tsx): `src/main.tsx`
- [Sign-in gate](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/AuthGate.tsx): `src/components/AuthGate.tsx`
- [Application shell](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/App.tsx): `src/App.tsx`
- [Module navigation](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/Sidebar.tsx): `src/components/Sidebar.tsx`

### Maintenance operations

- [Work orders](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/WorkOrdersView.tsx): `src/components/views/WorkOrdersView.tsx`
- [Maintenance requests](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/RequestsView.tsx): `src/components/views/RequestsView.tsx`
- [Preventive plans](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/PreventiveView.tsx): `src/components/views/PreventiveView.tsx`
- [Equipment health records](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/HealthRecordsView.tsx): `src/components/views/HealthRecordsView.tsx`
- [Team messages](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/MessagesView.tsx): `src/components/views/MessagesView.tsx`
- [Reports](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/ReportsView.tsx): `src/components/views/ReportsView.tsx`
- [Automations and meters](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/AutomationsView.tsx): `src/components/views/AutomationsView.tsx`
- [Import preview](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/ImportModal.tsx): `src/components/views/ImportModal.tsx`
- [CSV parsing and matching](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/utils/csvParser.ts): `src/utils/csvParser.ts`

### Assets and setup

- [Equipment registry](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/EquipmentView.tsx): `src/components/views/EquipmentView.tsx`
- [Parts inventory](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/InventoryView.tsx): `src/components/views/InventoryView.tsx`
- [Locations and clients](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/LocationsView.tsx): `src/components/views/LocationsView.tsx`
- [Suppliers and technicians](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/SuppliersView.tsx): `src/components/views/SuppliersView.tsx`
- [Procedures and templates](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/components/views/ProceduresView.tsx): `src/components/views/ProceduresView.tsx`

### Data and persistence

- [Work order queries](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/lib/queries/work_orders.ts): `src/lib/queries/work_orders.ts`
- [Equipment queries](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/lib/queries/equipment.ts): `src/lib/queries/equipment.ts`
- [Supabase client](https://github.com/hommebrenard/maintenance-gmao-/blob/main/src/lib/supabaseClient.ts): `src/lib/supabaseClient.ts`
- **Supabase data store**

### Other components

- **Staff user**

## Connections

- Staff user → React bootstrap: opens app
- React bootstrap → Sign-in gate: renders gate
- Sign-in gate → Supabase client: authenticates
- Sign-in gate → Application shell: provides session
- Application shell → Module navigation: renders navigation
- Module navigation → Application shell: selects module
- Application shell → Equipment health records: renders route
- Application shell → Parts inventory: renders route
- Application shell → Work orders: renders route
- Work orders → Import preview: opens import
- Import preview → CSV parsing and matching: parses and matches
- Application shell → Equipment queries: loads and creates equipment
- Application shell → Work order queries: creates and updates orders
- Equipment queries → Supabase client: queries
- Work order queries → Supabase client: queries
- Supabase client → Supabase data store: reads and writes
