Antoni Nuñez Romeu
8bf0b33249
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
- 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
2026-07-13 20:41:16 +02:00
Antoni Nuñez Romeu
f921b15d67
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
- Add setScreen('product') to onNavigateToProduct callback
- ProductView was never rendered because screen stayed as 'search'
2026-07-13 19:50:24 +02:00
Antoni Nuñez Romeu
59edc7fbf1
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
- Use Promise.allSettled for parallel API calls
- Reduces total search time from ~1300ms to ~500ms
- Prevents results disappearing during sequential searches
2026-07-13 19:34:55 +02:00
Antoni Nuñez Romeu
731a6c98ae
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
- 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
2026-07-13 17:36:52 +02:00
Antoni Nuñez Romeu
31c1a14343
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
- 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
2026-07-13 17:31:42 +02:00
Antoni Nuñez Romeu
25ebb899e9
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
2026-07-13 17:13:22 +02:00
Antoni Nuñez Romeu
2e3ce44e7b
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
- 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
2026-07-13 17:05:37 +02:00
Antoni Nuñez Romeu
20debdb023
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
- 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
2026-07-13 17:00:09 +02:00
Antoni Nuñez Romeu
452a835b64
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
- 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
2026-07-13 16:43:54 +02:00
Antoni Nuñez Romeu
f1b0eab11d
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
- 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)
2026-07-13 16:28:34 +02:00
Antoni Nuñez Romeu
ee23f61057
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
- 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
2026-07-13 16:23:07 +02:00
Antoni Nuñez Romeu
26f309acfb
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
- 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
2026-07-13 16:18:11 +02:00
Antoni Nuñez Romeu
4df1594b3b
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
2026-07-13 15:56:00 +02:00
Antoni Nuñez Romeu
981f3bd3db
fix: address code review issues — nutriscore field name, cache write isolation, missing rate limiter, dead props
2026-07-13 15:46:47 +02:00
Antoni Nuñez Romeu
83920ae57c
feat: display product results alongside medicine results in MedicineResults component
2026-07-13 15:35:11 +02:00
Antoni Nuñez Romeu
7b1636a96e
feat(mobile): add product detail screen for CIMA and OFF products
2026-07-13 15:33:34 +02:00
Antoni Nuñez Romeu
bb2dbbab3a
feat(mobile): integrate product search with filter tabs in search screen
2026-07-13 15:31:39 +02:00
Antoni Nuñez Romeu
d5b23aa94a
feat(mobile): add products API service with search and detail endpoints
2026-07-13 15:28:55 +02:00
Antoni Nuñez Romeu
9e786f2966
feat(frontend): integrate product search into PublicView with filter tabs
2026-07-13 15:27:47 +02:00
Antoni Nuñez Romeu
a709deb893
feat(frontend): add ProductResults component for unified product search
...
Displays CIMA OTC and Open Food Facts baby products with source/category
badges, product images, brand info, and Nutri-Score for OFF items.
2026-07-13 15:25:35 +02:00
Antoni Nuñez Romeu
229e1d8106
Add unified product search routes (CIMA OTC + Open Food Facts)
...
- 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
2026-07-13 15:23:43 +02:00
Antoni Nuñez Romeu
f2a5dc4ca3
feat(backend): add CIMA OTC search function with Redis caching
2026-07-13 15:18:20 +02:00
Antoni Nuñez Romeu
d62e5976ce
fix: remove dead BABY_CATEGORIES constant and emoji from logs
2026-07-13 15:17:02 +02:00
Antoni Nuñez Romeu
d6f4164dae
feat(backend): add Open Food Facts service with Redis caching
...
- 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
2026-07-13 15:10:46 +02:00