Flutter app for fridge scanning, receipt OCR, freshness tracking, and AI recipes powered by Google Gemini. Supports Turkish and English, six themes, and optional Supabase sync.
| Area | What it does |
|---|---|
| Fridge scan | Camera or gallery → Gemini vision → ingredients + 3 recipes |
| Scan modes | Quick Scan (fast meals), Survival (use expiring items), Chef Mode (harder recipes) |
| Receipt OCR | Photograph a receipt → line items with expiry estimates; offline queue when offline |
| Freshness | Pantry items with urgency, calendar, “cook today”, notifications |
| Barcode | Scan product barcode → Open Food Facts lookup → add to pantry |
| Recipes | Detail view, nutrition estimate, favorites, share |
| Shopping list | Local list synced with pantry workflow |
| Diet filters | Vegetarian, vegan, gluten-free, low-carb, etc. applied to AI prompts |
| Auth (optional) | Email sign-in/up, guest mode, cloud scan history via Supabase |
| Home widget | Android pantry summary (counts from app locale) |
| Crash reporting | Optional Sentry via SENTRY_DSN |
Six variants in Settings → Appearance: Neon, Ocean, Ember, Lavender (dark) and Daylight, Cream (light).
lib/core/l10n/.strings_tr.dart) is hand-maintained; English is the source (strings_en.dart).python scripts/generate_l10n.py (requires GEMINI_API_KEY in .env). See the script header for options and limits.lib/
├── app_bootstrap.dart # Shared startup (optional dotenv fallback, locale, theme)
├── main.dart
├── core/
│ ├── crash/ # Optional Sentry
│ ├── enums/ # Scan mode, theme, locale, diet
│ ├── l10n/ # TR / EN strings
│ ├── scan/ # Mode prompts, recipe post-processing
│ ├── storage/ # SharedPreferences (locale, theme, mode, diet)
│ └── theme/
├── features/
│ ├── app/ # Splash, launcher, main shell (tabs)
│ ├── auth/ # Supabase auth gate
│ ├── barcode/
│ ├── camera/ # Scan UI, modes, receipt capture
│ ├── freshness/
│ ├── favorites/
│ ├── onboarding/
│ ├── pantry/
│ ├── receipt/
│ ├── recipes/
│ ├── settings/
│ └── shopping/
└── services/
├── ai_service.dart # Gemini multimodal + JSON pipeline
├── gemini_*_prompt_builder.dart
├── gemini_error_mapper.dart
└── freshness_notification_service.dart, pantry_widget_service.dart
test/ # Unit & widget tests (see Testing)
docs/ # Supabase, permissions
supabase/migrations/ # SQL for cloud pantry
Clone or open this folder:
cd cyberchef_flutter
Install dependencies:
flutter pub get
On Windows, if flutter is not in PATH, use the full path to your SDK, for example:
D:\flutter_sdk\flutter\bin\flutter.bat pub get
Configure secrets with --dart-define (recommended):
flutter run \
--dart-define=GEMINI_API_KEY=your_key \
--dart-define=SUPABASE_URL=your_url \
--dart-define=SUPABASE_ANON_KEY=your_anon_key \
--dart-define=SENTRY_DSN=your_sentry_dsn
For convenience, you can keep values in .env and run:
flutter run --dart-define-from-file=.env
| Variable | Required | Purpose |
|---|---|---|
GEMINI_API_KEY |
Yes (for AI) | Google AI Studio |
SUPABASE_URL |
No | Cloud auth & pantry sync |
SUPABASE_ANON_KEY |
No | Supabase anon key |
SENTRY_DSN |
No | Crash reporting (release builds; debug events are dropped) |
AI_BACKEND_PROXY_URL |
No | Base URL for AI proxy (recommended in production) |
AI_BACKEND_PROXY_BEARER |
No | Optional static bearer token for proxy |
AI_PROXY_REQUIRED |
No | true to disable direct Gemini fallback and require proxy |
IAP_PRO_MONTHLY_ID |
No | Play/App Store product ID for monthly Pro subscription |
IAP_PRO_YEARLY_ID |
No | Play/App Store product ID for yearly Pro subscription |
See docs/supabase_setup.md for migrations 001–003 and auth providers.
Run on a device or emulator:
flutter run
(Optional) App icon code generation after changing assets/icon/app_icon.png:
dart run flutter_launcher_icons
flutter test
Coverage highlights:
RecipeModeProcessor)PantryAnalysisResult JSON round-tripCI or fresh clones without .env still run tests; AI calls are not executed in unit tests.
gemini-3-flash-previewgemini-2.0-flash when the preview model is unavailableingredients, recipes with optional nutrition)Core recipe prompt logic is centralized in lib/core/scan/scan_mode_prompts.dart (do not duplicate mode rules in one-off prompts).
After changing locale or pantry counts, the app updates widget data from Dart; the Kotlin provider reads stored strings (not hardcoded Turkish). Rebuild the app after widget code changes.
Before Play Store:
flutter test and manual QA on a real device (both locales, light/dark themes, offline receipt queue).android/app/build.gradle.kts).SENTRY_DSN for production crash visibility.002 / 003 if using cloud pantry features.The parent CyberChef folder may also contain a Unity project. This Flutter app is the mobile pantry client and can be developed independently. See INTEGRATION.md if present for cross-project notes.
Private / unpublished unless otherwise specified by the repository owner.