dbastrikin
7241802931
fix: split menu generation into 3 parallel recipe calls to avoid Groq 403
...
Requesting 21 full recipes in one prompt exceeds the token budget and
returns 403 Forbidden. Replace the single-call approach with three
concurrent GenerateRecipes calls (breakfast ×7, lunch ×7, dinner ×7),
then assemble the 7-day plan from the results.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-22 12:05:48 +02:00
dbastrikin
ea8e207a45
feat: implement Iteration 4 — menu planning, shopping list, diary
...
Backend:
- Migrations 007 (menu_plans, menu_items, shopping_lists) and
008 (meal_diary)
- gemini/menu.go: GenerateMenu — 7-day × 3-meal plan via one Groq call
- internal/menu: model, repository (GetByWeek, SaveMenuInTx,
shopping list CRUD), handler (GET/PUT/DELETE /menu,
POST /ai/generate-menu, shopping list endpoints)
- internal/diary: model, repository, handler (GET/POST/DELETE /diary)
- Increase server WriteTimeout to 120s for long AI calls
- api_client.go: add patch() and postList() helpers
Flutter:
- shared/models: menu.dart, shopping_item.dart, diary_entry.dart
- features/menu: menu_service.dart, menu_provider.dart
(MenuNotifier, ShoppingListNotifier, DiaryNotifier with family)
- MenuScreen: 7-day view, week nav, skeleton on generation,
generate FAB with confirmation dialog
- ShoppingListScreen: items by category, optimistic checkbox toggle
- DiaryScreen: daily entries with swipe-to-delete, add-entry sheet
- Router: /menu/shopping-list and /menu/diary routes
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com >
2026-02-22 12:00:25 +02:00