feat: manual nutrition entry on recipe editor

Lets authors enter nutrition values by hand instead of relying only on
the AI estimate; the detail-page panel now shows whether data was
manually entered or AI-estimated and offers to switch between them.

v0.35.0
This commit is contained in:
Arnaud
2026-07-14 15:55:42 +02:00
parent bd3d8c88f0
commit 1577b8de01
18 changed files with 5275 additions and 15 deletions
@@ -0,0 +1 @@
ALTER TABLE "recipes" ADD COLUMN "nutrition_manual" boolean DEFAULT false NOT NULL;
File diff suppressed because it is too large Load Diff
@@ -281,6 +281,13 @@
"when": 1784030221865,
"tag": "0039_sudden_franklin_storm",
"breakpoints": true
},
{
"idx": 40,
"version": "7",
"when": 1784036519678,
"tag": "0040_loving_spot",
"breakpoints": true
}
]
}
+1
View File
@@ -43,6 +43,7 @@ export const recipes = pgTable("recipes", {
dietaryTags: jsonb("dietary_tags").$type<DietaryTags>().default({}),
dietaryVerified: boolean("dietary_verified").notNull().default(false),
nutritionData: jsonb("nutrition_data").$type<{ perServing: { calories: number; proteinG: number; carbsG: number; fatG: number; fiberG: number; sodiumMg: number } }>(),
nutritionManual: boolean("nutrition_manual").notNull().default(false),
difficulty: difficultyEnum("difficulty"),
prepMins: integer("prep_mins"),
cookMins: integer("cook_mins"),