Skip to content

XNtriCT/DeskRight

Repository files navigation

DeskRight - Standalone Posture Monitor & Hydration Companion (v1.0.0)

DeskRight is a premium, lightweight, standalone desktop application built to help developers and office workers maintain healthy spinal posture and stay hydrated. Utilizing browser-free local execution, computer vision, and native OS APIs, DeskRight runs in the background and silently guides you to better health.


🚀 Key Features

  • Skeletal Posture Diagnostics (MediaPipe): Tracks your shoulders, ears, and nose to measure slouching, lateral neck tilt, and forward protrusion ("tech neck") with advanced mathematical baseline calibration.
  • 12% Tolerance Calibration Buffer: Calibrates against your natural sitting posture and applies a smart 10-15% buffer zone in all directions to prevent annoying false warnings during minor movements.
  • Smart Typing Mode: Automatically suppresses tech neck alerts when typing in the active window. Relaxes thresholds by 60% when minimized or working in background windows to accommodate natural keyboard-looking angles.
  • Background Tracking & System Tray Minimization: Closing the application minimizes it directly to your Windows system tray instead of exiting. The camera stream and pose evaluation loops continue running at 100% speed.
  • Native System Tray Alerts: Fires native Windows OS notification balloons from the system tray when posture worsens. Clicking the notification restores the main application window instantly.
  • Drink Water Hydration Reminders: Persistent hydration scheduler with a sidebar toggle, interval slider (15 to 180 minutes), and real-time live countdown timer.
  • Dynamic Biometrics Spine Reports: Real-time aggregated Daily, Weekly, Monthly, and Yearly reports tracking overall alignment indices, warning count trends, and clinical assessment suggestions.
  • Offline Secure Loopback Execution: Starts a local Express HTTP loopback server on a dynamic port (127.0.0.1) to establish a trusted secure context, unlocking webcam permissions instantly without browser dialog dependency.

🛠️ Installation & Usage

Running the Packaged Software (Windows x64)

The final compiled standalone build is located under dist-app/DeskRight-win32-x64/.

  1. Launch App: Double-click DeskRight.lnk (shortcut in the root folder) or run DeskRight.bat. This launches the standalone DeskRight.exe window.
  2. Minimize to Tray: Click the close (X) button in the titlebar. The app minimizes to your system tray in the taskbar corner.
  3. Tray Controls: Right-click the system tray icon to access quick actions:
    • Show DeskRight: Restores the window.
    • Diagnostics Console: Direct tab shortcut.
    • Spine Analytics: Direct biometrics tab shortcut.
    • Quit: Completely closes the background process.

💻 Development & Compilation

Prerequisites

  • Node.js (v18+)
  • Python & Pillow (optional, used for .ico asset generation)

1. Install Dependencies

npm install

2. Run Local Development Server

npm run dev

Loads the local hot-reloaded development application on http://localhost:3000.

3. Build & Package Standalone PE Binary

To compile and bundle the React production assets and package the Electron wrapper into dist-app/DeskRight-win32-x64/DeskRight.exe with custom binary branding:

npm run package

📦 Project Structure & Key Files

  • electron.cjs: Main Electron process controlling window creation, Tray menu templates, IPC notification events, will-quit garbage collection, and local Express server binding.
  • preload.js: Preload script bridging safe native APIs (window.electronAPI) to the frontend renderer.
  • src/App.tsx: Main React application interface containing timer tickers, hydration reminders, dynamic spine metrics calculators, and sidebar tab navigation.
  • src/components/PostureVisualizer.tsx: Canvas frame drawing pipeline, MediaPipe Pose callback handlers, reference calibration logic, and ref-wrapped variables to bypass closure traps.
  • src/components/SettingsPanel.tsx: Setting controls, sensitivity sliders, and the toggle for Smart Typing Mode.

📄 License

This project is licensed under the Apache-2.0 License.

About

DeskRight is a premium, lightweight, standalone desktop application built to help developers and office workers maintain healthy spinal posture and stay hydrated.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors