# amrofekry/radiology-inventory-system architecture

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

- Interactive diagram: https://gitdiagram.com/amrofekry/radiology-inventory-system
- Repository: https://github.com/amrofekry/radiology-inventory-system

## Overview

This is a React radiology-equipment inventory dashboard. Users browse inventory, inspect asset details and QR codes, add equipment, and search in natural language; the app applies parsed filters to the equipment list and presents operational and financial summaries. The sampled data hook initializes from static constants and updates React state, rather than demonstrating persistent database storage. Maintenance and lifecycle information appear as equipment fields and detail views, not as separate sampled workflow services. The graph follows the excerpts and README; unsampled capabilities are not treated as implemented modules.

Main entry points: [`App.tsx`](https://github.com/amrofekry/radiology-inventory-system/blob/main/App.tsx) (App Coordinator), [`components/Icon.tsx`](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Icon.tsx) (Icon Renderer), [`components/Header.tsx`](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Header.tsx) (Search Header), [`components/AddEquipmentModal.tsx`](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/AddEquipmentModal.tsx) (Equipment Registration)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_ui["User Interface"]
  node_app["App Coordinator<br/>[App.tsx]"]
  node_header["Search Header<br/>[Header.tsx]"]
  node_toast["Status Toast<br/>[Toast.tsx]"]
  node_icons["Icon Renderer<br/>[Icon.tsx]"]
end

subgraph group_inventory["Inventory Workflow"]
  node_add["Equipment Registration"]
  node_table["Equipment Table<br/>[EquipmentTable.tsx]"]
  node_detail["Asset Details and QR"]
end

subgraph group_insights["Search and Analytics"]
  node_dashboard["Operational Dashboard<br/>[Dashboard.tsx]"]
  node_gemini["Query Interpretation<br/>[geminiService.ts]"]
end

subgraph group_model["Equipment Data"]
  node_equipment_state["Equipment State<br/>[useDatabase.ts]"]
  node_catalog["Inventory Catalog<br/>[constants.ts]"]
  node_types["Domain Types<br/>[types.ts]"]
end

node_user(("Staff User"))
node_gemini_api["Google Gemini"]

node_user -->|"enters query"| node_header
node_header -->|"submits query"| node_app
node_app -->|"parses query"| node_gemini
node_gemini -->|"requests filters"| node_gemini_api
node_app -.->|"reads equipment"| node_equipment_state
node_equipment_state -->|"loads sample data"| node_catalog
node_app -->|"renders dashboard"| node_dashboard
node_app -.->|"renders table"| node_table
node_app -.->|"opens details"| node_detail
node_app -->|"opens registration"| node_add
node_app -->|"renders feedback"| node_toast
node_add -->|"submits equipment"| node_app
node_app -.->|"renders icons"| node_icons
node_dashboard -->|"renders icons"| node_icons
node_table -->|"renders icons"| node_icons
node_detail -->|"renders icons"| node_icons
node_add -->|"renders icons"| node_icons
node_header -->|"renders icons"| node_icons
node_toast -->|"renders icons"| node_icons
node_equipment_state -->|"uses domain types"| node_types
node_catalog -->|"defines records"| node_types

click node_app "https://github.com/amrofekry/radiology-inventory-system/blob/main/App.tsx"
click node_header "https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Header.tsx"
click node_toast "https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Toast.tsx"
click node_add "https://github.com/amrofekry/radiology-inventory-system/blob/main/components/AddEquipmentModal.tsx"
click node_table "https://github.com/amrofekry/radiology-inventory-system/blob/main/components/EquipmentTable.tsx"
click node_detail "https://github.com/amrofekry/radiology-inventory-system/blob/main/components/EquipmentDetailModal.tsx"
click node_dashboard "https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Dashboard.tsx"
click node_gemini "https://github.com/amrofekry/radiology-inventory-system/blob/main/services/geminiService.ts"
click node_equipment_state "https://github.com/amrofekry/radiology-inventory-system/blob/main/hooks/useDatabase.ts"
click node_catalog "https://github.com/amrofekry/radiology-inventory-system/blob/main/constants.ts"
click node_types "https://github.com/amrofekry/radiology-inventory-system/blob/main/types.ts"
click node_icons "https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Icon.tsx"

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_app,node_header,node_toast,node_icons,node_user toneBlue
class node_add,node_table,node_detail toneAmber
class node_dashboard,node_gemini toneMint
class node_equipment_state,node_catalog,node_types toneRose
class node_gemini_api toneIndigo
```

## Components

### User Interface

- [App Coordinator](https://github.com/amrofekry/radiology-inventory-system/blob/main/App.tsx): `App.tsx`
- [Search Header](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Header.tsx): `components/Header.tsx`
- [Status Toast](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Toast.tsx): `components/Toast.tsx`
- [Icon Renderer](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Icon.tsx): `components/Icon.tsx`

### Inventory Workflow

- [Equipment Registration](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/AddEquipmentModal.tsx): `components/AddEquipmentModal.tsx`
- [Equipment Table](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/EquipmentTable.tsx): `components/EquipmentTable.tsx`
- [Asset Details and QR](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/EquipmentDetailModal.tsx): `components/EquipmentDetailModal.tsx`

### Search and Analytics

- [Operational Dashboard](https://github.com/amrofekry/radiology-inventory-system/blob/main/components/Dashboard.tsx): `components/Dashboard.tsx`
- [Query Interpretation](https://github.com/amrofekry/radiology-inventory-system/blob/main/services/geminiService.ts): `services/geminiService.ts`

### Equipment Data

- [Equipment State](https://github.com/amrofekry/radiology-inventory-system/blob/main/hooks/useDatabase.ts): `hooks/useDatabase.ts`
- [Inventory Catalog](https://github.com/amrofekry/radiology-inventory-system/blob/main/constants.ts): `constants.ts`
- [Domain Types](https://github.com/amrofekry/radiology-inventory-system/blob/main/types.ts): `types.ts`

### Other components

- **Staff User**
- **Google Gemini**

## Connections

- Staff User → Search Header: enters query (evidence: `components/Header.tsx`)
- Search Header → App Coordinator: submits query (evidence: `App.tsx`)
- App Coordinator → Query Interpretation: parses query (evidence: `App.tsx`)
- Query Interpretation → Google Gemini: requests filters (evidence: `services/geminiService.ts`)
- App Coordinator → Equipment State: reads equipment (evidence: `App.tsx`)
- Equipment State → Inventory Catalog: loads sample data (evidence: `hooks/useDatabase.ts`)
- App Coordinator → Operational Dashboard: renders dashboard (evidence: `App.tsx`)
- App Coordinator → Equipment Table: renders table (evidence: `App.tsx`)
- App Coordinator → Asset Details and QR: opens details (evidence: `App.tsx`)
- App Coordinator → Equipment Registration: opens registration (evidence: `App.tsx`)
- App Coordinator → Status Toast: renders feedback (evidence: `App.tsx`)
- Equipment Registration → App Coordinator: submits equipment (evidence: `components/AddEquipmentModal.tsx`)
- App Coordinator → Icon Renderer: renders icons
- Operational Dashboard → Icon Renderer: renders icons (evidence: `components/Dashboard.tsx`)
- Equipment Table → Icon Renderer: renders icons (evidence: `components/EquipmentTable.tsx`)
- Asset Details and QR → Icon Renderer: renders icons (evidence: `components/EquipmentDetailModal.tsx`)
- Equipment Registration → Icon Renderer: renders icons (evidence: `components/AddEquipmentModal.tsx`)
- Search Header → Icon Renderer: renders icons (evidence: `components/Header.tsx`)
- Status Toast → Icon Renderer: renders icons (evidence: `components/Toast.tsx`)
- Equipment State → Domain Types: uses domain types (evidence: `hooks/useDatabase.ts`)
- Inventory Catalog → Domain Types: defines records (evidence: `constants.ts`)
