Skip to content

Unified Food Search - Text and Barcode#885

Merged
CodeWithCJ merged 3 commits intoCodeWithCJ:mainfrom
apedley:food-search-unification
Mar 11, 2026
Merged

Unified Food Search - Text and Barcode#885
CodeWithCJ merged 3 commits intoCodeWithCJ:mainfrom
apedley:food-search-unification

Conversation

@apedley
Copy link
Contributor

@apedley apedley commented Mar 10, 2026

Tip

Help us review and merge your PR faster!
Please ensure you have completed the Checklist below.
For Frontend changes, please run pnpm run validate to check for any errors.
PRs that include tests and clear screenshots are highly preferred!

Description

Created unified food search endpoints under /api/v2 so as to be backwards compatible.

  • The original food search on the server remains the same
  • This not only adds food text and barcode search with new features for both platforms, it makes it so we only need to fix bugs in one place. And fixes [Bug]: Serving size inconsistencies with FatSecret #883
    • Mobile implementation coming later this week

Set up typescript for the server - all new files should now be written in typescript
Moved server to pnpm
Updated all docker files (dev, prod, backend, frontend) to use pnpm

  • verified all of them build with the same commands as ci
    Updated workflows to use pnpm
  • auto-docker-deploy.yml and manual-docker-deploy.yml
    Misc type fixes to pass typecheck
    Updated web front end to use the new food search endpoints

Related Issue

PR type [x] Issue [x] New Feature [ ] Documentation
Linked Issue: #

Checklist

Please check all that apply:

  • [MANDATORY for new feature] Alignment: I have raised a GitHub issue and it was reviewed/approved by maintainers
  • Tests: I have included automated tests for my changes.
  • [MANDATORY for UI changes] Screenshots: I have attached "Before" vs "After" screenshots below.
  • [MANDATORY for Frontend changes] Quality: I have run pnpm run validate (especially for Frontend).
  • Translations: I have only updated the English (en) translation file (if applicable).
  • Architecture: My code follows the existing architecture standards.
  • Database Security: I have updated rls_policies.sql for any new user-specific tables.
  • [MANDATORY - ALL] Integrity & License: I certify this is my own work, free of malicious code(phishing, malware, etc.) and I agree to the License terms.

Screenshots (if applicable)

Before

Screenshot 2026-03-10 at 9 33 59 AM

After

Screenshot 2026-03-10 at 9 32 28 AM

@gemini-code-assist
Copy link
Contributor

Warning

Gemini is experiencing higher than usual traffic and was unable to create the summary. Please try again in a few hours by commenting /gemini summary.

@CodeWithCJ
Copy link
Owner

CodeWithCJ commented Mar 10, 2026

@apedley Could you check the conflict for package.json
Also, i saw you removed USDA and Fatsecret files. Are they continue to work for barcode search in web? Fatsecret has some logic in the server side for scope property. is that also continue to work? it was there for free vs premierfree tiers

@CodeWithCJ
Copy link
Owner

I merged both changes for the package file specially for the test script section. check it out once if that is fine.

@CodeWithCJ
Copy link
Owner

still some issue is there due to package file mismatch it seems. it errored out on lock file now.

image

@apedley
Copy link
Contributor Author

apedley commented Mar 10, 2026

@apedley Could you check the conflict for package.json Also, i saw you removed USDA and Fatsecret files. Are they continue to work for barcode search in web? Fatsecret has some logic in the server side for scope property. is that also continue to work? it was there for free vs premierfree tiers

We need a combination of both files. Do you want me to force push over your patch?

All the same barcode scanning stuff and the text search works same as before. The difference is all the providers go through the same api endpoint now so they all return the same shape of data. The files I removed were for the front end to use separate provider endpoints.

@apedley apedley force-pushed the food-search-unification branch from 9f90c5f to dcf68c3 Compare March 10, 2026 23:13
@apedley
Copy link
Contributor Author

apedley commented Mar 10, 2026

Got it, just had to update the lockfile

@CodeWithCJ CodeWithCJ merged commit 51c3946 into CodeWithCJ:main Mar 11, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Serving size inconsistencies with FatSecret

2 participants