Commit graph

6 commits

Author SHA1 Message Date
Yanis 30476a3c7e fix(app): update splash and adaptive icon background color to white 2026-05-01 14:05:53 +02:00
Yanis 086de7c05c feat(scanner,ml): real TFLite inference + preload + flip camera + analyzing skeleton
ML
- Reinstall react-native-fast-tflite + react-native-nitro-modules and
  register the fast-tflite Expo plugin in app.json
- Wire model.ts to the real native module: dynamic require + lazy
  loadTensorflowModel (cached), softmax/argmax on output, build Detection
  with the project 0-100 confidence convention. Falls back to mockDetection
  on any load/inference failure so the app never breaks.
- Align preprocessing input size to 256x256 to match the Python
  MobileNetV2 export.

Scanner UX
- Preload the TFLite model on Scanner mount to avoid the ~1-2s decode hit
  on first capture
- Add a flip-front/back camera control with a toast warning that the rear
  camera gives better results
- Show a full-screen analyzing skeleton overlay while inference runs
- Memoize ConfidenceMeter color into a single computed value

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-01 11:31:17 +02:00
Yanis 6232068208 chore(ml,android): retire react-native-fast-tflite + nitro, mock JS only
Contexte
- Build Android C++ instable sur Windows (CMake/Ninja path too long, Nitro
  headers manquants au clean). Modèle .tflite final pas encore prêt.
- Désinstall temporaire des deux libs natives, le mock JS dans model.ts
  continue de servir les détections simulées pondérées.

Changements
- package.json : retire react-native-fast-tflite (3.0.1)
- pnpm-lock.yaml : régénéré, -72 packages dont nitro-modules
- src/services/tflite/model.ts : refactor pur mock, interface publique
  inchangée (loadModel + runInference), procédure de réintégration
  documentée en tête du fichier
- plugins/withCmakeFix.js : plugin Expo config qui injecte les flags
  CMake (response files + ninja 1.12.1 + OBJECT_PATH_MAX) à chaque
  prebuild — dormant tant que fast-tflite n'est pas réintégré
- app.json : référence le plugin
- CLAUDE.md + .claude/notes/android-build : doc de l'état actuel et
  des étapes de réintégration (idéalement via EAS Build)

Reste
- src/assets/models/grapevine_v1.tflite conservé pour la réintégration
- metro.config.js continue de déclarer .tflite dans assetExts
- TypeScript check: 1 erreur préexistante (homeheader.tsx, palette[50]),
  non liée à ce changement

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 21:14:38 +02:00
Yanis a8b84472e6 feat(mobile): UI overhaul + ML pipeline + Android build fixes
UI/screens
- Refonte ProfileScreen, SettingsScreen, ResultScreen, ScanDetailScreen,
  GuidesScreen, MapScreen, MyPlantsScreen
- Nouveaux composants : LargeDiseaseCard, ConfidenceTile, StatusTag,
  EditProfileModal, HeaderActionButtons
- useUserProfile hook + types/user.ts pour le profil utilisateur
- i18n FR/EN enrichi pour les nouveaux écrans

ML
- src/services/ml/classes.ts (mapping ML → slugs Prisma)
- src/services/ml/preprocessing.ts (resize 224x224 + decode JPEG + norm /255)
- model.ts adapté + fallback mock quand le module natif est absent

Build Android (notes)
- .claude/notes/android-build/README.md : fixes CMake/Ninja "path too long"
  (response files + ninja 1.12.1 + CMAKE_OBJECT_PATH_MAX=1024)
- Note du blocage Nitro Modules headers + pistes (EAS Build, inférence
  serveur, fallback Expo Go mock)
- ⚠️ Le bloc externalNativeBuild dans android/app/build.gradle n'est pas
  versionné (android/ gitignored par expo prebuild) — à porter dans un
  plugin Expo config si on garde fast-tflite local

Admin
- vineye-admin/prisma/seed.ts : seed mock pour tester la Map sans scanner

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 21:00:03 +02:00
Yanis 08c4eba940 chore(deps,infra): pnpm hoisted mode + dependency cleanup for Map rebuild
- Add VinEye/.npmrc with node-linker=hoisted to avoid Windows MAX_PATH
  crashes with .pnpm/<hash>/ deep paths during native compilation
- Replace react-native-maps (Google Maps SDK requires API key) with
  react-native-webview (renders Leaflet + OSM tiles, no key needed)
- Add expo-location for GPS capture during scans
- Add expo-dev-client for proper HMR + deep-link launch in dev builds
- Configure expo-location plugin in app.json with FR permission strings

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 12:31:39 +02:00
Yanis a964cc3836 add VinEye frontend app + fix hardcoded paths + gitignore
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 10:30:05 +02:00