Skip to content

RuiKurumi/Agrismart

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

54 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧅 AgriSmart

A Decision Support System (DSS) for Filipino onion farmers, combining real-time weather data, AI-powered advisory, and farm management tools into a mobile-first platform. Following the Agile Development model, this repository is a representation of our progress in our Capstone Project.


📱 Overview

AgriSmart is a Flutter mobile application paired with a Next.js admin panel, designed to help smallholder onion farmers in the Philippines make better farming decisions. The app provides weather-based alerts, crop growth tracking, and an AI chatbot assistant named Maya that works both online and offline.


AgriSmart applies a Knowledge-Driven DSS with Data-Driven elements. The Knowledge-driven aspect is powered by the AI Component to advise farmers on best practices. Additionally, the Data-Driven aspect comes from quantitative and historical data including weather forecasting data, growth stage calculations and alert thresholds that drive automated recommendations.

AgriSmart goes beyond a simple AI-based Chatbot/Assistant because it supports structured decision-making at multiple levels — automated weather-based alerts for immediate decisions, growth stage tracking for tactical decisions, and AI-generated farm-specific guides for strategic decisions. The system augments farmer judgment rather than replacing it, which is the defining characteristic of DSS.

Furthermore, we followed the Sprague and Carlson three-component model — data management through Firebase and Open-Meteo, model management through our rule-based alert engine and LLM integration, and user interface through the Flutter mobile app and Next.js admin panel. We also incorporated elements of Turban's DSS architecture by separating the knowledge base from the inference engine.

DSS Component Implementation
Data Management Firebase Firestore (farm data, alerts, articles), Open-Meteo API (weather), SharedPreferences (local cache)
Model Management Rule-based alert engine, Groq LLM (llama-3.3-70b), Qwen2.5 0.5B offline model
User Interface Flutter mobile app + Next.js admin panel

🏗️ Project Structure

Agrismart/
├── agrismart_dev2/        # Flutter mobile app
└── Agrismart-ADMIN/       # Next.js admin panel

✨ Features

Mobile App (Flutter)

  • Authentication
    • Allows Authentication through:
      • Email/password and
      • Google Sign-In
      • Phone (OTP) or
      • Guest access
  • Farm Onboarding
    • Set up:
      • Farm size
      • Irrigation type
      • Onion variety
      • Date of Planting
      • Date of Sowing
      • Geolocation
  • Farm Management
    • Allow End Users to:
      • Add
      • Edit
      • Delete
        multiple fields with growth stage tracking
  • Home Dashboard
    • Provides:
      • Real-time weather
      • Auto-generated alerts and Articles
      • 5-day forecast
  • Maya AI Chatbot
    • Powered by GROQ API, LLaMA 3.3 70B Versatile (online) with a downloadable Qwen 2.5 0.5B Instruct (offline)
  • Localization
    • English and Filipino (Tagalog) Localization Support (More localization per update)
  • Dark Mode
    • Full app-wide dark theme support
  • Profile Management
    • Rudimentary Photo upload, Set-up of province/municipality, bio and username.

Admin Panel (Next.js)

  • Dashboard
    • Real-time Aggregate stats, user growth chart, fields by variety chart
  • User Management
    • View, search, promote/demote admin roles, delete users
  • Alerts
    • Create, toggle, and delete global weather alerts
  • Weather Monitor
    • Fetch live weather for any Philippine province with agricultural advisory
  • Articles & Guides
    • Create and publish farming guides visible in the app
  • Farm Fields
    • View all registered fields across all users with growth stage tracking

🛠️ Tech Stack

Layer Technology
Mobile Flutter 3.41+ / Dart
Admin Panel Next.js 14 (App Router) / TypeScript
Backend Firebase (Auth, Firestore, Storage)
AI (Online) GROQ API - LLaMa 3.3 70B Versatile
AI (Offline) llama_flutter_android - Qwen2.5 0.5B
Weather Open-Meteo API
Mapping MapLibre
Geolocation Service Flutter Geolocator
Styling (Admin) Tailwind CSS
Charts Recharts

🚀 Getting Started

Mobile App

Prerequisites:

  • Flutter 3.41+
  • Android SDK 26+
  • Firebase project with Android app registered

Prerequisites:

  • Node.js 18+
  • Firebase project with Web app registered

🌾 Onion Growth Stages

AgriSmart automatically calculates the crop growth stage based on days after planting (DAP):

Stage Days After Planting
Germination 0 – 14 DAP
Seedling 15 – 30 DAP
Vegetative 31 – 60 DAP
Bulbing 61 – 90 DAP
Maturation 91 – 110 DAP
Ready for Harvest 111+ DAP

🤖 Maya — AI Agricultural Assistant

Maya is AgriSmart's built-in AI assistant specialized in Philippine onion farming. She automatically switches between:

  • Online mode — LLaMa 3.3 70B Versatile via API
  • Offline mode — Local GGUF model via llama_flutter_android
  • Force offline — Manual override in Advanced Settings

🌦️ Weather Alerts

The app auto-generates alerts based on real-time weather data:

Alert Trigger Condition
🌧 Heavy Rain Precipitation > 10mm
🌀 Strong Winds Wind speed > 60 km/h
🌡 Extreme Heat Temperature > 38°C
💧 High Humidity Humidity > 85%
☀️ Drought Risk No rain forecast + humidity < 40%

📦 Key Dependencies

Flutter

firebase_core, firebase_auth, cloud_firestore, firebase_storage
google_sign_in, google_generative_ai
llama_flutter_android, connectivity_plus
image_picker, http, flutter_dotenv
flutter_localizations, intl

Next.js

"firebase", "recharts", "lucide-react", "tailwindcss"

📄 License

This project is developed as part of an academic requirement. All rights reserved.


Built for Filipino farmers.

About

No description, website, or topics provided.

Resources

License

Stars

1 star

Watchers

1 watching

Forks

Packages

 
 
 

Contributors