- Add page dimension validation in PDF generators to prevent content from being drawn outside page boundaries - Fix page number positioning in fallback PDF generator to ensure they stay within page margins - Add boundary constraints for absolutely positioned elements in ReportLab template renderer - Prevent rendering errors when elements exceed page dimensions
TimeTracker Desktop App
Electron desktop application for Windows, Linux, and macOS that integrates with the TimeTracker REST API.
Features
- ⏱️ Time Tracking - Start, stop, and manage timers
- 📊 Projects & Tasks - View and select projects and tasks
- 📝 Time Entries - View and manage time entries
- 🔄 Offline Support - Work offline with automatic sync
- 🔐 Secure Authentication - Token-based authentication
- 🖥️ System Tray - Minimize to tray, quick timer controls
- ⌨️ Keyboard Shortcuts - Global shortcuts for quick access
Setup
Prerequisites
- Node.js 18+ and npm
- Electron development tools
Installation
- Install dependencies:
npm install
- Run in development mode:
npm run dev
- Run in production mode:
npm start
Building
Quick Start
For the simplest cross-platform build experience:
From the desktop directory:
npm run build:all
From the project root:
- Linux/macOS:
./scripts/build-desktop.sh all-platforms - Windows:
scripts\build-desktop.bat all
Platform-Specific Builds
Windows
npm run build:win
Creates NSIS installer in dist/ directory.
macOS
npm run build:mac
Creates DMG installer in dist/ directory.
Linux
npm run build:linux
Creates AppImage and .deb packages in dist/ directory.
All Platforms (Cross-Platform Build)
Build for all supported platforms with a single command (automatically detects your OS):
npm run build:all
Platform Support:
- Windows: Builds Windows only by default (Linux builds require administrator privileges for symlinks)
- macOS: Can build Windows, macOS, and Linux packages (all platforms!)
- Linux: Can build Windows and Linux packages
The command automatically detects your OS and only builds for platforms that can be built on your system. You won't see errors about unsupported platforms - they'll simply be skipped.
Building Linux on Windows (requires admin privileges):
# Run as administrator or set environment variable
$env:BUILD_LINUX_ON_WINDOWS="true"; npm run build:all
# Or build both platforms explicitly
npm run build:win+linux
Troubleshooting Windows Builds:
If you encounter permission errors (symlink issues):
- Clear electron-builder cache:
Or manually (Windows):
npm run clean:cachermdir /s /q "$env:LOCALAPPDATA\electron-builder\Cache" - Run as Administrator - Right-click terminal → "Run as Administrator"
- Disable OneDrive sync for the
desktopfolder (OneDrive can cause file lock issues) - Build Windows only:
npm run build:win(no symlinks needed)
Force build all (will fail on unsupported platforms):
npm run build:all-force
You can also use the build scripts from the project root:
Linux/macOS:
./scripts/build-desktop.sh all-platforms
# or from project root:
./scripts/build-all.sh --desktop-only all-platforms
Windows:
scripts\build-desktop.bat all
REM or from project root:
scripts\build-all.bat --desktop-only
Current Platform Only
npm run build
This builds only for your current platform.
Configuration
- Launch the app
- Enter your TimeTracker server URL (e.g.,
https://your-server.com) - Enter your API token (obtained from Admin > API Tokens in the web app)
- Start tracking time!
Architecture
- Main Process (
src/main/) - Window management, system tray, IPC - Renderer Process (
src/renderer/) - UI and frontend logic - Shared (
src/shared/) - Shared code between processes
API Integration
The app integrates with the TimeTracker REST API (/api/v1/):
- Timer endpoints:
/api/v1/timer/start,/api/v1/timer/stop,/api/v1/timer/status - Time entries:
/api/v1/time-entries - Projects:
/api/v1/projects - Tasks:
/api/v1/tasks
See the main project's API documentation for details.
Distribution
Built installers can be found in the dist/ directory after running build commands.
For code signing and notarization (required for macOS distribution), configure certificates in package.json build section.