A real-time gym rep counter that streams motion sensor data to a live web dashboard, detects reps with low latency, and optionally persists session state.
⚠️ Hardware required: This project depends on live accelerometer/gyroscope data from a sensor device. Without the physical hardware, you can still review the code, run the dashboard/server, and (optionally) replay sample data if included.
- Streams high-frequency IMU (accelerometer + gyroscope) data from a sensor device
- Detects reps using filtering + peak/valley logic + debouncing and timing constraints
- Broadcasts live rep count + metrics to a dashboard via WebSockets
- Optionally persists session state (counts, metrics) to Supabase
- Sensor / Signal Processing: C++ (rep detection logic)
- Backend: Node.js (ingestion + validation + buffering + WebSockets)
- Frontend: HTML/CSS/JavaScript (live dashboard)
- Storage (optional): Supabase (session state)
- Build tooling (C++): vcpkg / CMake (if applicable)
Sensor Device (IMU) → Backend → Dashboard
- Sensor device streams timestamped IMU frames.
- Backend ingests frames, validates schema, buffers, and forwards updates over WebSockets.
- Dashboard subscribes to the WebSocket feed and renders live rep count + session metrics.
- Session state is written/read from Supabase for persistence.
.
├── sensor/ # Firmware + sensor streaming code (hardware required)
│ ├── src/
│ └── README.md # Wiring / flashing notes (if included)
├── rep_detection/ # C++ rep logic (filtering, peaks, debouncing)
│ ├── src/
│ └── CMakeLists.txt
├── server/ # Node.js ingestion + WebSocket server
│ ├── src/
│ ├── package.json
│ └── .env.example
├── dashboard/ # HTML/CSS/JS client
│ ├── index.html
│ ├── styles.css
│ └── script.js
└── docs/ # Diagrams, sample frames, notes (optional)