How yagnaakula229/herbvision works
HerbVision is a medicinal-plant identification web app. Users register or log in, then upload a plant image; the protected dashboard submits it for top-three classification, displays confidence and medicinal guidance, and refreshes per-user prediction history. The Flask backend handles authentication and prediction requests, runs image preprocessing and DenseNet inference, and persists results in SQLite. The graph follows the documented React-to-Flask workflow and sampled calls; unsampled behavior is represented only where README capabilities support it.
Main entry points: Dashboard.jsx Dashboard · app.py Flask API · api.js API client · App.jsx Protected routing
Components 17
React application
- App bootstrap
frontend/src/main.jsx - Protected routing
frontend/src/App.jsx - API client
frontend/src/api.js - Dashboard
frontend/src/pages/Dashboard.jsx - Navigation
frontend/src/components/Navbar.jsx - Image upload
frontend/src/components/ImageUpload.jsx - Results display
frontend/src/components/ResultCard.jsx
Identity and access
- Login form
frontend/src/pages/Login.jsx - Registration form
frontend/src/pages/Register.jsx - Flask API
backend/app.py - Authentication
backend/app.py
Plant classification
- Image inference
backend/app.py - Plant guidance
backend/plant_tips.py
Prediction persistence
- User records
backend/models.py - Prediction records
backend/models.py - SQLite database
backend/app.py
Other components
- User
Connections 21
- User → App bootstrap: opens app
README.md - App bootstrap → Protected routing: renders
frontend/src/main.jsx - Protected routing → Login form: routes to
frontend/src/App.jsx - Protected routing → Registration form: routes to
frontend/src/App.jsx - Protected routing → Dashboard: protects route
frontend/src/App.jsx - Login form → API client: submits credentials
frontend/src/pages/Login.jsx - Registration form → API client: submits credentials
frontend/src/pages/Register.jsx - API client → Flask API: sends requests
README.md - Dashboard → API client: requests history
frontend/src/pages/Dashboard.jsx - Dashboard → Navigation: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Image upload: renders
frontend/src/pages/Dashboard.jsx - Dashboard → Results display: renders results
frontend/src/pages/Dashboard.jsx - Image upload → Dashboard: submits file
frontend/src/components/ImageUpload.jsx - Dashboard → API client: submits image
frontend/src/pages/Dashboard.jsx - Flask API → Authentication: handles auth
backend/app.py - Flask API → Image inference: runs prediction
backend/app.py - Image inference → Plant guidance: looks up tips
backend/app.py - Flask API → User records: queries users
backend/app.py - Flask API → Prediction records: reads and writes
backend/app.py - User records → SQLite database: persists
backend/app.py - Prediction records → SQLite database: persists
backend/app.py