AgriSense is an application designed to provide tools and insights for agricultural management. It includes features for crop recommendations, visualization of agricultural data, and processing of various datasets relevant to farming.
- Crop Recommendation: Provides recommendations based on specific parameters.
- Fertiliser Recommendation: Provides fertiliser recommendation based on specific parameters.
- Crop Production Mapping: Visualizes crop production data geographically.
- Centre Pivot Visualization: Displays visualizations related to centre pivot irrigation systems.
- Data Processing Scripts: Includes scripts for converting and processing agricultural datasets.
- React
- TypeScript
- MapLibre GL JS
- React LeafletQ
- ONNX Runtime Web
- Convex (for backend/database)
- Firebase (for authentication/services)
- Bun/Yarn/npm (package management)
To set up the project locally, follow these steps:
- Prerequisites: Ensure you have Node.js and a package manager (Bun, Yarn, or npm) installed.
- Clone the repository:
git clone <repository_url> cd AgriSense
- Install dependencies: Navigate into the
agrisensesubdirectory and install the project dependencies.cd agrisense bun install # or yarn install or npm install
- Environment Variables: Create a
.env.localfile in theagrisensedirectory by copying the.env.examplefile. Update the variables with your specific configurations (e.g., Firebase credentials, Convex deployment URL).cp .env.example .env.local
- Convex Setup: If you are using Convex, set up your Convex project and link it to your local environment. Refer to the Convex documentation for detailed steps.
- Firebase Setup: If you are using Firebase, set up your Firebase project and configure the application with your project credentials. Refer to the Firebase documentation for detailed steps.
The main parts of the project are organized as follows:
agrisense/src/: Contains the main application source code (React components, pages, hooks, etc.).agrisense/public/: Static assets, including ONNX models, GeoJSON data, and images.agrisense/scripts/: Node.js scripts used for data conversion and processing.agrisense/convex/: Convex backend code (functions, schema).
After completing the setup, you can run the application in development mode from the agrisense subdirectory:
cd agrisense
bun dev # or yarn dev or npm run devThis will start a local development server, and the application should be accessible in your web browser.
The project utilizes various processes, including:
- Data Conversion: Scripts in the
scripts/directory are used to convert raw data into formats suitable for the application. - Model Inference: ONNX models located in the
public/directory are used for tasks like crop recommendations and fertilizer predictions, running directly in the browser using ONNX Runtime Web. - Backend Interaction: The application interacts with the Convex backend for data storage and server-side logic.
- Authentication: Firebase is used for user authentication.