AgriSmart Kerala is a state-of-the-art, AI-powered agricultural management platform designed to empower farmers with real-time weather analytics, soil health optimization, crop growth lifecycle forecasting, market price predictions, dynamic financial ROI tracking, and algorithmic problem-solving tools.
- Real-Time Environmental Metrics: Tracks Temperature (28°C, feels like 31°C), Humidity (75%), Wind Speed (12 km/h), and Daily Rainfall (2mm).
- Automated Weather Alerts: Detects incoming severe weather (e.g., heavy rainfall warnings) and suggests actionable field precautions.
- 7-Day Interactive Forecast: Dual line charts powered by Recharts comparing temperature and humidity trends over 7 days.
- 6-Month Climate Planning: Bar charts plotting long-term monthly temperature averages against expected rainfall to help schedule planting cycles.
- Actionable Farming Recommendations: Weekly and monthly localized advice for field management and irrigation adjustments.
- Soil Health Index: Computes an overall soil health rating (e.g., 85% Excellent), pH level balance (6.5 Optimal), and organic matter percentage (3.2%).
- NPK Monitoring & Visual Breakdown: Detailed progress indicators and status badges for Nitrogen (75%), Phosphorus (68%), and Potassium (82%) with interactive NPK distribution pie charts.
- Fertilizer Application Logging: Interactive form allowing farmers to record Nitrogen, Phosphorus, and Potassium inputs (kg/acre) along with application dates.
- Historical Usage & Nutrient Trends: 5-month historical bar charts of fertilizer applications alongside 5-month line charts tracking soil nutrient recovery.
- AI Recommendation Engine: Smart warning system suggesting specific fertilizer applications (e.g., phosphate supplementation) based on soil deficiencies.
- Multi-Crop Management Cards: Tracks individual crops (Rice - Jyothi variety, Coconut - Dwarf Green, Pepper - Panniyur-1) with progress bars, land area details, and health indicators.
- Growth Stage Tracker: Interactive timeline tracking stages (Germination → Seedling → Vegetative → Flowering → Grain Filling → Maturity) calculating exact days from planting.
- AI Yield Forecasting: Recharts area charts comparing predicted vs. actual yield percentages with estimated harvest dates (e.g., Dec 15) and AI confidence scores (95%).
- Crop Care & Pest Control: Dedicated recommendations for irrigation adjustments, pest management (brown planthopper, stem borer, neem oil treatments), and nutrient application splits.
- Care Calendar Agenda: Scheduled task list for upcoming field activities (fertilizer application, pest checks, deep watering sessions).
- Real-Time Commodity Tracking: Live pricing metrics for regional crops (Rice at ₹3,800/quintal, Coconut at ₹42/piece, Pepper at ₹820/kg) with monthly percentage growth indicators.
- AI Optimal Selling Time Alert: Evaluates price forecast curves to alert farmers to peak demand periods (e.g., holding harvest until January for 10-15% higher returns).
- Historical & Forecast Trends: 10-month historical line charts and 6-month AI-predicted price trend forecasts.
- Financial Profit Analyzer: Detailed table calculating total investment, revenue, net profit, and ROI % for each crop.
- Financial Summary Metrics: High-level overview displaying Total Investment (₹1,05,000), Total Revenue (₹1,90,000), Net Profit (₹85,000), and Average ROI (81%).
- Algorithmic Resource Optimizer: Built-in dynamic programming engine with memoization (
solveFrankensteinProblem) that solves ingredient/potion crafting dependency graphs. - Custom Input & Target Resolver: Parses recipe statements (
potion = ingredient1 + ingredient2) and calculates the minimum magical orbs/resources required to craft a target potion. - Step-by-Step Explanation Generator: Generates human-readable step-by-step crafting breakdowns and mathematical explanations.
- Interactive Challenge Library: Presets across Easy, Medium, and Hard difficulty levels offering point rewards (+50, +100, +200 points).
- Educational Concepts: Teaches dynamic programming, graph theory, memoization, and their direct applications to real-world agricultural supply chains and crop rotation planning.
- Farmer Profile Dashboard: Displays user details (Ravi Kumar, Kottayam, Kerala), land size (4.0 acres), farming experience (12 years), and rank ("Advanced Farmer").
- Interactive Profile Editing: Live toggle mode allowing users to edit personal, contact, and land information.
- Achievement & Rewards System: 8 milestone badges (First Harvest, Soil Master, Weather Warrior, Profit Maximizer, Problem Solver, etc.) categorized by Earned vs. Locked.
- Environmental Impact Metrics: Tracks sustainability achievements including Carbon Saved (2.4 tons CO2) and Water Saved (15,000 L).
c:\hackathons\sih\agri smart\
├── Agri-Smart/
│ ├── README.md # Main project documentation
│ └── HACKATHON/
│ ├── wiki.md # Hackathon specification & problem statement
│ └── shadcn-ui/ # Main Web Application Source
│ ├── index.html # HTML Entry Point
│ ├── package.json # NPM Dependencies & Scripts
│ ├── tsconfig.json # TypeScript Base Configuration
│ ├── tsconfig.app.json # TypeScript App Configuration
│ ├── vite.config.ts # Vite Build & Path Alias Config
│ ├── tailwind.config.ts # Tailwind CSS Custom Configuration
│ ├── postcss.config.js # PostCSS Configuration
│ ├── eslint.config.js # ESLint Configuration
│ ├── public/ # Static Assets & Icons
│ └── src/
│ ├── main.tsx # Application Entrypoint
│ ├── App.tsx # App Router & Provider Setup
│ ├── App.css # Base App Styles
│ ├── index.css # Global Tailwind Styles & Theme Tokens
│ ├── vite-env.d.ts # Vite Environment Declarations
│ ├── lib/
│ │ ├── utils.ts # Classnames utility (clsx + tailwind-merge)
│ │ └── algorithms.ts # Core Dynamic Programming & Agri Math Engine
│ ├── hooks/
│ │ ├── use-mobile.tsx # Responsive Mobile Screen Hook
│ │ └── use-toast.ts # Toast Notification State Hook
│ ├── pages/
│ │ ├── Index.tsx # Main Application Hub & Tab Container
│ │ └── NotFound.tsx # 404 Fallback Page
│ └── components/
│ ├── WeatherDashboard.tsx # Weather & Climate Module
│ ├── SoilFertility.tsx # Soil Health & NPK Module
│ ├── CropGrowth.tsx # Crop Lifecycle & Yield Module
│ ├── MarketAnalysis.tsx # Commodity Prices & ROI Module
│ ├── FrankensteinSolver.tsx# Algorithmic Puzzle Solver
│ ├── UserProfile.tsx # User Profile & Gamification Module
│ └── ui/ # 49 Pre-built Shadcn UI primitives:
│ ├── card.tsx, tabs.tsx, button.tsx, badge.tsx,
│ ├── alert.tsx, progress.tsx, avatar.tsx, input.tsx,
│ ├── textarea.tsx, dialog.tsx, select.tsx, chart.tsx, etc.
| Layer | Technology | Purpose |
|---|---|---|
| Framework | React 19 | Frontend User Interface |
| Language | TypeScript 5.5 | Type Safety & Developer Experience |
| Build Tool | Vite 5.4 | Lightning Fast HMR & Bundling |
| Styling | Tailwind CSS 3.4 | Responsive Utility-First Styling |
| UI Components | Shadcn UI / Radix UI | Accessible Component Primitives |
| Data Visualization | Recharts 2.15 | Interactive Responsive Charts |
| Icons | Lucide React | Modern Crisp Vector Icons |
| State & Query | @tanstack/react-query 5.56 | Async Data & State Management |
| Routing | React Router DOM 6.26 | Client-Side Page Routing |
| Notifications | Sonner | Toast Notifications |
- Node.js: v18.0.0 or higher
- npm: v9.0.0 or higher
-
Navigate to the Application Directory:
cd "HACKATHON/shadcn-ui"
-
Install Dependencies:
npm install
-
Start Development Server:
npm run dev
Open your browser at
http://localhost:5173/(or port indicated in terminal output). -
Run TypeScript Type Check:
npx tsc --noEmit
-
Run Linter:
npm run lint
-
Build for Production:
npm run build
Production-ready bundle will be generated in
dist/.
- Main Repo: https://github.com/Rama542/Agri-Smart.git
- Parent Repo: https://github.com/Rama542/AGRI--SMART.git
Distributed under the MIT License. See LICENSE for details.