How rahulchakamuri/travion-krishidirect works
KrishiDirect connects farmers, village agents and buyers through assisted produce selling, verified supply aggregation, ordering and delivery. The principal flow is farmer produce entry and fair pricing, agent verification and pooling, buyer matching and ordering, then agent dispatch and buyer OTP delivery confirmation with payment release. The React portals call a FastAPI backend, which applies role controls, pricing and order-state validation over a shared SQLAlchemy data store. The README documents the end-to-end flow; unsampled route details are represented only at their documented subsystem level.
Main entry points: api.js API Client · api.py FastAPI Routes · agent Agent Portal · buyer Buyer Portal
Components 19
Role Portals
- Farmer Portal
frontend/src/pages/farmer - Agent Portal
frontend/src/pages/agent - Buyer Portal
frontend/src/pages/buyer - Portal Access
frontend/src/auth.jsx - API Client
frontend/src/api.js
Supply Marketplace
- Produce & Pricing
frontend/src/pages/farmer/AddProduce.jsx - Produce Verification
frontend/src/pages/agent/Verification.jsx - Supply Matching
frontend/src/pages/agent/Matching.jsx - Buyer Search
frontend/src/pages/buyer/FindProduce.jsx
Order Fulfillment
- Order Management
frontend/src/pages/buyer/BuyerOrders.jsx - Logistics & Delivery
frontend/src/pages/agent/AgentLogistics.jsx
Platform Services
- FastAPI Routes
backend/app/api.py - Fair-Price Engine
backend/app/pricing.py - Role & Token Security
backend/app/security.py - Order State Machine
backend/app/state_machine.py - Domain Data Store
backend/app/models.py
Other components
- Farmer
- Village Agent
- Buyer
Connections 21
- Farmer → Farmer Portal: uses
README.md - Village Agent → Agent Portal: uses
README.md - Buyer → Buyer Portal: uses
README.md - Farmer Portal → Produce & Pricing: enters produce
README.md - Produce & Pricing → API Client: requests API
frontend/src/pages/farmer/AddProduce.jsx - Agent Portal → Produce Verification: reviews produce
README.md - Produce Verification → API Client: requests API
frontend/src/pages/agent/Verification.jsx - Agent Portal → Supply Matching: creates pools
README.md - Supply Matching → API Client: requests API
frontend/src/pages/agent/Matching.jsx - Buyer Portal → Buyer Search: searches supply
README.md - Buyer Search → API Client: requests API
frontend/src/pages/buyer/FindProduce.jsx - Buyer Portal → Order Management: places orders
README.md - Order Management → API Client: requests API
frontend/src/pages/buyer/BuyerOrders.jsx - Agent Portal → Logistics & Delivery: schedules pickup
README.md - Logistics & Delivery → API Client: requests API
frontend/src/pages/agent/AgentLogistics.jsx - API Client → FastAPI Routes: calls
- Portal Access → API Client: stores credentials
frontend/src/auth.jsx - FastAPI Routes → Fair-Price Engine: uses pricing
backend/app/api.py - FastAPI Routes → Role & Token Security: uses security
backend/app/api.py - FastAPI Routes → Order State Machine: validates transitions
backend/app/api.py - FastAPI Routes → Domain Data Store: reads and writes
backend/app/api.py