RingoTrack is a cross-platform desktop application (Windows + macOS) for tracking drawing software usage time. It uses a GitHub-style calendar heatmap to visualize users' creative habits and dedication to various drawing applications. The app is built with Flutter and targets digital artists, illustrators, and manga creators.
- Frontend: Flutter (Dart) - Cross-platform desktop UI
- Platform Integration:
- Windows: win32 API via Dart FFI for foreground window tracking
- macOS: Swift + AppKit for NSWorkspace notifications
- Language: Dart 3.10.1 with Flutter 3.38.3
- Architecture: Feature-based architecture with clear separation of concerns
lib/
├── main.dart # Application entry point
├── app.dart # Application setup and configuration
├── providers.dart # Centralized Riverpod providers
├── pages/
│ ├── clock_page.dart # Clock display page
│ ├── dashboard_page.dart # Main dashboard UI
│ └── settings_page.dart # Settings configuration page
├── widgets/
│ ├── heatmap_color_scale.dart # Color scale for heatmaps
│ ├── logs_view_sheet.dart # Logs display sheet
│ ├── ringo_heatmap.dart # Calendar heatmap component
│ ├── ringo_hourly_line_heatmap.dart # Hourly line heatmap
│ └── year_selector.dart # Year selection widget
├── theme/
│ └── app_theme.dart # Application theming
├── platform/
│ ├── foreground_app_tracker.dart # Platform-specific app tracking
│ ├── glass_tint_controller.dart # Glass tint effects
│ ├── stroke_activity_tracker.dart # Stroke activity monitoring
│ └── window_pin_controller.dart # Window pinning controls
└── feature/
├── dashboard/
│ ├── controllers/
│ │ └── dashboard_preferences_controller.dart
│ ├── models/
│ │ └── dashboard_preferences.dart
│ └── providers/
│ └── dashboard_providers.dart
├── database/
│ └── services/
│ ├── app_database.dart # Drift database definition
│ └── app_database.g.dart # Auto-generated database code
├── logging/
│ ├── models/
│ │ └── app_log_entry.dart
│ └── services/
│ └── app_log_service.dart
├── settings/
│ ├── demo/
│ │ └── controllers/ # Demo settings controllers
│ ├── drawing_app/
│ │ ├── controllers/ # Drawing app settings
│ │ └── models/ # Drawing app models
│ └── theme/
│ ├── controllers/ # Theme settings controllers
│ └── models/ # Theme models
├── update/
│ └── github_release_service.dart # GitHub release checking
└── usage/
├── models/
│ ├── usage_hourly_backfill.dart
│ └── usage_models.dart # Core usage data models
├── providers/
│ └── usage_providers.dart # Usage-related providers
├── repositories/
│ ├── demo_usage_repository.dart
│ └── usage_repository.dart # Usage data persistence
└── services/
├── usage_analysis.dart # Usage analytics
└── usage_service.dart # Usage tracking service
- AppUsageEntry: Individual app usage record
- DailyUsage: Per-date usage aggregation with app breakdown
- ForegroundAppEvent: System event for app switching
- UsageAggregator: Core business logic for time tracking and aggregation
- Time Tracking: Monitors foreground application usage
- Cross-day Handling: Automatically splits usage across midnight boundaries
- Filtering: Only tracks configured drawing applications
- Visualization: GitHub-style heatmap with color-coded intensity
- Multi-view Support: Merge view, per-app view, and grouping capabilities
# Install dependencies
flutter pub get
# Run tests
flutter test
# Analyze code
flutter analyzeThe project follows Test-Driven Development (TDD) with comprehensive unit tests:
- UsageAggregator Tests (
test/usage_aggregator_test.dart): Core business logic validation - Widget Tests (
test/widget_test.dart): UI component testing - Repository Tests (
test/usage_repository_test.dart): Data persistence testing
- TC-F-01: Single drawing app session tracking
- TC-F-02: Multiple sessions of same app
- TC-F-03: Cross-day usage splitting
- TC-F-04: Non-drawing app filtering
- TC-F-05: Dynamic app configuration
- Dart Style: Follows official Dart style guide with
flutter_lints - Naming: Use descriptive names, prefer full words over abbreviations
- Structure: Keep widgets small and focused, separate business logic from UI
- Comments: Document complex algorithms and business rules
- Uses
package:flutter_lints/flutter.yamlas base - Custom rules can be added in
analysis_options.yaml
- Material Design 3 theming with green color scheme
- Responsive layout with proper padding and spacing
- Clear visual hierarchy with card-based design
- Hover interactions for detailed information
- All time tracking uses
Durationobjects for precision - Date handling respects local timezone boundaries
- Cross-day events are automatically split at midnight
- Data persistence uses in-memory storage (extensible to SQLite)
- Graceful handling of missing data (empty states)
- Null safety throughout the codebase
- Defensive programming for edge cases
- Use
GetForegroundWindow()and process enumeration - App identification via executable names (e.g.,
Photoshop.exe) - Requires win32 API integration via Dart FFI
- Use
NSWorkspacenotifications for app switching - App identification via bundle identifiers (e.g.,
com.adobe.photoshop) - Requires Flutter plugin with Swift implementation
- Development: Local testing with
flutter run - Testing: Run full test suite with
flutter test - Analysis: Code quality check with
flutter analyze - Building: Platform-specific builds with
flutter build - Distribution: Package for respective app stores or direct distribution
- Application requires system-level permissions for foreground window monitoring
- User data is stored locally without external transmission
- No personal information is collected beyond app usage patterns
- Drawing software list is user-configurable for privacy
- SQLite persistence for long-term data storage
- Advanced filtering and grouping options
- Export functionality for usage reports
- Plugin system for additional drawing software support
- Real-time sync across multiple devices