Efficient transportation of fruits and vegetables is crucial for proper storage, handling, and distribution directly influencing their quality, shelf life, and ultimately the price. Maintaining optimal storage conditions during the transport of fruits and vegetables is of utmost importance to preserve their freshness and quality. Therefore, there is a pressing need for a real-time assessment system that can ensure the highest quality and safety of fruits and vegetables throughout the supply chain network. This paper introduces an Internet of Things (IoT)-enabled sensor network designed to address these challenges. The sensors are strategically deployed within the storage containers that continuously assessing real-time critical environmental parameters, such as temperature, humidity, pH, and air quality. These parameters significantly affect the storage of fruits and vegetables throughout the supply chain network. Furthermore, we have employed machine learning algorithms, such as decision trees, k-nearest neighbors, logistic regression, and Support Vector Machine, to measure performance in terms of accuracy, F1-score, precision, sensitivity, and specificity. The results indicate that the Support Vector Machine algorithm outperforms with the other algorithms with an impressive accuracy of 98.05%. Future research endeavors will focus on optimizing food supply chain loss.