How goodee-aim/cnc-wearpoint-frontend works
AIM is a React dashboard for replaying MATWI tool images and sensor data, displaying server-mediated AI wear predictions, and managing alerts. The main workflow is browser → dashboard state and shared-monitoring polling → backend-provided playback, measurements and sensor data → dashboard visualization; Set test uploads image/CSV files for inference through the backend. Alert history and acknowledgement form a separate branch. Edges are limited to relationships shown in excerpts, the source index, or README; unsampled implementation details are not asserted.
Main entry points: useDashboard.js Dashboard state · App.jsx App composition · useSharedMonitoring.js Shared playback state · AimUI.jsx Screen routing
Components 27
Application UI
- App composition
src/App.jsx - Screen routing
src/aim-ui/components/AimUI.jsx - Shared display components
src/aim-ui/components/shared.jsx - Korean and English
src/i18n/index.js
Shared Monitoring
- Monitoring view
src/aim-ui/pages/DashboardPage.jsx - Dashboard state
src/hooks/useDashboard.js - Shared playback state
src/hooks/useSharedMonitoring.js - Sensor charts
src/aim-ui/components/SensorCharts.jsx
Set Test
- Upload and replay
src/aim-ui/pages/ManualInputPage.jsx - File and replay controls
src/aim-ui/components/ManualFilePicker.jsx - Manual control icon
src/aim-ui/components/ManualControlIcon.jsx
Alerts
- Alert history
src/aim-ui/pages/AlertsPage.jsx - Alert data and acknowledgement
src/hooks/useAlerts.js - Alert history requests
src/utils/alertHistory.js - Historical alert preview
src/utils/alertPreview.js
Data and Presentation
- UI data adapters
src/aim-ui/adapters.js - Sensor parsing and cache
src/utils/csv.js - Cutting markers
src/utils/cuttingSegmentMarkers.js - Playback projection
src/utils/sharedMonitoring.js - Wear status rules
src/utils/wear.js - Wear guidance
src/utils/wearAdvice.js - Set display names
src/utils/setDisplay.js - Playback rate rules
src/utils/playbackRate.js - Sets and thresholds
src/dashboardConfig.js
Other components
- Dashboard user
- FastAPI backend
- AI model serving
Connections 32
- Dashboard user → App composition: uses dashboard
README.md - App composition → Dashboard state: loads state hook
src/App.jsx - App composition → Screen routing: renders interface
src/App.jsx - Screen routing → Monitoring view: routes monitoring
src/aim-ui/components/AimUI.jsx - Screen routing → Upload and replay: routes Set test
src/aim-ui/components/AimUI.jsx - Screen routing → Alert history: routes alerts
src/aim-ui/components/AimUI.jsx - Dashboard state → Shared playback state: uses playback hook
src/hooks/useDashboard.js - Dashboard state → Alert data and acknowledgement: uses alert hook
src/hooks/useDashboard.js - Shared playback state → FastAPI backend: polls playback and inference
src/hooks/useSharedMonitoring.js - Dashboard state → FastAPI backend: loads images and measurements
- Shared playback state → Playback projection: projects server state
src/hooks/useSharedMonitoring.js - Playback projection → Playback rate rules: applies playback rate
src/utils/sharedMonitoring.js - Shared playback state → Sensor parsing and cache: parses sensor data
src/hooks/useSharedMonitoring.js - Shared playback state → Cutting markers: loads cut markers
src/hooks/useSharedMonitoring.js - Monitoring view → Sensor charts: renders waveforms
src/aim-ui/pages/DashboardPage.jsx - Monitoring view → Shared display components: renders dashboard cards
src/aim-ui/pages/DashboardPage.jsx - App composition → UI data adapters: converts display data
src/App.jsx - UI data adapters → Cutting markers: uses waveform markers
src/aim-ui/adapters.js - Upload and replay → FastAPI backend: uploads and requests inference
src/aim-ui/pages/ManualInputPage.jsx - FastAPI backend → AI model serving: requests inference
README.md - Upload and replay → File and replay controls: uses file picker
src/aim-ui/pages/ManualInputPage.jsx - File and replay controls → Manual control icon: renders control icon
src/aim-ui/components/ManualFilePicker.jsx - Alert history → Alert data and acknowledgement: displays alert history
src/aim-ui/pages/AlertsPage.jsx - Alert data and acknowledgement → Alert history requests: loads shared history
src/hooks/useAlerts.js - Alert history requests → FastAPI backend: reads and acknowledges alerts
- App composition → Historical alert preview: applies historical preview
src/App.jsx - Shared display components → Wear guidance: shows wear guidance
src/aim-ui/components/shared.jsx - Shared display components → Set display names: formats Set names
src/aim-ui/components/shared.jsx - Alert data and acknowledgement → Wear status rules: classifies wear levels
src/hooks/useAlerts.js - Dashboard state → Sensor parsing and cache: parses imported tables
src/hooks/useDashboard.js - Dashboard state → Sets and thresholds: uses API and Set config
src/hooks/useDashboard.js - Korean and English → Dashboard user: provides translated UI
src/i18n/index.js