How samalavenkatesh/farmer-frontend works
This is a React frontend for a farmer–buyer marketplace. Users enter through routed public pages, register or log in, browse products, and access role-specific dashboards; product details support purchasing, while dashboards support order, product, review, and sales tasks. The graph focuses on these documented capabilities and the internal routing, authentication, and presentation layers. Backend behavior is not mapped because the sampled evidence does not establish its interfaces broadly.
Main entry points: App.jsx Router and pages · utils.js Toast feedback · AuthContext.jsx Auth context · HomeContent.jsx Home content
Components 20
App shell
- Router and pages
src/App.jsx - Navigation
src/components/NavBar.jsx - Home content
src/components/HomeContent.jsx - Services
src/components/ServicesPage.jsx - Contacts
src/components/Contacts.jsx - Toast feedback
src/utils.js - Landing page
src/components/LandingPage.jsx
Identity
- Auth context
src/components/AuthContext.jsx - Registration
src/components/Register.jsx - Login
src/components/Login.jsx - Profile
src/components/Profile.jsx
Marketplace
- Buyer entry
src/components/Buyer.jsx - Product shop
src/components/ShopComponent.jsx - Product card
src/components/ProductCard.jsx - Product details
src/components/ProductDetails.jsx
Role operations
- Buyer dashboard
src/components/BuyerDashboard.jsx - Farmer entry
src/components/Farmer.jsx - Farmer dashboard
src/components/FarmerDashboard.jsx - Product form
src/components/AddProductForm.jsx
Other components
- Visitor
Connections 26
- Visitor → Router and pages: opens
- Router and pages → Navigation: routes through
src/App.jsx - Router and pages → Home content: routes to
src/App.jsx - Router and pages → Services: routes to
src/App.jsx - Router and pages → Contacts: routes to
src/App.jsx - Router and pages → Registration: routes to
src/App.jsx - Router and pages → Login: routes to
src/App.jsx - Router and pages → Buyer dashboard: routes to
src/App.jsx - Router and pages → Farmer dashboard: routes to
src/App.jsx - Router and pages → Profile: routes to
src/App.jsx - Router and pages → Product details: routes to
src/App.jsx - Navigation → Auth context: reads state
src/components/NavBar.jsx - Home content → Auth context: reads state
src/components/HomeContent.jsx - Home content → Landing page: renders
src/components/HomeContent.jsx - Services → Auth context: reads state
src/components/ServicesPage.jsx - Registration → Toast feedback: shows feedback
src/components/Register.jsx - Login → Auth context: uses context
src/components/Login.jsx - Login → Toast feedback: shows feedback
src/components/Login.jsx - Buyer entry → Product shop: renders
src/components/Buyer.jsx - Product shop → Product card: renders
src/components/ShopComponent.jsx - Product card → Toast feedback: shows feedback
src/components/ProductCard.jsx - Product details → Toast feedback: shows feedback
src/components/ProductDetails.jsx - Product details → Buyer dashboard: navigates to
src/components/ProductDetails.jsx - Buyer dashboard → Toast feedback: shows feedback
src/components/BuyerDashboard.jsx - Farmer entry → Product form: renders
src/components/Farmer.jsx - Farmer dashboard → Toast feedback: shows feedback
src/components/FarmerDashboard.jsx