The TimeTracker desktop app stores connection and preference settings via Electron's electron-store.
On first launch (or whenever credentials are missing), the app shows a two-step flow:
-
Step 1 — Server
Enter the base URL of your TimeTracker server (e.g.https://timetracker.example.comorhttp://192.168.1.50:5000). If you omit the scheme,https://is assumed when validating. Use Test server to confirm the host speaks the TimeTracker API (GET /api/v1/infomust return JSON withapi_version: "v1"). -
Step 2 — Sign in
Enter your TimeTracker username and password. The app callsPOST /api/v1/auth/login, stores the returnedtt_…API token, and verifies the session (GET /api/v1/users/meor timer status fallback).
Command-line --server-url / TIMETRACKER_SERVER_URL can pre-fill the stored server URL and skip typing it in step 1; you still complete username/password sign-in unless a valid token is already saved.
Settings are stored using Electron's secure storage (electron-store), which saves data in a JSON file in the user's application data directory:
- Windows:
%APPDATA%\timetracker-desktop\config.json - macOS:
~/Library/Application Support/timetracker-desktop/config.json - Linux:
~/.config/timetracker-desktop/config.json
Users can access settings in two ways:
- Open the TimeTracker desktop app
- Click on "Settings" in the navigation menu
- The settings screen will display:
- Server URL: Current server URL (editable)
- Username: Account used for desktop login
- Password: Optional; enter to re-authenticate and refresh the API token
- Theme and offline sync controls
- Save Settings button
The server URL can be set via command line when launching the app:
# Windows
TimeTracker.exe --server-url https://your-server.com
# Linux/macOS
./TimeTracker --server-url https://your-server.comThe server URL can also be set via environment variable:
# Windows
set TIMETRACKER_SERVER_URL=https://your-server.com
TimeTracker.exe
# Linux/macOS
export TIMETRACKER_SERVER_URL=https://your-server.com
./TimeTracker- Validation: URLs are normalized (trailing slashes removed). If you type a host without a scheme (e.g.
internal.company.com:8443),https://is prepended for validation. - Persistence: Server URL is saved to secure storage and persists across app restarts
- Change Detection: The app reinitializes the API client when you re-authenticate after changing the server URL
- Login uses username/password against
POST /api/v1/auth/login - The returned Bearer token (
tt_…) is stored securely and sent on/api/v1requests - Long-lived tokens created in Admin → Security & Access → API tokens remain valid for API use; the React desktop UI prefers password login
- Test server probes
GET /api/v1/infowithout auth - After sign-in, the app validates the session and polls periodically
- Diagnostics explain common failures (TLS, DNS, refused connection, unauthorized)
The primary UI is React + Vite under desktop/src/renderer-react/, built to desktop/dist-renderer/. The legacy vanilla renderer under desktop/src/renderer/ is retained only as a fallback.