How rht-iot/reactweb works
This is a Next.js IoT monitoring and control web application. Users authenticate, discover authorized devices, and view live, historical, IAQ, or spatial telemetry; the control panel reads device state and sends control values. Administrators manage user/device access and Microsoft device-token flows. The frontend calls external AWS-backed APIs; the README also documents scheduled and stream-triggered data preparation, but those backend workers and tables are not present in the supplied tree. Edges reflect excerpts or README statements; unsampled API wiring is not inferred.
Main entry points: controlPanel/page.tsx Control panel · aws.ts AWS data client · login/page.tsx Device dashboard · Dashboard.tsx IAQ dashboard
Components 25
Identity
- OIDC configuration
app/authConfig.ts - Amazon Cognito
- Microsoft identity
Monitoring
- Device dashboard
app/login/page.tsx - IAQ dashboard
app/IAQ/Dashboard.tsx - IAQ metrics
app/IAQ/MetricCard.tsx - IAQ history chart
app/IAQ/ChartDisplay.tsx - 2D device map
app/2d/page.tsx - 3D device map
app/3d/three.tsx - Live gauges
app/components/DashboardGauges.tsx - Gauge display
app/components/GaugeCard.tsx - Realtime charts
app/components/LatestLineChart.tsx - Device monitor
app/components/device-monitor.tsx
Device control
- Control panel
app/controlPanel/page.tsx - Air conditioner controls
app/controlPanel/AirConPanel.tsx - Air purifier controls
app/controlPanel/EC490.tsx
Administration
- Access administration
app/admin/page.tsx
External services
- AWS data client
app/lib/aws.ts - IoT API
- UserLocationAccess
- SensorBoxModel
- controlIDTable
- IAQSensorData
- BDZL service
Other components
- User
Connections 32
- User → OIDC configuration: authenticates via
app/authConfig.ts - User → Device dashboard: opens dashboard
app/login/page.tsx - Device dashboard → Live gauges: renders
app/login/page.tsx - Live gauges → Gauge display: renders
app/components/DashboardGauges.tsx - Device dashboard → AWS data client: requests device data
app/login/page.tsx - AWS data client → IoT API: calls
app/lib/aws.ts - User → IAQ dashboard: opens IAQ view
app/IAQ/Dashboard.tsx - IAQ dashboard → AWS data client: loads telemetry
app/IAQ/Dashboard.tsx - IAQ dashboard → IAQ metrics: renders metrics
app/IAQ/Dashboard.tsx - IAQ dashboard → IAQ history chart: renders history
app/IAQ/Dashboard.tsx - User → 2D device map: opens map
- User → 3D device map: opens map
- 3D device map → AWS data client: requests telemetry
app/3d/three.tsx - 3D device map → Live gauges: renders
app/3d/three.tsx - 3D device map → Realtime charts: renders
app/3d/three.tsx - User → Control panel: opens controls
app/controlPanel/page.tsx - Control panel → AWS data client: loads device data
app/controlPanel/page.tsx - Control panel → IoT API: sends control values
app/controlPanel/page.tsx - Control panel → Air conditioner controls: renders controls
app/controlPanel/page.tsx - Control panel → Air purifier controls: renders controls
app/controlPanel/page.tsx - User → Access administration: manages access
app/admin/page.tsx - Access administration → UserLocationAccess: updates access
README.md - Access administration → Microsoft identity: exchanges device token
- OIDC configuration → Amazon Cognito: configures sign-in
app/authConfig.ts - Device dashboard → UserLocationAccess: requests device authorization
README.md - IoT API → SensorBoxModel: reads device records
README.md - IoT API → controlIDTable: reads device identifiers
README.md - IoT API → IAQSensorData: writes telemetry
README.md - BDZL service → controlIDTable: provides identifiers
README.md - BDZL service → IAQSensorData: provides latest data
README.md - SensorBoxModel → controlIDTable: stream updates trigger refresh
README.md - SensorBoxModel → BDZL service: scheduled fetch selects devices
README.md