Skip to content

Split VaultService into facade over domain services with centralized VaultStore - #61

Merged
ultraelectronica merged 26 commits into
mainfrom
versionF
Jul 22, 2026
Merged

Split VaultService into facade over domain services with centralized VaultStore#61
ultraelectronica merged 26 commits into
mainfrom
versionF

Conversation

@ultraelectronica

Copy link
Copy Markdown
Member

Summary

Refactors VaultService into a facade over multiple domain-specific services (Album, File, Folder, Search, Settings, Stats, Tag, VaultStore) for improved modularity. Adds encrypted thumbnail service with caching, migrate office document conversion to isolate, and adds comprehensive tests.

Changes

Architecture

  • Refactor VaultService into a facade over split domain services
  • Add VaultStore as centralized state and persistence layer
  • Add VaultSettings model for configuring vault behavior
  • Add refactoring roadmap document

Domain Services

  • Add AlbumService for CRUD and file-album management
  • Add file service with full vault operations
  • Add folder service with CRUD and device import operations
  • Add search service with basic and advanced file querying
  • Add SettingsService with get/update methods
  • Add StatsService for read-only file analytics
  • Add TagService for tag CRUD and favorite toggling

Encrypted Thumbnails

  • Add encrypted thumbnail service with caching and lazy regeneration

Import Flow

  • Add per-file progress callback to import service
  • Replace setState with progress sheet bottom modal for import flow
  • Add helper classes for batch file import

Document Conversion

  • Move office document conversion to isolate
  • Add font caching

PDF Viewer

  • Add clamping scroll physics to PDF viewer widgets
  • Add scroll thumb overlay to PDF document viewer

Testing

  • Add comprehensive unit tests for VaultService

Other

  • Replace vaultServiceProvider usage with VaultService.instance
  • Refactor cleanupTemp to use VaultService singleton
  • Refactor encryption settings to use vault settings provider
  • Add missing imports and improve async image compression

Use `BicubicResizer.resizeJpegAsync` to keep JPEG resizing off the UI
thread

Update `EncryptionService` doc to reflect GCM/CTR support and legacy CBC
mode
@ultraelectronica ultraelectronica self-assigned this Jul 22, 2026
@ultraelectronica
ultraelectronica merged commit 522d352 into main Jul 22, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant