add editable nutrition log and 7-day insights
Android Release Build / build-android (push) Failing after 7m46s
Android Release Build / build-android (push) Failing after 7m46s
This commit is contained in:
@@ -8,7 +8,7 @@ On first launch, users enter age, height, weight, and an exercise goal. The prof
|
||||
|
||||
Product ratings now use nutrition (45%), goal fit (20%), ingredients (15%), and allergies (20% when applicable). Only categories with known facts contribute to the numeric score. Missing information limits confidence. Confirmed avoided allergens still block a recommendation. Additives remain an ingredients signal; environmental impact is still displayed in product details but no longer affects the score. The shopping list remains available for planning and checking off products; price entry, totals and budget controls are no longer part of the app.
|
||||
|
||||
The product screen shows protein and total sugar per serving. Users can mark a portion as eaten; the local daily log then updates the Home screen and subsequent recommendations. A scan or a shopping-list addition **does not** count as consumption. The app uses the stated serving size, then package size, then 100 g when no amount is available. The last fallback is approximate. Daily totals cover only portions logged in the app. A product with missing nutrition values cannot fill those gaps.
|
||||
The product screen shows protein and total sugar per serving. Users can mark a portion as eaten and choose the stated serving, half or all of the package, 100 g, or a custom amount. The portion can be recorded for today or backdated to an earlier calendar day. The local daily log then updates the Home screen and subsequent recommendations. Entries can be edited or deleted, and earlier dates remain available in the expandable history. A seven-day view supports week-by-week navigation, shows nutrient-specific data coverage, and derives patterns only from logged days with complete data for the relevant nutrient. A scan or a shopping-list addition **does not** count as consumption. When the portion selector opens, it defaults to the stated serving size, then package size, then 100 g when no amount is available. The last fallback is approximate. Daily totals and insights cover only portions logged in the app. A product with missing nutrition values cannot fill those gaps and is never treated as zero.
|
||||
|
||||
The daily view also tracks salt and fibre for all goals. The product goal detail shows both without scoring them again because the Nutri-Score already considers them. For endurance goals, carbohydrates per serving contribute to goal fit; no daily carbohydrate prescription is inferred without training duration and intensity. For vegan diets, available vitamin B12 values are shown against the adult EFSA reference of 4 µg/day. Missing vitamin data stays unknown; a missing field never means zero or a diagnosed deficiency. OFF vitamin B12 is converted from grams to micrograms. Manual product editing can add these values from a label.
|
||||
|
||||
@@ -25,6 +25,8 @@ npm install
|
||||
npm start
|
||||
```
|
||||
|
||||
Run the automated service tests with `npm test`.
|
||||
|
||||
Scan testing barcodes: `3017620422003` and `737628064502`. Online product data comes from [Open Food Facts Switzerland](https://ch.openfoodfacts.org/); the Swiss subdomain supplies the country context for searches. Environmental context uses a bundled [AGRIBALYSE](https://data.ademe.fr/datasets/agribalyse-31-synthese) extract. The app does not upload the personal profile or food log. Barcode and search requests are sent to Open Food Facts when online.
|
||||
|
||||
Cached products created before carbohydrate mapping was added are refreshed on the next online scan, even if they were fetched within the usual 24-hour cache window. Opening one from recent products also refreshes its detail view. In offline mode the old entry remains available and is marked stale until it can be refreshed.
|
||||
|
||||
Reference in New Issue
Block a user