How mirbyte/daylane works
Daylane is a portable Windows activity tracker. Its main workflow captures keyboard/mouse counts and foreground/open-window activity, classifies away time, persists activity locally, then serves day and week/month summaries to the desktop UI. The app startup layer also manages the tray and optional Windows startup registration. The graph reflects the sampled source and README; unsampled UI and tracking details are represented only where the source index or README documents them, so some capability links are intentionally omitted.
Main entry points: TrackingService.cs Tracking coordinator · MainWindowViewModel.cs Screen state and insights · DailyStatsStore.cs History store · App.axaml.cs App startup
Components 22
App lifecycle
- App startup
App.axaml.cs - Startup registration
Services/StartupRegistration.cs
Activity capture
- Tracking coordinator
Services/TrackingService.cs - Input capture
Services/InputHook.cs - Away detection
Services/IdleMonitor.cs - Foreground tracking
Services/ForegroundTracker.cs - Open-app tracking
Services/OpenAppTracker.cs - Input event
Models/InputEvent.cs - App identity
Models/ForegroundApp.cs
Local history
- Activity segments
Models/ActivitySegment.cs - History store
Services/DailyStatsStore.cs - Local SQLite data
- Day summary
Models/DaySnapshot.cs - Range summary
Models/RangeSnapshot.cs - App usage summary
Models/AppUsageSummary.cs - Open-app summary
Models/OpenAppSummary.cs
Insights and UI
- Main window
MainWindow.axaml.cs - Screen state and insights
ViewModels/MainWindowViewModel.cs - Day timeline
Controls/TimelineBar.cs - App icons and colors
Services/AppIconLoader.cs
Other components
- User
- Windows input and app APIs
Connections 29
- User → Main window: uses
README.md - App startup → Tracking coordinator: starts
App.axaml.cs - App startup → Screen state and insights: creates
App.axaml.cs - App startup → Startup registration: refreshes
App.axaml.cs - Main window → Screen state and insights: binds
MainWindow.axaml.cs - Screen state and insights → Tracking coordinator: reads activity
ViewModels/MainWindowViewModel.cs - Screen state and insights → App icons and colors: loads icons
ViewModels/MainWindowViewModel.cs - Day timeline → Activity segments: renders
Controls/TimelineBar.cs - Day timeline → App icons and colors: loads icons
Controls/TimelineBar.cs - Tracking coordinator → Input capture: starts; receives events
Services/TrackingService.cs - Tracking coordinator → Foreground tracking: starts; handles changes
Services/TrackingService.cs - Tracking coordinator → Open-app tracking: starts; handles changes
Services/TrackingService.cs - Foreground tracking → Away detection: checks idleness
Services/ForegroundTracker.cs - Input capture → Input event: emits
Services/InputHook.cs - Tracking coordinator → Input event: counts
Services/TrackingService.cs - Foreground tracking → App identity: reports
Services/ForegroundTracker.cs - Open-app tracking → App identity: uses identity
Services/OpenAppTracker.cs - Tracking coordinator → History store: writes and queries
Services/TrackingService.cs - History store → Local SQLite data: reads and writes
Services/DailyStatsStore.cs - History store → Activity segments: stores and returns
Services/DailyStatsStore.cs - Tracking coordinator → Day summary: builds
Services/TrackingService.cs - Tracking coordinator → Range summary: builds
Services/TrackingService.cs - History store → App usage summary: aggregates
Services/DailyStatsStore.cs - History store → Open-app summary: aggregates
Services/DailyStatsStore.cs - Input capture → Windows input and app APIs: captures input
Services/InputHook.cs - Away detection → Windows input and app APIs: queries last input
Services/IdleMonitor.cs - Startup registration → Windows input and app APIs: registers startup
- Screen state and insights → Range summary: shows week/month insights
README.md - Screen state and insights → Open-app summary: shows open-app time
README.md