Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nutrition stats #124

Closed
muety opened this issue Nov 9, 2023 · 15 comments · Fixed by #128
Closed

Nutrition stats #124

muety opened this issue Nov 9, 2023 · 15 comments · Fixed by #128
Assignees
Labels
Backend The issue lies in the data presented in the App or in the server enhancement New feature or request Frontend The issue lies in the App itself

Comments

@muety
Copy link
Contributor

muety commented Nov 9, 2023

The app looks amazing, thanks a lot! As an additional feature, it would be super cool to also see nutrition stats for each meal, see here.

@worldofjoni worldofjoni added the enhancement New feature or request label Nov 9, 2023
@worldofjoni
Copy link
Member

Thanks! We considered adding nutritinal information but decided not to because in our experience they semed not that realistic/accurate and thus not worth our time. If anyone would like to implement that though it would be a nice addition and should be not to hard to add.

@uglrl
Copy link
Contributor

uglrl commented Nov 23, 2023

The trawling aspect is now implemented. The database, graphql and app still need to be changed.

@worldofjoni
Copy link
Member

@uglrl nice, do you want to create a pull request?

@uglrl
Copy link
Contributor

uglrl commented Nov 23, 2023

No, because the database etc. still has to be implemented. And the trawling still has some bugs

@muety
Copy link
Contributor Author

muety commented Jan 5, 2024

Would love to have this included! @uglrl if you manage to finish up the data scraping (you might take inspiration from here) (and possibly also adapt the database schema), I'll probably give it a go and try my hand at the GraphQL API and app integration.

@worldofjoni
Copy link
Member

worldofjoni commented Jan 5, 2024

Great that you want to contribute! 😄

I think the following things would be neccesarry to get this going:
Backend:

  • Web scraping: looks like its already implemented by @uglrl , just needs to be reviewed/merged
  • Database schema update incl. access component in backend: I think I @worldofjoni can take a look at that
  • Changes to the Graphql api. That should not be too much work and a task to get familiar with the project @muety

Frontend:

  • GraphQL-CLient part
  • Internal shananigans like storage to the database for offline use etc. I am not an expert at this part. Maybe @AlexKutschera can help here?
  • Addition to the UI

Further proceedings

I think we can assemble this directly on the backend branch.
@uglrl you might create a pr of your scraping part so I can take a look at it


@muety if anything is unclear or you have any further questions feel free to ask

Edit: moved documentation images to another comment

@worldofjoni
Copy link
Member

Here are some excerpts of our internal documentation (which we should incoperate into this repository at some point).

Backend

a bit outdated (especially the image-management part) but the components relevant to us now should still be correct: GraphQL and Database
image

Frontend

this might also be dated but nevertheless
image

@muety
Copy link
Contributor Author

muety commented Jan 5, 2024

Awesome, very helpful! I'll start implementing API and app once you guys tell me the scraping- and database parts are done.

@muety
Copy link
Contributor Author

muety commented Feb 21, 2024

Any news on this? :)

@worldofjoni
Copy link
Member

Actually, yes!
The backend part is effectively done (the graphql changes were really not much work and natural to do with the rest together), meaning they are just waiting to get merged (#133 #128), this should get done in the next view days.
All for the frontend relevant parts (namely the graphql API changes) are already available in nutrition_data. So you could start with your work on the frontend part. A current copy of the updated API schema can also be found in the thread of #128.

@muety
Copy link
Contributor Author

muety commented Feb 21, 2024

Awesome news, thanks for that 🙌 Will give it a go probably on the weekend.

@muety
Copy link
Contributor Author

muety commented Feb 24, 2024

Quick update on my end: I managed to get everything set up locally and was able to implement UI for showing nutrition data on the app (inside the accordion, next to additives, etc.). Still need to adapt the database schema and persist nutrition information to the app database.

Would be cool to get #133 merged soon, so I can work from a clean branch (had to do some small ad-hoc fixes to get the app compile since backend and frontend seem to have diverged a bit).

Btw., one thing I struggled with while building my dev setup is the fact that the cron expressions for the scheduler apparently expect UTC datetimes instead of local ones 🤔. Perhaps worth mentioning in the environment variables section.

@worldofjoni
Copy link
Member

worldofjoni commented Feb 27, 2024

#128 was only one half... but is now merged in main 🥳

@worldofjoni worldofjoni reopened this Feb 27, 2024
@uglrl uglrl added Backend The issue lies in the data presented in the App or in the server Frontend The issue lies in the App itself labels Apr 19, 2024
@muety
Copy link
Contributor Author

muety commented May 6, 2024

I think this was pretty much completed with #147 and #157, no? Any predictions on when a new version will be released actually?

@AlexKutschera
Copy link
Collaborator

Released on both Android and iOS today

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Backend The issue lies in the data presented in the App or in the server enhancement New feature or request Frontend The issue lies in the App itself
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants