How lucasmonichonsmoove/flora-app works
Flora is a responsive plant-identification and care app. The main journey is photo upload → server-side Pl@ntNet identification → enriched result display, with signed-in users’ identifications saved to history. Separate branches support account access, favorites, plant search, and an owned collection with image uploads and watering tracking. The README documents the broader capabilities; some page and helper implementations were not sampled, so their internal links are shown only where supported by the README or source index.
Main entry points: favorites.ts Favorites, collection, history · supabase.ts Supabase client · page.tsx Identify plant · ResultCard.tsx Identification result
Components 26
Identification
- Identify plant
src/app/page.tsx - Photo upload
src/components/UploadZone.tsx - Identification API
src/app/api/identify/route.ts - Identification result
src/components/ResultCard.tsx
Plant management
- Plant collection
src/app/collection/page.tsx - Collection editor
src/components/CollectionPlantForm.tsx - Manual plant entry
src/components/ManualPlantForm.tsx - Plant search
src/components/PlantSearchInput.tsx - Plant search API
src/app/api/plants/search/route.ts - Plant image storage
src/lib/storage.ts
Accounts and records
- Identification history
src/app/history/page.tsx - Email sign-in
src/app/login/page.tsx - Account page
src/app/account/page.tsx - Navigation and session
src/components/Header.tsx - Favorites
src/app/favorites/page.tsx - Favorites, collection, history
src/lib/favorites.ts - Supabase client
src/lib/supabase.ts - Supabase database
supabase/schema.sql - Session refresh proxy
src/proxy.ts
Plant knowledge
- Care guide display
src/components/PlantCareCard.tsx - Care guidance
src/lib/plant-care.ts - Local plant data
src/data/plants.ts
Other components
- Plant enthusiast
- Pl@ntNet API
- Wikipedia
- Supabase Storage
Connections 31
- Plant enthusiast → Identify plant: starts identification
README.md - Identify plant → Photo upload: selects photo
src/app/page.tsx - Identify plant → Identification API: posts image
src/app/page.tsx - Identification API → Pl@ntNet API: requests identification
src/app/api/identify/route.ts - Identification API → Wikipedia: gets plant details
src/app/api/identify/route.ts - Identify plant → Identification result: renders result
src/app/page.tsx - Identification result → Care guide display: shows care
src/components/ResultCard.tsx - Care guide display → Care guidance: loads guidance
src/components/PlantCareCard.tsx - Identify plant → Identification history: saves identification
README.md - Plant enthusiast → Email sign-in: signs in
README.md - Email sign-in → Supabase client: authenticates
src/app/login/page.tsx - Navigation and session → Supabase client: reads session
src/components/Header.tsx - Session refresh proxy → Supabase client: refreshes session
README.md - Plant enthusiast → Favorites: views favorites
README.md - Identification result → Favorites, collection, history: adds favorite
src/components/ResultCard.tsx - Identification history → Favorites, collection, history: loads history
src/app/history/page.tsx - Favorites → Favorites, collection, history: loads favorites
src/app/favorites/page.tsx - Plant collection → Favorites, collection, history: loads and updates plants
src/app/collection/page.tsx - Plant collection → Collection editor: opens editor
src/app/collection/page.tsx - Plant enthusiast → Manual plant entry: adds plant
README.md - Manual plant entry → Plant search: searches suggestions
src/components/ManualPlantForm.tsx - Plant search → Favorites, collection, history: searches user plants
src/components/PlantSearchInput.tsx - Plant search → Local plant data: searches local data
src/components/PlantSearchInput.tsx - Plant search API → Wikipedia: searches plant topics
src/app/api/plants/search/route.ts - Favorites, collection, history → Supabase client: queries records
src/lib/favorites.ts - Supabase client → Supabase database: reads and writes
- Collection editor → Plant image storage: uploads images
src/components/CollectionPlantForm.tsx - Plant collection → Plant image storage: deletes images
src/app/collection/page.tsx - Plant image storage → Supabase client: uses client
src/lib/storage.ts - Plant image storage → Supabase Storage: stores images
README.md - Identification result → Collection editor: opens plant entry
README.md