feat/parapharmacy-baby-products #31

Open
Ichitux wants to merge 24 commits from feat/parapharmacy-baby-products into main
Owner
No description provided.
Ichitux added 12 commits 2026-07-13 13:57:05 +00:00
- transformOFFProduct: maps OFF products to unified Product model
- searchBabyProducts: searches baby products via OFF API (1h cache)
- getBabyProductDetails: fetches product details by barcode (1h cache)
- 9 tests passing for transform logic and input validation
- GET /api/products/search?q={query} - parallel search across both sources
- GET /api/products/:source/:id - product detail by source (cima/openfoodfacts)
- Uses Promise.allSettled for fault-tolerant parallel search
- Added imports for searchOTC and OFF service functions
Displays CIMA OTC and Open Food Facts baby products with source/category
badges, product images, brand info, and Nutri-Score for OFF items.
docs: add design spec and implementation plan for parapharmacy + baby products
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
4df1594b3b
Ichitux added 1 commit 2026-07-13 14:18:21 +00:00
fix(backend): switch OFF API to /cgi/search.pl endpoint and fix test imports
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
26f309acfb
- Changed from /api/v2/search (returning 503) to /cgi/search.pl (working)
- Removed strict categories_tags=baby-food filter that was too restrictive
- Fixed test file to use dynamic imports for ES module compatibility
- Increased timeout to 10s for reliability
Ichitux added 1 commit 2026-07-13 14:23:10 +00:00
fix(backend): improve OFF API error handling
Run Tests on Branches / Detect Changes (push) Successful in 9s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has started running
ee23f61057
- Validate response is JSON before parsing (OFF returns HTML on 503)
- Don't cache empty results to avoid blocking future searches
- Add validateStatus to only accept 200 responses
- Better logging for API failures
Ichitux added 1 commit 2026-07-13 14:28:37 +00:00
feat(backend): add Open Food Facts authentication support
Run Tests on Branches / Detect Changes (push) Successful in 11s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
f1b0eab11d
- Add OFF_USERNAME and OFF_PASSWORD env vars
- Use Basic Auth when credentials are provided
- Improves rate limits for authenticated requests
- Auth is optional (works without credentials)
Ichitux added 1 commit 2026-07-13 14:43:57 +00:00
fix(backend): add retry logic and remove custom User-Agent for OFF API
Run Tests on Branches / Detect Changes (push) Successful in 10s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
452a835b64
- Add retry logic with exponential backoff (2 retries)
- Remove custom User-Agent that was being blocked by OFF
- Fix syntax error (missing catch block)
- OFF API blocks anonymous users during high demand
Ichitux added 1 commit 2026-07-13 15:00:13 +00:00
fix(backend): use v2 structured search API for OFF
Run Tests on Branches / Detect Changes (push) Successful in 14s
Run Tests on Branches / Frontend Tests (push) Successful in 3m25s
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
20debdb023
- Switch from /cgi/search.pl (503 errors) to /api/v2/search with brand filter
- Add required User-Agent header per OFF documentation
- Add OFF_USER_AGENT env var for customization
- Update .env.example with User-Agent documentation
- Retry logic continues to work with new endpoint
Ichitux added 1 commit 2026-07-13 15:05:42 +00:00
fix(backend): remove auth from OFF read operations
Run Tests on Branches / Detect Changes (push) Successful in 17s
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Tests (push) Has been cancelled
2e3ce44e7b
- READ operations don't require auth per OFF docs (only User-Agent)
- Auth credentials were causing 503 errors
- Keep User-Agent header which is required
Ichitux added 1 commit 2026-07-13 15:13:26 +00:00
debug: add logging for OFF API requests
Run Tests on Branches / Detect Changes (push) Successful in 15s
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m57s
Run Tests on Branches / Frontend Tests (push) Failing after 13m41s
Run Tests on Branches / Backend Tests (push) Failing after 15m38s
25ebb899e9
Ichitux added 1 commit 2026-07-13 15:31:45 +00:00
feat(frontend): integrate product search in SearchView
Run Tests on Branches / Detect Changes (push) Successful in 14s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
31c1a14343
- Add ProductResults component import
- Add products and searchMode state
- Add parallel product search to search effect
- Add filter tabs (Todos/Medicamentos/Parafarmacia)
- Render ProductResults when products found
- Add CSS for filter tabs and products section
Ichitux added 1 commit 2026-07-13 15:36:56 +00:00
feat(frontend): add product detail view and navigation
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
731a6c98ae
- Create ProductView component with product details display
- Add ProductView.css with responsive styling
- Add product screen to App.jsx screen system
- Pass onNavigateToProduct callback from App to SearchView
- Update ProductResults onSelect to use callback instead of window.location
Ichitux added 1 commit 2026-07-13 17:34:58 +00:00
fix(frontend): run medicine and product searches in parallel
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Detect Changes (push) Has been cancelled
59edc7fbf1
- Use Promise.allSettled for parallel API calls
- Reduces total search time from ~1300ms to ~500ms
- Prevents results disappearing during sequential searches
Ichitux added 1 commit 2026-07-13 17:50:28 +00:00
fix(frontend): set screen to 'product' when navigating to product detail
Run Tests on Branches / Backend Tests (push) Has been cancelled
Run Tests on Branches / Detect Changes (push) Has been cancelled
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
f921b15d67
- Add setScreen('product') to onNavigateToProduct callback
- ProductView was never rendered because screen stayed as 'search'
Ichitux added 1 commit 2026-07-13 18:41:19 +00:00
feat: add pharmacy-product linking system
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
8bf0b33249
- Add pharmacy_products table (PostgreSQL + SQLite)
- Add public route GET /api/products/:source/:id/pharmacies
- Add admin CRUD routes for pharmacy-product links
- Add cascade delete when pharmacy is removed
- Update ProductView to show linked pharmacies
- Create PharmacyProductLink admin component
- Add 'Vincular Producto a Farmacia' tab in AdminView
Some required checks failed
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Required
Details
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
Required
Details
This pull request has changes conflicting with the target branch.
  • apps/backend/__tests__/off-service.test.js
  • apps/backend/__tests__/server.test.js
  • apps/backend/off-service.js
  • apps/backend/server.js
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin feat/parapharmacy-baby-products:feat/parapharmacy-baby-products
git checkout feat/parapharmacy-baby-products
Sign in to join this conversation.
No Reviewers
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: Ichitux/FarmaFinder#31