How loghadharshanndevarasu/kisan-direct works
KisanDirect is a farm-to-consumer marketplace for loose regional produce, with farmer tools and delivery transparency. The main customer journey is browsing produce, assembling a cart, selecting a doorstep location, and following delivery through arrival inspection; the app is the coordinating UI. Farmer earnings and tax reporting, platform revenue and local advertising, agricultural policy analysis, provenance chat, and PWA support are distinct product branches. README capabilities are included where their implementation was not sampled; those links reflect documented behavior, not verified call wiring. Data is mock-backed, and the sampled server exposes chat and policy endpoints.
Main entry points: App.tsx App coordinator · server.ts API server · ConsumerMarketplace.tsx Consumer marketplace · FarmerDashboard.tsx Farmer dashboard
Components 19
Marketplace and delivery
- Consumer marketplace
src/components/ConsumerMarketplace.tsx - Cart modal
src/components/CartModal.tsx - Address picker
src/components/MapLocationPicker.tsx - Delivery tracking
src/components/DeliveryTrackingModal.tsx - Doorstep inspection
src/components/DoorstepInspectionModal.tsx - Notifications
src/components/NotificationModal.tsx
Farmer and platform tools
- Farmer dashboard
src/components/FarmerDashboard.tsx - Platform revenue
src/components/PlatformRevenueManager.tsx - Local ad banner
src/components/LocalAdBanner.tsx
Transparency and policy
- Provenance chatbot
src/components/ProvenanceChatbot.tsx - Policy dashboard
src/components/AgriPolicyDashboard.tsx
App and runtime
- App coordinator
src/App.tsx - Produce catalog data
src/data/mockAgriData.ts - API server
server.ts - Service worker
public/sw.js - Install prompt
src/components/MobileInstallModal.tsx
Other components
- Consumer
- Farmer
- Gemini API
Connections 22
- Consumer → Consumer marketplace: browses
- Consumer marketplace → Produce catalog data: reads produce
- Consumer → Cart modal: manages cart
- Consumer → Address picker: sets address
- Consumer → Delivery tracking: tracks order
- Delivery tracking → Doorstep inspection: opens inspection
- Consumer → Notifications: views alerts
- Farmer → Farmer dashboard: manages harvest
- Farmer dashboard → Produce catalog data: uses produce data
- Farmer → Provenance chatbot: asks about batches
- Provenance chatbot → API server: posts chat
- API server → Gemini API: generates response
- App coordinator → Policy dashboard: renders policy tab
- Policy dashboard → API server: requests AI analysis
- API server → Gemini API: analyzes policy
- App coordinator → Platform revenue: renders platform tab
- App coordinator → Service worker: registers worker
- Consumer → Install prompt: requests install
- Install prompt → Service worker: uses PWA support
- App coordinator → Consumer marketplace: coordinates marketplace
- App coordinator → Farmer dashboard: coordinates farmer tools
- App coordinator → Local ad banner: renders ad placement