Commit Graph

53 Commits

Author SHA1 Message Date
Antoni Nuñez Romeu 52b5b72cfb ci: optimize test performance — from ~3h to 3.5s
- Lazy-load tesseract.js only in OCR route (skips 30MB WASM download)
- Conditional tracing.js import (skip OTel gRPC in test mode)
- Remove unused barcode-detector import
- Add testTimeout/openHandlesTimeout to jest.config.js
- Add --forceExitTimeout=30000 to test script
- Split CI test jobs into parallel workflows (backend/frontend/mobile)
- Add timeout-minutes: 15 to all test jobs
- Use npm ci --ignore-scripts + selective native rebuild
2026-07-14 13:24:19 +02:00
Ichitux 84bf5f3f79 Merge branch 'main' into feat/observability-metrics-monitoring
Run Tests on Branches / Run Tests (push) Failing after 3h11m0s
2026-07-13 23:08:19 +00:00
Antoni Nuñez Romeu 20cc399731 fix: add missing mocks for off-service.js and searchOTC in backend tests
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
The backend test was hanging in CI because server.js imports off-service.js
which pulls in redis-client.js. Without a mock, it tries to connect to Redis
at import time, hanging indefinitely in CI where no Redis server exists.

Also added the missing searchOTC mock for cima-service.js to fix the
SyntaxError from the export mismatch.
2026-07-13 21:10:06 +02:00
Antoni Nuñez Romeu 6fa12b12d9 fix: address code review issues — nutriscore field name, cache write isolation, missing rate limiter, dead props 2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu 731b51ff48 feat: display product results alongside medicine results in MedicineResults component 2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu ca4a9671e7 feat(mobile): add product detail screen for CIMA and OFF products 2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu 241d362528 feat(mobile): integrate product search with filter tabs in search screen 2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu 13cf7b66ee feat(mobile): add products API service with search and detail endpoints 2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu 39868d95c6 feat(frontend): integrate product search into PublicView with filter tabs 2026-07-13 20:58:41 +02:00
Antoni Nuñez Romeu 2d839b9082 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 20:58:41 +02:00
Antoni Nuñez Romeu 1a2e9aafb2 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 20:58:40 +02:00
Antoni Nuñez Romeu edfe7d6390 feat(backend): add CIMA OTC search function with Redis caching 2026-07-13 20:58:40 +02:00
Antoni Nuñez Romeu b7ca3633e6 fix: remove dead BABY_CATEGORIES constant and emoji from logs 2026-07-13 20:58:40 +02:00
Antoni Nuñez Romeu e48ef31fee 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 20:58:40 +02:00
Antoni Nuñez Romeu 1318243841 fix(backend): use string resource attribute keys instead of semantic-conventions named exports
Run Tests on Branches / Detect Changes (push) Successful in 13s
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
The resolved @opentelemetry/semantic-conventions version in CI does not
export ATTR_SERVICE_NAMESPACE/ATTR_SERVICE_NAME as named exports, breaking
the backend test import. Use plain 'service.name'/'service.namespace'
string keys so the code is independent of the semantic-conventions version.
2026-07-13 16:35:45 +02:00
Antoni Nuñez Romeu 839c64c12a feat: add end-to-end observability (metrics, health, mobile RUM, dashboards, alerts)
Run Tests on Branches / Detect Changes (push) Successful in 10s
Run Tests on Branches / Backend Tests (push) Failing after 20s
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Failing after 20s
- Backend: OTel metrics via OTLP -> Alloy -> Prometheus (OTEL_METRICS_EXPORTER=otlp)
- New business metrics (src/metrics.js): searches, CIMA latency/errors, cache
  hits/misses, logins, rate-limits, pharmacy writes/links, push sent/failed,
  DB + Redis timings/errors, HTTP req count/duration, heartbeat
- Backend health endpoints /healthz and /readyz
- Mobile (Expo): Grafana Faro RUM via @grafana/faro-react-native
- redis/postgres exporters in docker-compose + Prometheus scrape jobs
- Grafana dashboards (backend, datastores, mobile RUM, overview)
- Prometheus alert rules (farmafinder_*) -> existing Alertmanager (Telegram)
- Design/spec saved to docs/superpowers/specs/
2026-07-13 15:57:52 +02:00
Antoni Nuñez Romeu 0c43d32cf1 feat: add Expo Push notifications for mobile and configure EXPO_ACCESS_TOKEN
Run Tests on Branches / Detect Changes (push) Successful in 13s
Run Tests on Branches / Backend Tests (push) Successful in 1m58s
Run Tests on Branches / Frontend Tests (push) Successful in 1m53s
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m49s
- Backend: add expo_push_tokens table, expo-register/unregister endpoints, hybrid VAPID+Expo push sender
- Mobile: register Expo push token on app launch, bell toggle on medicine/pharmacy detail screens
- .env.example: document EXPO_ACCESS_TOKEN configuration
- Dark mode hover fixes for search suggestions and recent buttons
2026-07-13 12:21:25 +02:00
Antoni Nuñez Romeu 2a7ab64bbf feat(mobile): improve login, profile, alerts screens and dark mode background
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Successful in 1m41s
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m46s
- Unify login/register into single screen with tab switcher, logo, and themed inputs
- Redesign profile with header card, segmented theme toggle, icon-based menu, and bottom-sheet modals
- Add auth guard to alerts screen showing login prompt instead of 401 error
- Switch ImageBackground to explicit Image+View layering for reliable rendering
- Add dark mode background image switching in root layout
- Add dark mode override for recent-tag in PWA search view
2026-07-10 16:39:59 +02:00
Antoni Nuñez Romeu d371fd2bb7 Changes in background and dark mode
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m43s
2026-07-10 12:41:10 +02:00
Antoni Nuñez Romeu 8b9b7e8444 Dark mode improvements and FarmaClic rebranding
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Successful in 1m55s
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m51s
- Dark mode: gray background instead of pure black
- Dark mode: improved notification card visibility (SavedNotifications)
- Dark mode: improved alerts view badge contrast (AlertsView)
- Dark mode: custom pharmacy-themed background image
- Rebranding: replace all logos with FarmaClic branding
- Update PWA icons, favicon, apple-touch-icon, and mobile app icons
2026-07-10 09:58:36 +02:00
Ichitux f58b4427a8 Merge fixing things
Build & Push Docker Images / Detect Changes (push) Successful in 7s
Build & Push Docker Images / Backend Tests (push) Successful in 1m47s
Build & Push Docker Images / Frontend Tests (push) Has been skipped
Build & Push Docker Images / Build Backend (push) Successful in 26s
Build & Push Docker Images / Build Frontend (push) Has been skipped
Build & Push Docker Images / Deploy (push) Successful in 23s
2026-07-09 17:39:44 +02:00
Ichitux 2f36ef685d Mobile App design
Run Tests on Branches / Detect Changes (push) Successful in 10s
Run Tests on Branches / Backend Tests (push) Successful in 2m12s
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m47s
2026-07-09 13:33:54 +02:00
Antoni Nuñez Romeu e9a1d7c53d Add dark mode for PWA frontend
Run Tests on Branches / Detect Changes (push) Successful in 12s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Successful in 1m47s
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
2026-07-09 13:18:25 +02:00
Ichitux 5f604b11ba Frontend Hotfixes & Backend improvements
Run Tests on Branches / Detect Changes (push) Successful in 9s
Run Tests on Branches / Backend Tests (push) Successful in 1m51s
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m44s
2026-07-09 00:58:31 +02:00
Ichitux 302d574220 Manifest changes to PWA
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Successful in 2m6s
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
2026-07-08 23:54:50 +02:00
Antoni Nuñez Romeu d6db48b695 fix(mobile): align background, API config, and search bar with PWA
Run Tests on Branches / Detect Changes (push) Successful in 11s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m46s
- Add background image matching PWA (bg.png with opacity + overlay)
- Fix production API URL to farmacias.hacecalor.net
- Replace raw fetch calls in alerts.tsx with configured api service
- Constrain SearchBar max-width to 420px to prevent horizontal clipping
2026-07-08 14:23:58 +02:00
Antoni Nuñez Romeu 0099aab093 mobile ui fix
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Successful in 1m48s
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m49s
2026-07-07 23:43:18 +02:00
Antoni Nuñez Romeu fe08dd512e Faro & grafana improvements 2 2026-07-07 23:40:40 +02:00
Antoni Nuñez Romeu 6612c8b10c Faro & grafana improvements
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Successful in 1m46s
Run Tests on Branches / Frontend Mobile Tests (push) Has been cancelled
2026-07-07 23:40:04 +02:00
Antoni Nuñez Romeu aae3ac04af Faro & grafana improvements 2026-07-07 23:39:37 +02:00
Antoni Nuñez Romeu 69ef048388 fix: tab bar not visible on Android
Run Tests on Branches / Detect Changes (push) Successful in 8s
Run Tests on Branches / Backend Tests (push) Has been skipped
Run Tests on Branches / Frontend Tests (push) Has been skipped
Run Tests on Branches / Frontend Mobile Tests (push) Successful in 1m39s
Add SafeAreaProvider to root layout and use dynamic safe area insets
for tab bar height/padding instead of hardcoded values that didn't
account for Android system navigation bar.
2026-07-07 21:04:42 +02:00
Antoni Nuñez Romeu ce3cca1d79 Add logo home + ocr changes for TSI
Run Tests on Branches / Detect Changes (push) Successful in 7s
Run Tests on Branches / Backend Tests (push) Successful in 1m53s
Run Tests on Branches / Frontend Tests (push) Successful in 1m53s
Run Tests on Branches / Frontend Mobile Tests (push) Has been skipped
2026-07-07 18:36:34 +02:00
Antoni Nuñez Romeu 9949b85001 Refactor frontend-mobile
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
2026-07-07 18:08:44 +02:00
Antoni Nuñez Romeu a58ce306bf Missing files from commit
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
2026-07-07 17:44:36 +02:00
Antoni Nuñez Romeu 7eb791f181 chore: update app icons across Expo, iOS, Android, and web
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
Replace all app icons, favicons, and splash assets with new
FarmaClic branding from provided AppIcons and ImageSets assets.
2026-07-07 17:43:47 +02:00
Antoni Nuñez Romeu fc12582814 fix: add missing @expo/vector-icons dependency to frontend-mobile
Run Tests on Branches / Frontend Tests (push) Has been cancelled
Run Tests on Branches / Backend Tests (push) Has been cancelled
The Android build was failing because @expo/vector-icons was not listed
in package.json despite being imported in app/(tabs)/_layout.tsx.
2026-07-07 15:57:55 +02:00
Ichitux 006fae43d4 Merge branch 'main' into notification_fixes
Run Tests on Branches / Backend Tests (push) Successful in 1m59s
Run Tests on Branches / Frontend Tests (push) Successful in 1m50s
2026-07-07 13:24:40 +00:00
Antoni Nuñez Romeu 071ed91e43 Notify to PGSql instead of SQLite
Run Tests on Branches / Backend Tests (push) Successful in 1m52s
Run Tests on Branches / Frontend Tests (push) Has been cancelled
2026-07-07 15:22:22 +02:00
Antoni Nuñez Romeu afaa4de385 Google services, design fixes
Run Tests on Branches / Backend Tests (push) Successful in 2m2s
Run Tests on Branches / Frontend Tests (push) Successful in 1m55s
2026-07-07 12:50:32 +02:00
Antoni Nuñez Romeu 4404db62ee feat: avatar popup options, profile redesign, and search dosage parsing
Run Tests on Branches / Backend Tests (push) Successful in 2m3s
Run Tests on Branches / Frontend Tests (push) Successful in 1m56s
- Added avatar selection popup with predefined avatar options
- Redesigned ProfileView (web + mobile) with avatar upload and editable fields
- Added AvatarSelectionModal for mobile profile
- Fixed medicine search: parse dosage terms (e.g. 'Paracetamol 1G')
  to query CIMA only by name and filter by dosage field
- Updated styles for profile, search, and medicine results
2026-07-07 12:09:42 +02:00
Antoni Nuñez Romeu fe22e6ee9b Profile and design hotfixes
Run Tests on Branches / Backend Tests (push) Failing after 17s
Run Tests on Branches / Frontend Tests (push) Failing after 17s
2026-07-07 01:45:09 +02:00
Antoni Nuñez Romeu c5417ff787 feat: mobile profile with read-only fields and Configuración modal 2026-07-07 01:38:38 +02:00
Antoni Nuñez Romeu b899d9a297 feat: read-only name fields with Configuración modal for profile editing 2026-07-07 01:37:57 +02:00
Antoni Nuñez Romeu c46a3ee7ea fix: Mis Direcciones now shows address history instead of notifications 2026-07-07 01:16:06 +02:00
Antoni Nuñez Romeu 4f36820d34 feat: save search history when sorting pharmacies by distance 2026-07-06 18:47:43 +02:00
Antoni Nuñez Romeu eb3cde67eb feat: redesign mobile profile with editable fields and avatar upload 2026-07-06 18:07:14 +02:00
Antoni Nuñez Romeu bc8b9ecd31 feat: redesign profile view with editable fields and search history 2026-07-06 18:04:37 +02:00
Antoni Nuñez Romeu 86a4e119b0 feat: add profile fields and search history API 2026-07-06 18:01:18 +02:00
Antoni Nuñez Romeu 30a3444da5 Merge branch 'turborepo_changes'
Build & Push Docker Images / test-backend (push) Successful in 1m47s
Build & Push Docker Images / test-frontend (push) Successful in 1m43s
Build & Push Docker Images / build-backend (push) Successful in 2m32s
Build & Push Docker Images / build-frontend (push) Failing after 20s
Build & Push Docker Images / deploy (push) Has been skipped
2026-07-06 17:37:28 +02:00
Antoni Nuñez Romeu 877eaeff70 Hotfixes api newer path
Run Tests on Branches / Backend Tests (push) Failing after 14s
Run Tests on Branches / Frontend Tests (push) Failing after 14s
2026-07-06 17:25:57 +02:00