wger-project / flutter

Flutter fitness/workout app for wger
GNU Affero General Public License v3.0
528 stars 231 forks source link

Apps should offer to add new igredients after EAN code not found #629

Open ysalmon opened 1 month ago

ysalmon commented 1 month ago

Use case

When scanning a barcode in the daily food log, it happens that a barcode is correctly scanned but the wger database does not know this product.

Proposal

The dialog saying that the product is unknown should offer a way to add the product and associate it with the EAN, at least in a user (local ?) database.

Dieterbe commented 1 month ago

at least in a user (local ?) database.

i'm not a big fan of this idea. if you're gonna do the effort to add all the macros from the label, than we should just submit it to openfoodfacts instead (or, in addition to local). i'm not sure what's an elegant workflow for this though. since OFF uses a separate app. not sure if we can submit stuff via their api, and even then, it wouldn't immediately be available for usage inside wger

ysalmon commented 1 month ago

Is wger database just fetching Openfoodfacts ?

The db has numerous very low quality entries, like this one and numerous duplicates ; are they in the OFF db too ?

Dieterbe commented 1 month ago

we import from both openfoodfacts (mainly branded items) and USDA (mainly generic unbranded items) into wger. we recently started adding metadata about where items came from, so for example on the article you linked, you can see some links going back the original author/image which reveals that indeed it came from OFF.

ysalmon commented 1 month ago

OK, I see the is a "source" mention in the app too.

I wonder why the brand is not shown, however (OFF seems to have a specific field for it) : searching for common products, like carrots or muffins is not very practical at the moment.

Dieterbe commented 1 month ago

I wonder why the brand is not shown, however (OFF seems to have a specific field for it) : searching for common products, like carrots or muffins is not very practical at the moment.

i agree. can you open a seperate ticket for that?

Dieterbe commented 6 days ago

seperate ticket -> #630