Backend:
- Add Groq LLM client (llama-3.3-70b) for recipe generation with JSON
retry strategy (retries only on parse errors, not API errors)
- Add Pexels client for parallel photo search per recipe
- Add saved_recipes table (migration 004) with JSONB fields
- Add GET /recommendations endpoint (profile-aware prompt building)
- Add POST/GET/GET{id}/DELETE /saved-recipes CRUD endpoints
- Wire gemini, pexels, recommendation, savedrecipe packages in main.go
Flutter:
- Add Recipe, SavedRecipe models with json_serializable
- Add RecipeService (getRecommendations, getSavedRecipes, save, delete)
- Add RecommendationsNotifier and SavedRecipesNotifier (Riverpod)
- Add RecommendationsScreen with skeleton loading and refresh FAB
- Add RecipeDetailScreen (SliverAppBar, nutrition tooltip, steps with timer)
- Add SavedRecipesScreen with Dismissible swipe-to-delete and empty state
- Update RecipesScreen to TabBar (Recommendations / Saved)
- Add /recipe-detail route outside ShellRoute (no bottom nav)
- Extend ApiClient with getList() and deleteVoid()
Project:
- Add CLAUDE.md with English-only rule for comments and commit messages
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
29 lines
996 B
Go
29 lines
996 B
Go
package ingredient
|
|
|
|
import (
|
|
"encoding/json"
|
|
"time"
|
|
)
|
|
|
|
// IngredientMapping is the canonical ingredient record used to link
|
|
// user products, recipe ingredients, and Spoonacular data.
|
|
type IngredientMapping struct {
|
|
ID string `json:"id"`
|
|
CanonicalName string `json:"canonical_name"`
|
|
CanonicalNameRu *string `json:"canonical_name_ru"`
|
|
SpoonacularID *int `json:"spoonacular_id"`
|
|
Aliases json.RawMessage `json:"aliases"` // []string
|
|
Category *string `json:"category"`
|
|
DefaultUnit *string `json:"default_unit"`
|
|
|
|
CaloriesPer100g *float64 `json:"calories_per_100g"`
|
|
ProteinPer100g *float64 `json:"protein_per_100g"`
|
|
FatPer100g *float64 `json:"fat_per_100g"`
|
|
CarbsPer100g *float64 `json:"carbs_per_100g"`
|
|
FiberPer100g *float64 `json:"fiber_per_100g"`
|
|
|
|
StorageDays *int `json:"storage_days"`
|
|
CreatedAt time.Time `json:"created_at"`
|
|
UpdatedAt time.Time `json:"updated_at"`
|
|
}
|