11 Commits

Author SHA1 Message Date
7ab641a3c8 v1.3.0+4: FOSS Compliance + Dark Mode + Enhanced Settings
 Major Features:
- Dark mode toggle with app-wide theme switching
- Sort inventory by Expiration Date, Name, or Location
- Toggle between Grid and List view for inventory
- Export inventory data to CSV with share functionality
- Custom sage leaf app icon with adaptive icon support

🔄 FOSS Compliance (F-Droid Ready):
- Replaced Firebase with Supabase (open-source backend)
- Anonymous authentication (no user accounts required)
- Cloud-first with hosted Supabase as default
- Optional self-hosting support
- 100% FOSS-compliant dependencies

🎨 UI/UX Improvements:
- Dynamic version display from package.json (was hardcoded)
- Added edit buttons for household and user names
- Removed non-functional search button
- Replaced Recipes placeholder with Settings button
- Improved settings organization with clear sections

📦 Dependencies:
Added:
- supabase_flutter: ^2.8.4 (FOSS backend sync)
- package_info_plus: ^8.1.0 (dynamic version)
- csv: ^6.0.0 (data export)
- share_plus: ^10.1.2 (file sharing)
- image: ^4.5.4 (dev, icon generation)

Removed:
- firebase_core (replaced with Supabase)
- cloud_firestore (replaced with Supabase)

🗑️ Cleanup:
- Removed Firebase setup files and google-services.json
- Removed unimplemented features (Recipes, Search)
- Removed firebase_household_service.dart
- Removed inventory_sync_service.dart (replaced with Supabase)

📄 New Files:
- lib/features/household/services/supabase_household_service.dart
- web/privacy-policy.html (Play Store requirement)
- web/terms-of-service.html (Play Store requirement)
- PLAY_STORE_LISTING.md (marketing copy)
- tool/generate_icons.dart (icon generation script)
- assets/icon/sage_leaf.png (1024x1024)
- assets/icon/sage_leaf_foreground.png (adaptive icon)

🐛 Bug Fixes:
- Fixed version display showing hardcoded "1.0.0"
- Fixed Sort By and Default View showing static text
- Fixed ConsumerWidget build signatures
- Fixed Location.displayName import issues
- Added clearAllData method to Hive database

📊 Stats: +1,728 additions, -756 deletions across 42 files

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 22:27:42 -04:00
af63e11abd Prepare for Google Play Store and F-Droid release
📦 Release Preparation:
- Created comprehensive RELEASE_GUIDE.md
- Added signing key instructions
- Store listing content ready
- Screenshots checklist
- F-Droid preparation guide

🔐 Security:
- Updated .gitignore to exclude signing keys
- Protected key.properties from git
- Added *.jks and *.keystore exclusions

📝 Documentation Includes:
- Step-by-step signing key generation
- Google Play Store submission checklist
- F-Droid requirements and options
- Store assets specifications
- Privacy policy hosting options
- Version management guide

🏪 Store Listing Content:
- App title: "Sage - Kitchen Inventory Manager"
- Full description with features
- Category: Food & Drink
- Screenshots requirements (2-8 images)
- Feature graphic specs (1024x500)

⚠️ F-Droid Considerations:
- Firebase is proprietary (not FOSS)
- Options: Remove Firebase for F-Droid build
- Or: Provide APK downloads from GitHub
- Or: Self-host F-Droid repo

📱 Next Steps for Developer:
1. Generate signing key with keytool
2. Create key.properties file
3. Take screenshots (6 recommended)
4. Create feature graphic
5. Host privacy policy
6. Create Google Play Developer account ($25)
7. Build signed AAB: flutter build appbundle --release
8. Upload to Play Store

Version: 1.1.0+2
Package: com.github.mystiatech.sage

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 16:46:23 -04:00
31c4ba4cba Add detailed logging for Firebase upload debugging
🔍 Upload Debugging:
- Added logs to show when items are added to Hive
- Shows item key and householdId after Hive save
- Logs upload attempts to Firebase
- Shows success/failure for each upload
- Logs reason for skipping Firebase sync

📝 Log Messages:
- 📝 Added item to Hive: {name}, key={key}, householdId={id}
- 🚀 Uploading item to Firebase: {name} (key: {key})
-  Successfully uploaded to Firebase
-  Failed to sync item to Firebase: {error}
- ⚠️ Skipping Firebase sync: householdId={id}, key={key}

🎯 Next Steps for User:
1. Install new APK
2. Add an item while in household
3. Check logcat for upload messages
4. If seeing "⚠️ Skipping" → item.householdId is null
5. If seeing " Failed" → Firebase error details shown
6. If seeing " Successfully" → check Firebase Console

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 16:07:42 -04:00
2cf51b6841 Add detailed logging and UI refresh for inventory sync
🔍 Debug Improvements:
- Added detailed logging to track sync events
- Print statements show: items received, added, updated, deleted
- Logs Firebase connection status and errors
- Easier to diagnose sync issues

🔄 UI Refresh Fix:
- Added callback system to notify UI when sync occurs
- HomeScreen invalidates providers after Firebase sync
- UI now automatically refreshes when items sync
- No manual refresh needed!

📝 Logging Output:
- 📡 Starting Firebase sync for household: {id}
- 🔄 Received {count} items from Firebase
-  Added new item from Firebase: {name}
- 🔄 Updated item from Firebase: {name}
- 🗑️ Deleting {count} items no longer in Firebase
-  UI refreshed after Firebase sync

 Build Status:
- APK: 63.4MB
- All tests passing
- Ready for testing

🎯 How to Test:
1. Install on both phones
2. Check console logs (adb logcat)
3. Add item on Phone A
4. Watch logs on Phone B - should see sync messages
5. If no sync messages → Firebase not configured correctly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 15:58:14 -04:00
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
6c29751e49 Change package name to GitHub-based format
📦 Package Rename: com.sage.sage → com.github.mystiatech.sage

 Changes:
- Updated applicationId in build.gradle.kts
- Updated namespace in build.gradle.kts
- Moved MainActivity.kt to new package structure
- Updated google-services.json placeholder
- Updated FIREBASE_SETUP.md with correct package name
- Updated README_FIREBASE.md with correct package name

🎯 Reason:
- GitHub-based package names don't require domain ownership
- Standard convention: com.github.username.appname
- Ready for Firebase setup without needing website registration

📋 Firebase Setup:
When setting up Firebase, use package name:
com.github.mystiatech.sage

 Build Status:
- APK builds successfully (63.3MB)
- All tests passing
- Ready for Firebase configuration

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 15:34:37 -04:00
61ab8ddc9f Add graceful Firebase error handling
🐛 Fix: Handle Firebase initialization failures gracefully
- Wrapped Firebase.initializeApp() in try-catch
- App now works even if Firebase isn't configured
- Added helpful error messages pointing to FIREBASE_SETUP.md
- Household creation shows clear error if Firebase fails

⚠️ User Experience:
- If Firebase not configured: Shows error message
- Error message guides user to setup instructions
- App doesn't crash, continues with local-only mode

 Testing:
- APK builds successfully (63.3MB)
- App runs without Firebase configuration
- Error messages are user-friendly

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 15:06:22 -04:00
f5ab5f0449 Add Firebase cloud sync for household sharing v1.1.0
 New Features:
- Firebase Firestore integration for real-time household sharing
- Create household → generates code stored in cloud
- Join household → looks up code from Firebase across devices
- Leave household → updates member list in cloud
- Cloud-first with local Hive fallback for offline

🔧 Technical Implementation:
- Added firebase_core and cloud_firestore dependencies
- Created FirebaseHouseholdService for all cloud operations
- Updated HouseholdScreen to use Firebase for create/join/leave
- Modified gradle files to support Google Services plugin
- Increased minSdk to 21 for Firebase compatibility
- Version bumped to 1.1.0+2 (MAJOR.MINOR.BUGFIX)

📁 New Files:
- lib/features/household/services/firebase_household_service.dart
- FIREBASE_SETUP.md - Complete setup instructions
- android/app/google-services.json - Placeholder (needs replacement)
- android/app/README_FIREBASE.md - Firebase config reminder

⚙️ Setup Required:
1. Create Firebase project at console.firebase.google.com
2. Add Android app with package name: com.sage.sage
3. Download real google-services.json
4. Enable Firestore Database in test mode
5. See FIREBASE_SETUP.md for complete instructions

🎯 How it works:
- Device A creates household → stored in Firestore
- Device B joins with code → reads from Firestore
- Both devices now share same household ID
- Inventory items sync via shared household ID

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 14:59:34 -04:00
a360fadc17 Add household sharing feature
 Features:
- Create household with 6-character shareable code
- Join existing household with code
- View household members and owner
- Leave household functionality
- Automatic inventory filtering by household
- Persistent household settings across app updates

🔧 Technical changes:
- Added Household model with Hive adapter (typeId: 4)
- Updated AppSettings with userName and currentHouseholdId fields
- Modified InventoryRepository to filter items by household
- Updated Add Item screen to set householdId on new items
- Added HouseholdScreen with full CRUD operations
- Integrated household sharing into Settings navigation

🎯 Behavior:
- Users not in a household see only their personal items
- Users in a household see shared household items
- New items automatically tagged with current household

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 14:46:10 -04:00
f4be460c3e Update developer info to Danielle Sapelli
- Added developer name in Settings → About
- Updated README with author information
- Added 'Built With' section crediting Flutter & Claude Code

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-04 14:37:03 -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