A native macOS menu bar application designed to help prevent Repetitive Strain Injury (RSI) using smart break timers and idle detection. Built with Tauri, React, and Rust.
- Smart Timer System:
- Microbreaks: Frequent, short pauses to reduce strain.
- Rest Breaks: Longer breaks for accumulated work time.
- Daily Limits: Tracks total active computer usage.
- Intelligent Idle Detection: Automatically pauses timers when you are away from the keyboard/mouse.
- Configurable Settings: Adjust intervals, durations, and strictness directly from the UI.
- Native Performance: Light on system resources, leveraging Rust for the backend.
- Modern UI: Clean interface built with React, Tailwind CSS, and shadcn/ui.
- Frontend: React, TypeScript, Tailwind CSS, shadcn/ui
- Backend: Rust, Tauri
- State Management: Custom Rust-based
TimerServicewith event emission to React - Build Tool: Vite, Bun
-
Clone the repository:
git clone https://github.com/yourusername/rsi-assistant.git cd rsi-assistant -
Install frontend dependencies:
bun install
-
Run the development environment:
bun run tauri dev
src-tauri/: Rust backendsrc/idle/: Idle detection logic usingdevice_query.src/timer/: Core timer state machine and configuration.src/commands.rs: Tauri commands exposed to the frontend.
src/: React frontendcomponents/: UI components (e.g.,TimerDisplay).hooks/: Custom hooks (e.g.,useTimer).pages/: Application views (e.g.,Settings).
The application uses an event-driven architecture. The Rust backend maintains the authoritative timer state and "ticks" every second. It broadcasts timer-update events to the frontend only when state changes or time passes. The frontend is a lightweight view layer that renders this state and sends user commands (like "update settings") back to the Rust core.
For more details, see docs/architecture.md.
MIT
