WorkLog Pro is a desktop-first work logging app designed to keep operating even when the network is unreliable or unavailable.
The core principle is simple: always save locally first, sync later.
It started as a monolithic prototype and was refactored into layered modules so the app is easier to reason about, debug, and maintain.
- Local authentication (bcrypt password hashing)
- Check-in / check-out and break tracking
- Hourly task logging with status tracking
- Screenshot capture and preview
- Background sync queue with retries and exponential backoff
- Offline-first persistence using SQLite
- Admin member management
- Desktop tray support (open, logout, exit)
- Debug and health-check scripts for fast diagnostics
- Create virtual environment:
python -m venv .venv
- Activate:
.\.venv\Scripts\activate
- Install dependencies:
python -m pip install --upgrade pippip install -r requirements.txt
- Copy env template:
copy .env.example .env
- Edit
.envand set credentials (and Supabase values if cloud sync is used). - Update
settings.jsonfor non-secret app behavior (intervals, popup tuning, break window, etc.). - Run app:
python -m worklog_pro.main
- Create virtual environment:
python3 -m venv .venv
- Activate:
source .venv/bin/activate
- Install dependencies:
python -m pip install --upgrade pippip install -r requirements.txt
- Copy
.env.exampleto.envand update credential values. - Update
settings.jsonfor non-secret app settings. - Run app:
python -m worklog_pro.main
If you distribute the app as an executable:
- Place
.envin the same folder as the executable. - Run
WorkLogPro.exe. - Verify
worklog_pro.logis being created for diagnostics.
Set only secrets/identity in .env:
SUPABASE_URLSUPABASE_KEYINITIAL_ADMIN_USERNAMEINITIAL_ADMIN_PASSWORDINITIAL_USER_USERNAMEINITIAL_USER_PASSWORD
All non-secret runtime settings are in settings.json (committed defaults).
Timezone is controlled there via "timezone" (default is now Asia/Kolkata).
- Start app.
- Login with seeded credentials from
.env. - Check in.
- Add hourly logs.
- Capture screenshots.
- Trigger sync manually or let scheduler run it.
- Use tray menu for minimize/logout/exit.
When internet is down:
- App remains usable.
- Records stay local with
synced=False. - Sync queue retries later using exponential backoff.
- UI remains responsive because sync work runs in background thread.
This avoids the common failure mode where desktop apps become unusable during network issues.
Layer flow is enforced:
ui -> services -> repositories -> database -> models
core stays independent and reusable.
See ARCHITECTURE.md for details.
worklog_pro/
config/
core/
models/
database/
repositories/
services/
ui/
utils/
main.py
scripts/
app_check.py
debug_cli.py
build.py
-
python scripts/app_check.py- Runs a health check (db, offline insert, sync callable, config, services)
-
python scripts/debug_cli.py show-users -
python scripts/debug_cli.py show-sessions -
python scripts/debug_cli.py show-unsynced -
python scripts/debug_cli.py trigger-sync -
python scripts/debug_cli.py db-health -
python scripts/debug_cli.py check-config
- If the app logs but window does not reopen after close, check whether your OS tray area is hidden; the app stays in system tray by design.
- If sync is not working, run
python scripts/debug_cli.py check-configfirst and verifySUPABASE_URLandSUPABASE_KEY. - If something fails unexpectedly, inspect
worklog_pro.log. Terminal output is intentionally short and human-readable.
Use:
python scripts/build.py
Output will be in dist/WorkLogPro.
SQLite is a practical fit for offline-first desktop software: no server process, fast local writes, and easy packaging.
Most importantly, it guarantees local persistence first.
Supabase gives a straightforward REST surface without requiring a custom backend service for this stage.
That keeps deployment simpler while still supporting cloud sync.
This app is desktop-first. PySide6 provides richer native desktop capabilities (timers, tray integration, thread signaling, screen capture integration points) than the original prototype stack.
- Designing sync behavior that is resilient without blocking UI
- Avoiding duplicate or out-of-order updates under retry conditions
- Preserving old feature parity while refactoring into clean layers
- Balancing local reliability with cloud eventual consistency
- Write local first, always
- Never crash due to network dependency
- Retry sync with backoff
- Mark records synced only after confirmed success
- Keep failures observable in logs
- Architecture quality directly affects debug speed.
- Offline-first design must be intentional from schema to service layer.
- Threading boundaries and signal wiring matter as much as business logic in desktop apps.
- “Production-ready” is mostly about failure handling, not just feature count.
- Screenshot remote fallback preview is still basic.
- Full conflict resolution is currently last-write-wins and should evolve for richer collaborative scenarios.
- Packaging and runtime signing/notarization are environment-specific and not included yet.
- Add full conflict audit tooling and reconciliation reports
- Add migration framework for schema evolution
- Add richer diagnostics dashboard for sync queue state
- Add automated test suite for services and repositories