Electron-based desktop application for TimeTracker.
- Node.js 18+
- npm
npm installnpm run build# Windows
npm run build:win
# macOS
npm run build:mac
# Linux
npm run build:linuxnpm run build:allTo avoid the "Unknown Publisher" warning, you need to sign the Windows executable with a code signing certificate.
-
Obtain a Code Signing Certificate:
- Purchase from a CA (Sectigo, DigiCert, etc.) - $150-600/year
- Or create a self-signed certificate for testing
-
Local Build:
# Windows PowerShell $env:CSC_LINK_FILE = "path/to/certificate.pfx" $env:CSC_KEY_PASSWORD = "YourCertificatePassword" npm run build:win
-
CI/CD (GitHub Actions):
- Store certificate as Base64 in GitHub Secret:
WINDOWS_CODE_SIGN_CERT - Store password in GitHub Secret:
WINDOWS_CODE_SIGN_PASSWORD - The workflow will automatically sign the executable
- Store certificate as Base64 in GitHub Secret:
For detailed instructions, see Windows Code Signing Guide.
The primary UI lives in src/renderer-react/ and builds to dist-renderer/ via Vite (npm run build:renderer). Electron loads dist-renderer/index.html only (run build:renderer before start). Legacy src/renderer/js/ modules remain for unit tests; see src/renderer/README.md. Splash screen: src/main/splash/.
npm start(npm start and every packaging script run build:renderer first so installers do not ship a stale Vite build.)
npm run devSign in with your TimeTracker username and password. The app calls POST /api/v1/auth/login and stores the returned API token (tt_…) securely. You can still create long-lived tokens under Admin → Security & Access → API tokens if you prefer to manage tokens in the web UI.
- Launch the desktop app
- Step 1 — Server: Enter your TimeTracker base URL (e.g.
https://your-server.com). Trailing slashes are normalized. Omitting the scheme assumeshttps://. - Click Test server (
GET /api/v1/info). - Step 2 — Sign in: Enter username and password, then Sign in.
- On success the main window opens. If the server still requires initial setup, that is surfaced from the info response.
TimeTracker.exe --server-url https://your-server.comThen complete username/password sign-in in the app.
# Windows
set TIMETRACKER_SERVER_URL=https://your-server.com
TimeTracker.exe
# Linux/macOS
export TIMETRACKER_SERVER_URL=https://your-server.com
./TimeTracker- Launch the app and sign in
- Open Settings
- Update Server URL / username; enter password to re-authenticate
- Save settings
The app shows a connection status indicator in the header:
- Green dot (●): Connected and authenticated
- Red dot (●): Connection error or authentication failed
- Gray circle (○): Not connected
The connection is automatically checked every 30 seconds.
From the desktop/ directory:
npm testRuns Node’s test runner on test/api-client.test.js (URL normalization, TimeTracker JSON shape checks, and error classification).
Login or “Test server” shows a TLS or certificate message:
- Use a certificate trusted by the OS, or for lab use only, try
http://on a trusted network if your server supports it.
Token rejected after “server OK”:
- Verify the token starts with
tt_, is not expired, and includes at leastread:time_entries(and ideallyread:users).
"Connection failed" error:
- Verify the server URL is correct and accessible
- Check your internet connection
- Ensure the server is running and the API is accessible
- For local development, use
http://localhost:5000or your local IP address - Check the connection status indicator in the header
Settings not saving:
- Ensure you have write permissions in the app's data directory
- Check that electron-store is working properly
- Try clearing settings and re-entering them
Window stuck on loading, blank content, or unstable navigation (especially Windows):
- Use the latest release or rebuild from source; older builds could mis-handle
file:navigation in the main process or ship a renderer bundle without helpers loaded. - From source, run
npm installandnpm run build:renderer, thennpm startor rebuild the installer. - See Desktop build Windows troubleshooting for environment-specific build issues.
For more details, see Desktop Settings Guide.
desktop/
├── src/
│ ├── main/ # Main process (Electron)
│ ├── renderer/ # Renderer process (UI)
│ └── shared/ # Shared code
├── assets/ # Icons and assets
├── scripts/ # Build scripts
└── dist/ # Build output
The version is automatically synced from setup.py before building. The build scripts handle this automatically.
MIT