stores/scansStore
@arolariu/website / stores/scansStore
stores/scansStore
Fileoverview
Zustand store for managing standalone scans state with IndexedDB persistence. Each scan is stored as an individual row in the IndexedDB scans table.
Remarks
Not migrated to createEntityStore<CachedScan>() (deliberate — the store
operates on cached scan records, not the Scan domain entity).
This store carries domain state (isSyncing, lastSyncTimestamp) and actions
(addScan, removeScans, updateScanStatus, updateScanBlobUrl, archiveScans,
markScansAsUsedByInvoice, etc.) that exceed the generic factory's scope. A future
migration would require extending createEntityStore to support per-store domain
slices, or composing factory CRUD inside a hand-rolled shell.
Tracked as a follow-up to the data-layer consolidation plan.