openfoodfacts / smooth-app

🤳🥫 The new Open Food Facts mobile application for Android and iOS, crafted with Flutter and Dart
https://world.openfoodfacts.org/open-food-facts-mobile-app?utm_source=off&utf_medium=web&utm_campaign=github-repo
Apache License 2.0
860 stars 286 forks source link

Add a full data portability feature #4062

Open teolemon opened 1 year ago

teolemon commented 1 year ago

Add a full data portability feature

### Tasks
- [ ] #3830
- [ ] Allow to export History as a CSV file
- [ ] Allow to export Scan History as a CSV file
- [ ] Preferences ? As a link for the website ?

Why

Part of

g123k commented 1 year ago

Is-there a standard for this kind of data? Or can we do whatever we want?

teolemon commented 1 year ago

We can do whatever we want. Heck, we could even create a standard for food scan histories ;-)

monsieurtanuki commented 1 year ago

After the wikipedia, we could be the Braille or the Morse of food! 🎉

Just checking: for us, a barcode is only digits?

g123k commented 1 year ago

After the wikipedia, we could be the Braille or the Morse of food! 🎉

Just checking: for us, a barcode is only digits?

Yes, barcodes are only numbers-based, as EAN stands for European Article Numbering

In parallel, I've checked schema.org and I think that using the Product type might be interesting in our case: https://schema.org/Product

teolemon commented 1 year ago

do we dump product data, or just the lists of EANs + timestamp ?

Note that we are the defacto standard, and that no one else is really implementing anything at this point. If we were to dump without thought, what's the list of fields? Also, there's a way to generate CSVs from the website

g123k commented 1 year ago

If we want to be retro-compatible with the old Android app (I have to check for iOS), only 3 fields are exported in a CSV:

g123k commented 2 weeks ago

What about supporting iCloud on iOS? https://pub.dev/packages/icloud_storage https://pub.dev/packages/cloud_kit

And there's the same for Android with Google Drive: https://medium.com/@developerjo0517/backup-and-load-data-with-google-drive-in-flutter-1d901fd38f70

teolemon commented 2 weeks ago

We certainly can and should. Is there a way to get backup consent ? It would be a way to stress that we don't save your personal data to the OFF servers. We would also need a stupid db dump to the phone memory for F-Droid

g123k commented 2 weeks ago

We certainly can and should. Is there a way to get backup consent ? It would be a way to stress that we don't save your personal data to the OFF servers. We would also need a stupid db dump to the phone memory for F-Droid

We could ask for consent the first time the user creates a list. But yes, F-Droid is still an issue here and in that case, the basic import/export by CSV would do the job.