Commit Graph

2 Commits

Author SHA1 Message Date
3388f24eb4 Add real-time inventory syncing across devices v1.1.0
🔄 Inventory Sync Features:
- Automatic sync to Firebase when adding/updating/deleting items
- Real-time listener pulls changes from other devices
- Bi-directional sync keeps all household devices in sync
- Conflict resolution based on lastModified timestamp
- Firebase version always wins on conflicts

📱 How It Works:
Device A adds item → syncs to Firebase → Device B receives update
Device B updates item → syncs to Firebase → Device A receives update
Device A deletes item → syncs to Firebase → Device B removes item

🔧 Technical Implementation:
- InventorySyncService: Real-time Firestore listener
- Repository hooks: add/update/delete sync to Firebase
- HomeScreen lifecycle: starts/stops sync automatically
- Conflict resolution: newer timestamp wins
- Local Hive + Cloud Firestore hybrid architecture

📁 New Files:
- lib/features/household/services/inventory_sync_service.dart

 Updated Files:
- lib/features/inventory/repositories/inventory_repository_impl.dart
  - Added Firebase sync on add/update/delete operations
  - Maintains local Hive for offline access
- lib/features/home/screens/home_screen.dart
  - Starts sync service on init if in household
  - Stops sync service on dispose

⚠️ Requirements:
- Firebase must be configured (see FIREBASE_SETUP.md)
- Internet connection required for cross-device sync
- Local Hive works offline, syncs when online

 Build Status:
- APK: 63.4MB
- Package: com.github.mystiatech.sage
- Version: 1.1.0+2

🎯 Next Steps for User:
1. Set up Firebase (FIREBASE_SETUP.md)
2. Replace google-services.json with real file
3. Rebuild APK
4. Install on both devices
5. Create/join household
6. Add items → they sync! 🎉

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 15:47:53 -04:00
7be7b270e6 Initial commit: Sage Kitchen Management App v1.0.0
 Features implemented:
- Smart inventory tracking with Hive database
- Barcode scanning with auto-populated product info
- Multiple API fallbacks (Open Food Facts, UPCItemDB)
- Smart expiration date predictions by category
- Discord webhook notifications (persisted)
- Custom sage leaf vector icon
- Material Design 3 UI with sage green theme
- Privacy Policy & Terms of Service
- Local-first, privacy-focused architecture

🎨 UI/UX:
- Home dashboard with inventory stats
- Add Item screen with barcode integration
- Inventory list with expiration indicators
- Settings with persistent preferences
- About section with legal docs

🔧 Technical:
- Flutter 3.35.5 with Riverpod state management
- Hive 2.2.3 for local database
- Mobile scanner for barcode detection
- Feature-first architecture

🤖 Generated with Claude Code (https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 13:54:21 -04:00