Skip to main content

Service Layer Overview

FolderRewind organizes its business logic through static service classes. The following groups them by functional domain.

Core Backup

ServiceFileResponsibility
BackupServiceServices/BackupService.cs + 6 partial filesBackup/restore orchestration, 7-Zip archiving, file filtering, metadata management, old archive cleanup
HistoryServiceServices/HistoryService.csManages backup history records in history.json, provides data for the timeline view
ConfigServiceServices/ConfigService.csConfiguration load / save / migration / import / export; single source of truth for application state

Automation & Scheduling

ServiceFileResponsibility
AutomationServiceServices/AutomationService.csScheduled backup engine: interval backups, scheduled tasks, conditional triggers (file lock detection)
FolderWatcherServiceServices/FolderWatcherService.csFile system monitoring, supports event-triggered backups
FileLockServiceServices/FileLockService.csDetects whether a file is in use, used for conditional automation decisions

Plugin & Extension

ServiceFileResponsibility
PluginServiceServices/Plugins/PluginService.csPlugin lifecycle: scanning, installation (zip), uninstallation, loading (AssemblyLoadContext), enable/disable, version checking, settings persistence
KnotLinkServiceServices/KnotLinkService.csKnotLink remote command/event protocol, allows external tools to trigger backup/restore via TCP

UI Helpers

ServiceFileResponsibility
NavigationServiceServices/NavigationService.csStatic navigation service, holds an INavigationHost reference, dispatches page navigation requests
NotificationServiceServices/NotificationService.csIn-app InfoBar notifications and Windows Toast notifications
ThemeServiceServices/ThemeService.csTheme management (dark/light/follow system), accent color presets, background material (Mica/Acrylic)
MiniWindowServiceServices/MiniWindowService.csManages a compact mini window for quickly triggering a single folder backup
UiDispatcherServiceServices/UiDispatcherService.csCentralized UI thread dispatcher for non-UI services/ViewModels to post operations

System Integration

ServiceFileResponsibility
StartupServiceServices/StartupService.csWindows startup task registration
AppUpdateServiceServices/AppUpdateService.csGitHub Release update checking with multiple download sources (official/mirror/custom)
SponsorServiceServices/SponsorService.csSponsor edition license verification (Microsoft Store entitlement)
CloudSyncServiceServices/CloudSyncService.csCloud upload/download via rclone, queues upload after backup, downloads missing archives before restore

Security

ServiceFileResponsibility
EncryptionServiceServices/EncryptionService.csPassword management for encrypted backups (DPAPI-protected storage)

Other

ServiceFileResponsibility
I18nServices/I18n.csInternationalization helper, wraps ResourceLoader string lookup and formatting, supports PickBest() multilingual dictionary
TemplateServiceServices/TemplateService.csConfiguration template creation, export, import, and community sharing
MainWindowServiceServices/MainWindowService.csMain window reference management and sponsor edition window lifecycle
MemoryTelemetryServiceServices/Diagnostics/MemoryTelemetryService.csPerformance monitoring and memory diagnostics