# AgroSmart: Enterprise Farm Management System 🌾🚜
**AgroSmart** is an advanced, enterprise-grade Full-Stack Farm Management System designed to transform traditional agriculture into a data-driven, intelligent ecosystem. Moving beyond a simple CRUD data repository, AgroSmart functions as an intelligent **Decision Support System (DSS)** that empowers farmers and agricultural enterprises to minimize resource waste, optimize crop lifecycles, and maximize overall profitability.
---
## 🚀 Key Modules & Architecture
### 1. Smart Crop Lifecycle Advisor & AI Resource Optimizer (Core Highlight)
This is the unique backbone of the system, elevating it to an advanced smart application through modern AI and integrations:
* **AI-Powered Assistance (Spring AI & Gemini):** Leverages cutting-edge Generative AI to provide smart recommendations, analyze crop diseases, and answer complex agricultural queries dynamically.
* **Dynamic Crop Calendar:** Automatically calculates and schedules crucial growth stages (e.g., precise days for fertilizing, pruning, and harvesting) the moment a specific crop is registered.
* **Weather-Aware Resource Management:** Integrates with the **OpenWeatherMap API** to fetch real-time data for regional agricultural hubs (e.g., Galle, Anuradhapura). Features an automated business logic matrix that halts scheduled irrigation/fertilization if heavy rain (>80% probability) is predicted, preventing chemical runoff.
* **Real-Time Profitability & Analytics:** Aggregates operational expenses against total sales metrics to compute exact net profit margins per crop, visualized through interactive data elements.
### 2. Multi-Entity Enterprise Management
Provides clean, structured RESTful endpoints for comprehensive farm operations:
* **Staff & Labor Allocation:** Manages profiles, roles, and daily duty assignments for field workers.
* **Vehicle & Equipment Tracking:** Tracks operational readiness, maintenance schedules, and deployments.
* **Inventory & Logs:** Monit …