Real-time data acquisition and monitoring dashboard with live WebSocket streaming.
Terminal 1 - Backend:
cd tests/mock-backend
npm install # First time only
npm start # Runs on port 8081Terminal 2 - Frontend:
npm install # First time only
npm run dev # Opens on http://localhost:5173Navigate to /live-data to see 6 sensor channels updating in real-time.
Frontend: React 19, TypeScript, Vite, Socket.IO Client, Tailwind CSS, shadcn/ui, Recharts Backend: Node.js, Socket.IO (port 8081)
Backend (ws://localhost:8081) β OmnibusContext β Dashboard β 6 LineGraph Charts
src/context/OmnibusContext.tsx- WebSocket connection & state managementsrc/types/omnibus.ts- TypeScript type definitionssrc/components/SensorMonitoringDashboard.tsx- Main dashboardsrc/components/LineGraph.tsx- Reusable chart component
Data Flow: Backend emits messages at 40 Hz β Context parses & buffers (100 points/channel) β Charts render live updates
npm run dev # Start dev server
npm run build # Production build
npm run lint # Lint codeProject Structure:
src/
βββ components/ # UI components
βββ context/ # OmnibusContext for WebSocket
βββ types/ # TypeScript definitions
βββ main.tsx # Entry point
tests/
βββ mock-backend/ # Mock data server
βββ server.js