Domain Models

Model classes and enums under domain/model/.

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
DocumentKindDocumentKind.ktOn-device document-type classification used in search filters and results
PageText / PageTextBlock / PageTextLinePageText.ktRecognized/corrected page text and normalized layout for reading and overlays
TextIndexProgressPageText.ktTotal and pending pages for background index progress
LibrarySearch modelsLibrarySearch.ktSearch query, result filters, and ranked name/page-text hits
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 signing

ModelFilePurpose
SignatureKind / SignatureSourceSignModels.ktSignature vs initials, and drawn vs imported source
SavedSignatureSignModels.ktReusable local ink image and dimensions
SignInkSignModels.ktNavy, black, blue, or red mark colour
NormRectSignModels.ktPage-relative mark placement
SignMarkSignModels.ktImage signature, text, date, or checkbox mark
PageMarkupSignModels.ktEditable marks and clean base image for a Scanly page
PdfSignSession / SignPageSizeSignModels.ktLocal PDF session and visual page dimensions

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 for library files, temporary export cache, and the database/search index

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