About
## The problem it solves
AGRIPrice is a mandi price comparison dashboard designed to help farmers make more informed selling decisions. It lets users compare crop prices across wholesale markets, identify price differences, explore market trends, and set target-price alerts—all in one place.
## Features
- **Price Comparison:** browse mandi price records for 19 crop varieties across 12 markets in 6 states. Filter by category (cereals, vegetables, fruits, pulses, oilseeds, commercial), filter by state, sort by price, name or arrival volume, and switch between card and table views.
- **3-Mandi Arbitrage Analysis:** click any crop to compare its price across three nearby mandis and see the potential extra earnings for a given load.
- **Trends & AI Insights:** a price trend chart drawn on an HTML canvas, plus a market signal panel with a recommended action and target price.
- **Price Alerts:** create and delete alerts that trigger when a crop's price rises above or drops below a target.
- **Farmer Profile:** farm details, notification channel preferences and a mandi watchlist.
- **System Status:** a data provider toggle (demo data vs. an AGMARKNET mode that falls back to demo data) and a mock sync log.
- **Responsive layout** with a separate mobile navigation bar.
## Challenges we ran into
## Challenges We Ran Into
The biggest challenge was data. Real mandi prices come from data.gov.in / AGMARKNET, which needs an API key and a backend, and we didn't have either. We built a simulated data layer with a provider toggle and a demo fallback, so the interface works today and can switch to real data later. The trade-off is that everything on screen is still demo data, and we are upfront about that in this README.
A second challenge was making price comparison useful rather than just a table. A farmer cares about what is left after transport, not the raw numbers, so the 3-mandi arbitrage view compares nearby markets and shows the extra earnings for a given load.
On the technical side, we drew the price trend chart on a raw HTML canvas with no charting library. That meant scaling values to the canvas size, drawing grid lines by hand and filling the area under the line with a gradient ourselves. We also built the whole app without a framework, so filters, sorting, card and table views, alerts and tab switching all run on vanilla JavaScript. Keeping the interface in sync meant re-rendering the right sections after every change, and re-initializing the Lucide icons each time we injected new HTML, since dynamically added icons don't appear on their own.
Bugs and loose ends came up too. The profile avatar originally loaded a photo from an external image host, which made the page depend on a third-party link and slowed loading, so we replaced it with a built-in icon. State is held in memory only, so alerts reset on refresh, and the profile save button only shows a confirmation toast for now. The Tailwind CDN build we use is meant for prototyping, not production. We also had to re-deploy after late edits, because the live site kept showing the older version until the latest file was uploaded.
Finally, we had to keep the dashboard usable on both desktop and mobile, with a separate mobile navigation bar, and make sure the glass-effect cards stayed readable over the farm-themed background.
Team
From the public Devfolio project page. Votes, swipes and the judge score are hackfeed's own.





