Domain Models

All model classes in domain/model/ (25 files).

Document and pages

ModelFilePurpose
ScanDocumentScanDocument.ktDocument metadata: id, title, pageCount, cover path, groupId, timestamps
ScanPageScanPage.ktPage: paths, crop quad, rotation, filter preset + adjustments, processing state, pageIndex
PageFilterAdjustmentsPageFilterAdjustments.ktBrightness/contrast/saturation/sharpness post-filter tweaks
DocumentGroupDocumentGroup.ktCollection: id, title, doc/page counts, cover path, timestamps
PageCaptureDraftPageCaptureDraft.ktTransient state during active capture session
PagePreviewPathsPagePreviewPaths.ktExtension resolving display paths for preview
PageProcessingStatePageProcessingState.ktCAPTURED, PROCESSED, or NEEDS_REVIEW
PageFilterPresetPageFilterPreset.ktTen filter presets with storageValue strings; legacy values map to replacements
DocumentTitleFormatDocumentTitleFormat.ktFour rotatable auto-title formats for new documents
GroupTitleFormatGroupTitleFormat.ktFour rotatable auto-title formats for new folders

PageFilterPreset values

ORIGINAL (original), AUTO (auto), MAGIC_COLOR (magic_color), NATURAL_COLOR (natural_color), VIVID_COLOR (vivid_color), SCREEN (screen), GRAYSCALE (grayscale), BLACK_AND_WHITE (black_and_white), WHITEBOARD (whiteboard), FADED (faded)

Legacy storage values are read through PageFilterPreset.fromStorage and remapped by the Room migration: enhanced_color → natural_color, shadow_reduction → magic_color, clean → grayscale, soft_black_and_white → faded, receipt → faded. Unknown values fall back to ORIGINAL.

DocumentTitleFormat values

ScanDateTime (default), DocumentDateTime, ScanDate, ScanIsoDate

GroupTitleFormat values

FolderDateTime (default), NewFolderDateTime, FolderDate, FolderIsoDate

Export

ModelFilePurpose
PdfExportOptionsPdfExportOptions.ktPassword, page numbers, page size, orientation, margins
ExportArtifactExportArtifact.ktExport result with file path and metadata
ShareArtifactShareArtifact.ktShare-ready artifact with URI info
SavedExportSavedExport.ktFinal shared-storage name, destination label, and URI
ExportDestinationExportDestination.ktDefaultDownloadsScanly or CustomTree(uri, displayName)

Library backup and restore

ModelFilePurpose
RestoreModeLibraryArchive.ktREPLACE or MERGE
BackupEstimateLibraryArchive.ktSource/required/available bytes and backup eligibility
ArchiveOperationLibraryArchive.ktBACKUP or RESTORE
ArchiveWorkPhaseLibraryArchive.ktWorkManager phase enum
ArchiveWorkStateLibraryArchive.ktProgress, message, cancel state

Settings and app data

ModelFilePurpose
ThemeModeThemeMode.ktSYSTEM, LIGHT, DARK
DocumentCornerModelDocumentCornerModel.ktLITE, STANDARD, HIGH, ACCURATE with storage values and display names
SettingsContentSettingsContent.ktAggregated FAQs and licenses for Settings
SettingsFaqSettingsFaq.ktSingle FAQ entry
LicenseInfoLicenseInfo.ktThird-party license entry
AppStorageUsageAppStorageUsage.ktByte counts: documents, export cache, database, archive workspace

Pure black (AMOLED) is a boolean DataStore preference (pure_black_enabled), not a ThemeMode value.

App updates

ModelFilePurpose
AppReleaseAppRelease.ktRemote release: tag, body, URL, optional APK asset
AppReleaseAssetAppRelease.ktGitHub release asset metadata
AppUpdateChannelAppRelease.ktGITHUB or PLAY_STORE (from BuildConfig.UPDATE_CHANNEL)
AppUpdateCheckResultAppRelease.ktResult of update comparison with channel and Play update type
PlayInAppUpdateTypePlayInAppUpdate.ktFLEXIBLE or IMMEDIATE
PlayInstallStatusPlayInAppUpdate.ktPlay download/install lifecycle status
PlayInAppUpdateInstallStatePlayInAppUpdate.ktDownload progress for flexible updates
PlayInAppUpdateAvailabilityPlayInAppUpdate.ktPlay Store update availability metadata

View source on GitHub · Markdown