Commit graph

19 commits

Author SHA1 Message Date
Yanis d30f4f250c feat(map): rebuild Map screen on WebView+Leaflet with scan markers
Replace the Google-Maps-backed react-native-maps screen with a self-
contained WebView running Leaflet + Carto/OSM tiles. No API key, no
native compilation surface. The map is now driven by the real scan
history (useHistory) instead of mock parcels.

What's on the screen now:
- Markers for every ScanRecord that carries lat/lng, colored by
  status (healthy / infected / uncertain) derived from diseaseClass.
- Tapping a marker animates the camera and opens ScanDetail.
- Bottom sheet lists the same located scans with rename support: a
  pencil opens a modal-input that calls renameScan() to set
  ScanRecord.customName (empty value clears it). When the history is
  empty the sheet auto-snaps higher and shows a CTA to the Scanner.
- Region chips (Bordeaux/Bourgogne/Champagne) animate the camera and
  draw the actual department polygon as a dashed green outline. The
  GeoJSON is fetched on the React Native side (avoids the opaque
  origin CORS issue inside `source={{ html }}`) and cached in a
  useRef Map.
- "Ma position" filter + Locate FAB drop a circular green pin with a
  smiley SVG and a pulse halo at the user's GPS coords.
- FloatingActions and FloatingSearch tags restyled to match the
  Apple-inspired Bento spec (rounded-full FABs, 56x56, soft shadows,
  primary[900] active state).

VineyardMarker (orphan since markers are SVG inside the WebView) and
the data/mockScans.ts file were removed.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 12:32:14 +02:00
Yanis 3be2d3b531 feat(scan): persist GPS coordinates with each scan
Capture the user's location in parallel with TFLite inference so saving
the scan doesn't slow down the camera flow. Permission is requested
just-in-time on the first capture (not at app boot) and refusals are
surfaced once via toast — repeat refusals stay silent (flag persisted
in AsyncStorage under @vineye:location-permission-asked).

- ScanRecord gains optional latitude / longitude / locationCapturedAt
  (plus customName + getScanStatus helper used by the Map screen).
  All fields optional so older scans keep working unchanged.
- New useScanLocation hook: requestForegroundPermissionsAsync +
  getCurrentPositionAsync(Balanced) with a 5s timeout. On any failure
  returns null so the scan still saves without coordinates.
- ScannerScreen runs analyze() and requestAndGetLocation() through
  Promise.all so GPS acquisition does not block inference.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-30 12:31:54 +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 bf1a1bba13 merge: integrate ML model 0.99 acc + docs into mobile/admin branch 2026-04-29 21:45:01 +02:00
jhodi.avizara 283a745568 modif readme 2026-04-14 18:42:29 +02:00
jhodi.avizara 4faba481dc maj 0.99 acc 2026-04-14 18:38:32 +02:00
jhodi.avizara a8cd5ad450 maj 0.99 acc 2026-04-14 18:24:32 +02:00
Yanis 720dd34fdd add MyPlantsScreen + ScanDetailScreen + enriched admin + API mobile + project summary
Mobile:
- Replace LibraryScreen with MyPlantsScreen (date-grouped scan list, swipe actions, search, pull-to-refresh)
- Add ScanDetailScreen (immersive hero, confidence bar, cepage card, share/delete)
- Add DiseaseDetailScreen + GuideDetailScreen (hero pattern, animated entry)
- Add useScanDetail, useHistory (useCallback fix), dateGrouping utility
- Connect diseases/guides to admin API with cache + offline fallback
- Add NetworkContext, ToastContext, Skeleton loading components
- Extend ScanRecord type (isFavorite, location)
- Full i18n FR/EN for all new screens

Admin (vineye-admin):
- Enrich Disease/Guide Prisma schema (timeline, conditions, actions, sections)
- Enriched disease-form (7 sections) + guide-form (structured sections editor)
- Add mobile public API endpoints (diseases, guides by slug)
- Add Prisma migration + enriched seed data
- UI polish: sidebar, login, layout updates

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-09 03:19:39 +02:00
Yanis fe70005a86 add vineye-admin dashboard (Next.js)
Admin panel for VinEye with dashboard, users, diseases, guides, alerts management.
Stack: Next.js App Router + Prisma + PostgreSQL + better-auth.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 11:22:01 +02:00
Yanis 269cc55c77 update home UI tweaks + add tab labels + vineye-admin setup + gitignore
- SearchHeader: settings icon, smaller brand title, rounded buttons
- BottomTabNavigator: re-enable tab labels, adjust FAB offset
- homeheader: remove bottom margin
- Add .claude config, root package.json, updated .gitignore

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 11:20:51 +02:00
Yanis af299e816a add new screens + home components + replace colors with theme tokens
New screens: Guides, Library, Map, Notifications, Settings.
Home refactored with modular components (SearchHeader, HomeCta, FrequentDiseases, SeasonAlert, PracticalGuides).
Replaced hardcoded colors with theme tokens in SeasonAlert and HomeCta.
Updated navigation, i18n, and CLAUDE.md.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 22:05:19 +02:00
Yanis 001658898e refactor navigation: classic bottom tab bar with FAB + header icons
- Replace floating pill tab bar with classic anchored bottom bar (Home | FAB Scan | Map)
- Add central FAB button (green, elevated) for Scanner
- Move History → Notifications and Profile → Settings (accessible via header icons)
- Add SearchHeader with bell (notifications) and settings icons
- Add MapScreen placeholder
- Extract SearchHeader component from HomeScreen
- Switch to lucide-react-native icons for bottom tab bar
- Fix react-dom version mismatch (19.2.4 → 19.1.0)
- Clean up unused imports in homeheader.tsx
- Update navigation types, deep links, and i18n keys

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 20:14:27 +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
jhodi.avizara bb9df73b5f update 2026-03-23 16:49:29 +01:00
jhodi.avizara 26b13a424e update 2026-03-23 16:45:09 +01:00
jhodi.avizara 4e276c16ca update 2026-03-23 16:39:14 +01:00
jhodi.avizara a452705c36 maj 2026-03-23 00:57:43 +01:00
jhodi.avizara 5dd5b93f9f maj 2026-03-23 00:53:40 +01:00
jhodi.avizara c7a7f46865 first commit 2026-03-23 00:36:57 +01:00