Add local data store adapter layer and Hive scaffold

This commit is contained in:
Rijad Zuzo
2026-02-15 19:05:20 +01:00
parent 2a7d039475
commit 21c911ad4c
13 changed files with 328 additions and 19 deletions
+23
View File
@@ -2,6 +2,29 @@
Updated: 2026-02-15
## Latest Milestone (2026-02-15): Local Store Adapter Layer (DB Migration Scaffold)
Implemented a persistence boundary so local app state is no longer tightly coupled to `shared_preferences` internals:
- Added local persistence abstraction:
- `lib/features/local/storage/local_data_store.dart`
- `LocalDataStore` + `LocalDataRecord`
- Added concrete store implementations:
- `lib/features/local/storage/local_data_store_shared_prefs.dart`
- `lib/features/local/storage/local_data_store_hive.dart`
- `lib/features/local/storage/local_data_store_in_memory.dart`
- provider wiring: `lib/features/local/storage/local_data_store_provider.dart`
- Refactored local repository to use store adapter:
- `lib/features/local/local_repository.dart`
- build/read/write/migration paths now go through `LocalDataStore`
- schema migration hook retained and now store-agnostic
- Added config flag for local backend selection:
- `lib/core/config/app_config.dart` -> `USE_HIVE_LOCAL_DB`
- Added setup docs for switching local persistence backend:
- `docs/SETUP.md`
This prepares the app for a true DB migration path while keeping existing UX and tests stable.
## Latest Milestone (2026-02-15): Cross-View Responsive Pass
Audited and adjusted the main product views for mobile-first behavior while preserving desktop/web UX: