## 2 Materials and Methods
### Web-Based Platform
#### 2.2.2 Structure  
The web platform's structure was carefully designed to accommodate the specific aforementioned functionalities. The implemented design, illustrated in Figure 5, provides a comprehensive framework for seamless user interaction. Upon accessing the platform, users are presented with the landing page, which serves as an informative gateway, offering an overview of the system's functionality and purpose. Once users successfully log in, they gain access to the main menu, which acts as a central hub for navigating through different sections tailored to their needs. The current data section offers users a real-time visualization of the stevia crop field through an interactive map. Active elements, represented by sensor nodes, are displayed on the map. By hovering the cursor over or tapping on a node icon, a pop-up window appears, providing detailed information about the node's parameters. Additionally, the window prominently showcases numeric values that convey the general quality of the stevia crop. In the historical data section, users are empowered to delve into the past performance of the stevia crop. This section features an insightful plot accompanied by a control menu. The control menu enables users to search and select specific date ranges and sensor nodes, facilitating the examination of the crop soil variables over time. The plot can be exported as a PNG file, granting users the ability to generate reports utilizing these valuable data. The plotting functionality leverages the Chart.js open-source library, seamlessly integrated through dynamic JavaScript implementation. By fetching data through query parameters passed as JSON strings to designated endpoints, the webpage dynamically updates the existing plot without requiring a full page reload. The export data section offers users the capability to extract and analyze data for further investigation. Using a menu similar to the historical data section, users can refine their data selection based on specific date ranges and sensor nodes. The chosen data are presented in a preview table on the website. JavaScript, employed for document object model (DOM) manipulation and HTTP requests to the platform's endpoints, facilitates the creation of a dynamic table, similar to the functionality provided in the historical data section. Figure 5: Web platform structure. The configuration section grants users the flexibility to update their account settings, including password and email information, providing them with autonomy over their profiles. The administration section is exclusively accessible to administrators, endowing them with privileged control and management capabilities. Within this section, administrators can create and configure sensor nodes, defining aliases, addresses, and coordinates for the map representation, and sensor types. Furthermore, administrators have the authority to disable sensor nodes as needed. Additionally, administrators possess the ability to add master nodes, which have assigned aliases and pass keys for enhanced application programming interface (API) security. The administration section also empowers administrators to create new user accounts, modify email addresses, reset passwords, disable accounts, and elevate user accounts to administrator status. The API section serves as a vital component within the web platform, catering exclusively to the WSN. Consequently, it incorporates specific endpoints designed to facilitate seamless communication and ensure optimal operation. To maintain robust security measures, the API endpoints implement validation mechanisms for HTTP verbs, ensuring that only authorized actions are executed. Furthermore, to safeguard sensitive data, the API mandates the use of HTTPS connections, boosting the platform's overall security posture. In line with best practices for web application security, all data transmitted via the API is thoroughly sanitized, significantly reducing the risk of potential attacks, such as SQL injections.