feat: rename ingredients→products, products→user_products; add barcode/OFF import

- Rename catalog: ingredient/* → product/* (canonical_name, barcode, nutrition per 100g)
- Rename pantry: product/* → userproduct/* (user-owned items with expiry)
- Squash migrations into single 001_initial_schema.sql (clean-db baseline)
- product_categories: add English canonical name column; fix COALESCE in queries
- Remove product_translations: product names are stored in their original language
- Add default_unit_name to product API responses via unit_translations JOIN
- Add cmd/importoff: bulk import from OpenFoodFacts JSONL dump (COPY + ON CONFLICT)
- Diary: support product_id entries alongside dish_id (CHECK num_nonnulls = 1)
- Home: getLoggedCalories joins both recipes and catalog products
- Flutter: rename models/providers/services to match backend rename
- Flutter: add barcode scan flow for diary (mobile_scanner, product_portion_sheet)
- Flutter: localise 6 new keys across 12 languages (barcode scan, portion weight)
- Routes: GET /products/search, GET /products/barcode/{barcode}, /user-products

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
dbastrikin
2026-03-21 12:45:48 +02:00
parent 6861e5e754
commit 205edbdade
72 changed files with 2588 additions and 1444 deletions

View File

@@ -705,6 +705,42 @@ abstract class AppLocalizations {
/// In en, this message translates to:
/// **'Fridge, table, shelf — up to 3 photos'**
String get photoProductsSubtitle;
/// No description provided for @addPackagedFood.
///
/// In en, this message translates to:
/// **'Add packaged food'**
String get addPackagedFood;
/// No description provided for @scanBarcode.
///
/// In en, this message translates to:
/// **'Scan barcode'**
String get scanBarcode;
/// No description provided for @portionWeightG.
///
/// In en, this message translates to:
/// **'Portion weight (g)'**
String get portionWeightG;
/// No description provided for @productNotFound.
///
/// In en, this message translates to:
/// **'Product not found'**
String get productNotFound;
/// No description provided for @enterManually.
///
/// In en, this message translates to:
/// **'Enter manually'**
String get enterManually;
/// No description provided for @perHundredG.
///
/// In en, this message translates to:
/// **'per 100 g'**
String get perHundredG;
}
class _AppLocalizationsDelegate