# hoss-java/dashboard-project architecture

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

- Interactive diagram: https://gitdiagram.com/hoss-java/dashboard-project
- Repository: https://github.com/hoss-java/dashboard-project

## Overview

This repository is a React boat dashboard for displaying configured components and live or simulated telemetry. The main workflow loads dashboard items, dispatches each item by type to a renderer, and lets telemetry-aware renderers read or subscribe to shared data and history. Its component catalog includes numeric displays, switches, charts, maps, and other presentation widgets. The README also describes live updates for numeric displays, switches, and charts. Relationships are limited to those shown in excerpts or the source index; unsampled implementation details are not assumed.

Main entry points: [`clients/dashboard/src/components/renderers/ComponentRegistry.ts`](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/ComponentRegistry.ts) (Component registry), [`clients/dashboard/src/services/DataRegistry.ts`](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/services/DataRegistry.ts) (Telemetry registry), [`clients/dashboard/src/components/renderers/HistoryDiagram/HistoryDiagramComponent.tsx`](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/HistoryDiagram/HistoryDiagramComponent.tsx) (History chart), [`clients/dashboard/src/components/utils/resolveValue.ts`](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/utils/resolveValue.ts) (Value resolver)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Dashboard app"]
  node_app_entry["React entry<br/>[index.tsx]"]
  node_app_shell["App shell<br/>[App.tsx]"]
  node_home["Home page<br/>[HomePage.tsx]"]
  node_panel["Dashboard panel<br/>[DashboardPanel.tsx]"]
  node_items_config["Dashboard config"]
end

subgraph group_rendering["Component rendering"]
  node_item_renderer["Item dispatcher<br/>[ItemRenderer.tsx]"]
  node_component_registry["Component registry"]
  node_basic_renderers["Text, box, card"]
  node_switch["Binary switch"]
  node_numeric["Numeric display"]
  node_history["History chart"]
  node_gps_component["GPS map widget"]
  node_gps_map["GPS map view<br/>[GpsMap.tsx]"]
  node_sim_error["Simulator errors"]
  node_value_resolution["Value resolver<br/>[resolveValue.ts]"]
end

subgraph group_telemetry["Telemetry data"]
  node_data_registry[("Telemetry registry<br/>[DataRegistry.ts]")]
end

subgraph group_simulation["Mock simulation"]
  node_mock_initializer["Mock initializer<br/>[MockInitializer.ts]"]
  node_mock_service["Mock simulator<br/>[MockService.ts]"]
end

node_user(("Dashboard user"))

node_user -->|"opens dashboard"| node_app_entry
node_app_entry -->|"renders"| node_app_shell
node_app_shell -->|"renders"| node_home
node_app_shell -->|"initializes mocks"| node_mock_initializer
node_home -->|"renders"| node_panel
node_panel -->|"loads items"| node_items_config
node_panel -->|"renders items"| node_item_renderer
node_item_renderer -->|"looks up type"| node_component_registry
node_component_registry -->|"registers components"| node_basic_renderers
node_component_registry -->|"registers component"| node_switch
node_component_registry -->|"registers component"| node_numeric
node_component_registry -->|"registers component"| node_history
node_component_registry -->|"registers component"| node_gps_component
node_component_registry -->|"registers component"| node_sim_error
node_switch -->|"resolves settings"| node_value_resolution
node_numeric -->|"resolves settings"| node_value_resolution
node_history -->|"resolves settings"| node_value_resolution
node_gps_component -->|"resolves settings"| node_value_resolution
node_gps_component -->|"renders map"| node_gps_map
node_history -->|"reads history"| node_data_registry
node_history -->|"subscribes changes"| node_data_registry
node_numeric -->|"uses telemetry"| node_data_registry
node_gps_map -->|"uses telemetry"| node_data_registry
node_mock_initializer -->|"configures mocks"| node_mock_service
node_mock_initializer -->|"registers data"| node_data_registry
node_mock_service -->|"reads and updates"| node_data_registry

click node_app_entry "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/index.tsx"
click node_app_shell "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/App.tsx"
click node_home "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/pages/HomePage.tsx"
click node_panel "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/DashboardPanel.tsx"
click node_items_config "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/config/dashboardItems.json"
click node_item_renderer "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/ItemRenderer.tsx"
click node_component_registry "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/ComponentRegistry.ts"
click node_basic_renderers "https://github.com/hoss-java/dashboard-project/tree/develop/clients/dashboard/src/components/renderers"
click node_switch "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/BinarySwitch/BinarySwitchComponent.tsx"
click node_numeric "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/NumericDisplay/NumericDisplayComponent.tsx"
click node_history "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/HistoryDiagram/HistoryDiagramComponent.tsx"
click node_gps_component "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/GpsMap/GpsMapComponent.tsx"
click node_gps_map "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/GpsMap/GpsMap.tsx"
click node_sim_error "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/SimErrorBox/SimErrorBoxComponent.tsx"
click node_value_resolution "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/utils/resolveValue.ts"
click node_data_registry "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/services/DataRegistry.ts"
click node_mock_initializer "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/services/MockInitializer.ts"
click node_mock_service "https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/services/MockService.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_app_entry,node_app_shell,node_home,node_panel,node_items_config,node_user toneBlue
class node_item_renderer,node_component_registry,node_basic_renderers,node_switch,node_numeric,node_history,node_gps_component,node_gps_map,node_sim_error,node_value_resolution toneAmber
class node_data_registry toneMint
class node_mock_initializer,node_mock_service toneRose
```

## Components

### Dashboard app

- [React entry](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/index.tsx): `clients/dashboard/src/index.tsx`
- [App shell](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/App.tsx): `clients/dashboard/src/App.tsx`
- [Home page](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/pages/HomePage.tsx): `clients/dashboard/src/pages/HomePage.tsx`
- [Dashboard panel](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/DashboardPanel.tsx): `clients/dashboard/src/components/DashboardPanel.tsx`
- [Dashboard config](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/config/dashboardItems.json): `clients/dashboard/src/config/dashboardItems.json`

### Component rendering

- [Item dispatcher](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/ItemRenderer.tsx): `clients/dashboard/src/components/renderers/ItemRenderer.tsx`
- [Component registry](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/ComponentRegistry.ts): `clients/dashboard/src/components/renderers/ComponentRegistry.ts`
- [Text, box, card](https://github.com/hoss-java/dashboard-project/tree/develop/clients/dashboard/src/components/renderers): `clients/dashboard/src/components/renderers`
- [Binary switch](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/BinarySwitch/BinarySwitchComponent.tsx): `clients/dashboard/src/components/renderers/BinarySwitch/BinarySwitchComponent.tsx`
- [Numeric display](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/NumericDisplay/NumericDisplayComponent.tsx): `clients/dashboard/src/components/renderers/NumericDisplay/NumericDisplayComponent.tsx`
- [History chart](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/HistoryDiagram/HistoryDiagramComponent.tsx): `clients/dashboard/src/components/renderers/HistoryDiagram/HistoryDiagramComponent.tsx`
- [GPS map widget](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/GpsMap/GpsMapComponent.tsx): `clients/dashboard/src/components/renderers/GpsMap/GpsMapComponent.tsx`
- [GPS map view](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/GpsMap/GpsMap.tsx): `clients/dashboard/src/components/renderers/GpsMap/GpsMap.tsx`
- [Simulator errors](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/renderers/SimErrorBox/SimErrorBoxComponent.tsx): `clients/dashboard/src/components/renderers/SimErrorBox/SimErrorBoxComponent.tsx`
- [Value resolver](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/components/utils/resolveValue.ts): `clients/dashboard/src/components/utils/resolveValue.ts`

### Telemetry data

- [Telemetry registry](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/services/DataRegistry.ts): `clients/dashboard/src/services/DataRegistry.ts`

### Mock simulation

- [Mock initializer](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/services/MockInitializer.ts): `clients/dashboard/src/services/MockInitializer.ts`
- [Mock simulator](https://github.com/hoss-java/dashboard-project/blob/develop/clients/dashboard/src/services/MockService.ts): `clients/dashboard/src/services/MockService.ts`

### Other components

- **Dashboard user**

## Connections

- Dashboard user → React entry: opens dashboard
- React entry → App shell: renders (evidence: `clients/dashboard/src/index.tsx`)
- App shell → Home page: renders (evidence: `clients/dashboard/src/App.tsx`)
- App shell → Mock initializer: initializes mocks (evidence: `clients/dashboard/src/App.tsx`)
- Home page → Dashboard panel: renders (evidence: `clients/dashboard/src/pages/HomePage.tsx`)
- Dashboard panel → Dashboard config: loads items (evidence: `clients/dashboard/src/components/DashboardPanel.tsx`)
- Dashboard panel → Item dispatcher: renders items (evidence: `clients/dashboard/src/components/DashboardPanel.tsx`)
- Item dispatcher → Component registry: looks up type (evidence: `clients/dashboard/src/components/renderers/ItemRenderer.tsx`)
- Component registry → Text, box, card: registers components (evidence: `clients/dashboard/src/components/renderers/ComponentRegistry.ts`)
- Component registry → Binary switch: registers component (evidence: `clients/dashboard/src/components/renderers/ComponentRegistry.ts`)
- Component registry → Numeric display: registers component (evidence: `clients/dashboard/src/components/renderers/ComponentRegistry.ts`)
- Component registry → History chart: registers component (evidence: `clients/dashboard/src/components/renderers/ComponentRegistry.ts`)
- Component registry → GPS map widget: registers component (evidence: `clients/dashboard/src/components/renderers/ComponentRegistry.ts`)
- Component registry → Simulator errors: registers component (evidence: `clients/dashboard/src/components/renderers/ComponentRegistry.ts`)
- Binary switch → Value resolver: resolves settings (evidence: `clients/dashboard/src/components/renderers/BinarySwitch/BinarySwitchComponent.tsx`)
- Numeric display → Value resolver: resolves settings (evidence: `clients/dashboard/src/components/renderers/NumericDisplay/NumericDisplayComponent.tsx`)
- History chart → Value resolver: resolves settings (evidence: `clients/dashboard/src/components/renderers/HistoryDiagram/HistoryDiagramComponent.tsx`)
- GPS map widget → Value resolver: resolves settings (evidence: `clients/dashboard/src/components/renderers/GpsMap/GpsMapComponent.tsx`)
- GPS map widget → GPS map view: renders map (evidence: `clients/dashboard/src/components/renderers/GpsMap/GpsMapComponent.tsx`)
- History chart → Telemetry registry: reads history (evidence: `clients/dashboard/src/components/renderers/HistoryDiagram/HistoryDiagramComponent.tsx`)
- History chart → Telemetry registry: subscribes changes (evidence: `clients/dashboard/src/components/renderers/HistoryDiagram/HistoryDiagramComponent.tsx`)
- Numeric display → Telemetry registry: uses telemetry (evidence: `clients/dashboard/src/components/renderers/NumericDisplay/NumericDisplayComponent.tsx`)
- GPS map view → Telemetry registry: uses telemetry (evidence: `clients/dashboard/src/components/renderers/GpsMap/GpsMap.tsx`)
- Mock initializer → Mock simulator: configures mocks (evidence: `clients/dashboard/src/services/MockInitializer.ts`)
- Mock initializer → Telemetry registry: registers data (evidence: `clients/dashboard/src/services/MockInitializer.ts`)
- Mock simulator → Telemetry registry: reads and updates (evidence: `clients/dashboard/src/services/MockService.ts`)
