Agricultural decision-support project · 2025
FarmGenius
A React and FastAPI prototype that connects crop-image analysis, yield estimation, market views, multilingual assistance, voice controls, and micro-farm planning.
- Contribution
- Full-stack engineering · AI and data integration
- Build
- Hackathon prototype · 2025
The interface is live. Backend services are currently offline, so AI and data actions will not return live results.
I built FarmGenius as six connected farming tools: diagnose a crop, estimate yield, inspect market context, use voice or multilingual chat, and compare practical small-plot farming systems.
What a user can do
Every workflow below maps to a real React route and a corresponding backend service or endpoint in the repository.
Check a crop image
Upload a plant photo, validate its type and size, and receive Gemini-assisted observations with practical treatment guidance.
Estimate crop yield
Enter crop, land, season, soil, nutrient, rainfall, and optional map coordinates to calculate yield and field recommendations.
Compare market context
Filter and sort crop-price rows, open a crop trend view, review a market summary, and export the visible table as CSV.
Ask an agricultural assistant
Choose a specialist, continue a session in English, Hindi, or Marathi, and use speech capture or spoken-answer controls.
Plan a micro-farm
Combine plot, budget, soil, water, sunlight, labour, and risk inputs to compare systems, crops, resource use, and subsidies.
How the project is connected
Every farming request enters through a typed API contract, reaches one focused domain engine, and returns an explainable result to the interface.
Each route validates one farming task, then calls only the domain engine it needs.
Three examples show where AI, rules, and datasets enter the system.
- Image
- File checks
- Gemini Vision
- Actionable guidance
- Field inputs
- Pydantic model
- Rules + weather
- Explained estimate
- Constraints
- Dataset filters
- Compatibility score
- Top three systems
Deterministic yield and planning logic stays separate from Gemini. Market trends are prototype data, and in-memory agent context is not presented as durable production storage.
Engineering decisions
Task-specific API contracts
The backend does not send every request through one prompt. Image analysis, yield, market, voice, chat, and planning use separate endpoints and schemas.
AI only where it helps
Gemini handles image interpretation and natural-language guidance; repeatable calculations use rules, coefficients, and structured datasets.
Graceful external context
Weather and geocoding enrich yield results when credentials and coordinates are available, while the base estimate still has a deterministic path.
Explainable planning output
Micro-farm recommendations expose cost, ROI, payback, compatible crops, water, electricity, prices, and subsidies instead of one opaque score.
Tools used
Market trend history is simulated and some price data is curated for dependable demonstrations; agent context is kept in memory; the current micro-farm endpoint falls back to payback-based ROI when its runtime inputs do not match the saved model metadata. Gemini, weather, maps, and advanced speech paths require external credentials. These are presented as prototype boundaries, not production claims.
