Thank you for your interest in contributing to hw-monitor! This document outlines how to get started.
- Rust (stable toolchain)
- Node.js >= 18
- Tauri CLI v2
- A Linux machine (the app reads from
/proc,/sys, etc.)
-
Fork the repository and clone your fork:
git clone https://github.com/YOUR_USERNAME/hw-monitor.git cd hw-monitor -
Install frontend dependencies:
npm install
-
Run in development mode:
npm run tauri dev
src/ # React + TypeScript frontend
components/ # UI components (Performance, Processes, Sensors, Disks, Config)
hooks/ # Data-fetching hooks per module
services/ # Zustand global store
styles/ # styled-components
locales/ # i18n translation files (en, fr, de, es, ar, pl, ru, uk)
src-tauri/src/ # Rust backend
cpu/ # CPU info and usage
memory/ # /proc/meminfo reader
disk/ # /proc/diskstats + partition info
network/ # /proc/net/dev reader
proc/ # Process list + kill
sensors/ # hwmon temperature sensors
battery/ # sysfs battery reader
gpu/ # NVIDIA (nvml) + AMD + Intel GPU info
config/ # Configuration file (~/.config/hw-monitor/)
total_usages/ # Dashboard CPU/memory/process summary
- All Tauri commands are in
src-tauri/src/<module>/commands.rs - Use
Option<T>for any value that may not be available on all systems - Prefer reading from
/procand/sysover external commands
- Match all Rust
Option<T>fields withT | nullin TypeScript interfaces - Use
?? 'N/A'for nullable display values in components - Add new i18n strings to all 8 locale files under
src/locales/
- Create a branch from
main:git checkout -b fix/your-fix-description
- Make your changes and commit with a clear message following Conventional Commits:
feat(sensors): add fan speed display fix(memory): correct swap cache parsing - Push and open a Pull Request against
main - Fill in the pull request template
- Copy
src/locales/en/translation.jsontosrc/locales/<lang>/translation.json - Translate all values (keep the keys identical)
- Register the language in
src/i18n/i18n.tsand add it to the selector insrc/components/Config/Config.tsx
Use the bug report template when opening an issue.