How hafididrissi/time-tracker works
Local Time Tracker is a Windows desktop app that privately records foreground-window activity in SQLite, then presents summaries and offline reports. The main workflow samples Windows activity, turns changing application/window/idle states into continuous periods, stores them, and lets users inspect or export the results. The graph also includes the documented CLI, category configuration, backups, and reports/data views. Some desktop actions and analytics internals are unsampled; uncertain connections are omitted or marked dashed.
Main entry points: windows_app.py Desktop app · database.py Activity database · tracker.py Period tracker · reporting.py HTML reports
Components 15
Activity capture
- Tracker CLI
track.py - Window sampler
timetracker/windows.py - Period tracker
timetracker/tracker.py - Activity models
timetracker/models.py
Local data
- Activity database
timetracker/database.py - CSV and JSON export
timetracker/exporting.py - Database backup
timetracker/backup.py
Analysis and reports
- Usage analytics
timetracker/analytics.py - Category rules
timetracker/categories.py - HTML reports
timetracker/reporting.py - Report CLI
report.py - Category preview
preview_category.py
Desktop and controls
- Desktop app
windows_app.py - Tracking preferences
timetracker/preferences.py
Other components
- Windows user
Connections 24
- Windows user → Desktop app: uses
README.md - Desktop app → Window sampler: samples
windows_app.py - Desktop app → Period tracker: starts tracking
windows_app.py - Desktop app → Tracking preferences: loads and saves
windows_app.py - Period tracker → Window sampler: samples
timetracker/tracker.py - Period tracker → Activity database: writes periods
timetracker/tracker.py - Period tracker → Activity models: uses snapshots
timetracker/tracker.py - Window sampler → Activity models: returns snapshot
timetracker/windows.py - Activity database → Activity models: returns periods
timetracker/database.py - Tracker CLI → Window sampler: creates provider
track.py - Tracker CLI → Period tracker: runs tracker
track.py - Tracker CLI → Activity database: opens database
track.py - Desktop app → Activity database: reads activity
windows_app.py - Desktop app → Usage analytics: builds analysis
windows_app.py - Desktop app → Category rules: loads categorizer
windows_app.py - Desktop app → HTML reports: generates reports
windows_app.py - Desktop app → CSV and JSON export: offers export
windows_app.py - Desktop app → Database backup: offers backup
windows_app.py - Report CLI → Category rules: loads categorizer
report.py - Report CLI → HTML reports: generates report
report.py - Category preview → Category rules: previews category
preview_category.py - HTML reports → Category rules: categorizes periods
timetracker/reporting.py - HTML reports → Activity database: reads periods
timetracker/reporting.py - CSV and JSON export → Activity database: reads periods
timetracker/exporting.py