Submitted:
02 February 2026
Posted:
03 February 2026
You are already at the latest version
Abstract
Keywords:
1. Introduction
2. Materials and Methods
2.1. Farm Locations
2.2. Spectroscopy Analytical Techniques
- Use a grinder that produces a homogeneous particle size distribution.
- Avoid overheating during grinding to prevent the modification of volatile compounds.
- Sieve if necessary to standardize particle size.
- Store samples in airtight containers to prevent moisture absorption.
- Homogeneity reduces non-chemical spectral variability and improves the robustness of the models.
- Spectral preprocessing: This step involves applying mathematical transformations to the spectra such as Standard Normal Variate (SNV), Multiplicative Scatter Correction (MSC), Savitzky–Golay (SG) smoothing, and derivatives. These transformations reduce physical effects such as light scattering, particle size variability, and baseline shifts, while enhancing relevant chemical information.
- Dataset splitting: The data are divided into calibration and validation sets in order to objectively assess the model. Generally, calibration (≈70–80 %) and validation (≈20–30 %).
- Chemometric model construction: Models are developed to relate spectral information to the variables of interest, using Principal Component Analysis (PLS) for quantitative prediction and Partial Least Squares Discriminant Analysis (PLS-DA) for classification. The optimal number of latent variables is determined by cross-validation to balance model fit and robustness.
- Model validation: Testing the model against independent data to ensure it isn't overfitted. A suitable model shows consistent performance between calibration and validation.
- Performance evaluation: Model performance is assessed using appropriate statistical metrics. For prediction models, Coefficient of Determination (R²), Root Mean Square Error of Calibration (RMSEC), Root Mean Square Error of Prediction (RMSEP), and Residual Predictive Deviation (RPD). For classification models are evaluated using accuracy, sensitivity, specificity, and confusion matrices.
- Interpretation and application: Finally, the model is chemically interpreted to identify relevant spectral regions and ensure consistency with coffee composition, enabling its practical application in quality control and authenticity assessment.
2.3. Methodology Used for the Project
- Planning and Estimation: This stage involves identifying requirements, establishing project objectives, and creating the product backlog.
- a.
- Product Backlog: This constitutes the master list of all the project's features, fixes, and requirements, such as Blockchain integration or a QR code scanning module. The producers are responsible for managing it.
- Implementation: The team begins developing the project in sprints, or development cycles, that last two to four weeks. Each sprint starts with a daily Scrum meeting to review task progress and adjust the work plan as needed. During each sprint, the team focuses on developing the most important features in the backlog. The result of this phase is the Sprint Backlog.
- Review and Retrospective: Results are evaluated at the end of each sprint. A sprint review is conducted, in which the working software is presented to the team for direct feedback. This feedback is used to adjust the product backlog and plan the next sprint. Sprint retrospective is also held, in which the team meets privately to analyze their process and identify areas for improvement for the next sprint.
2.4. Mathematical Model Representation
2.5. Spectral Traceability of the Specialty Coffee
- Climate and Microclimate: This includes average temperatures, rainfall patterns, humidity, and sun exposure. In specialty coffee, the temperature range—a term referring to the sharp temperature changes between day and night—forces the bean to mature more slowly, concentrating more sugars and complex acids. The study areas exhibit diverse microclimates with a marked temperature range.
- Geography and Altitude: Altitude also influences coffee quality, as higher altitudes mean less oxygen and lower temperatures. This slows down plant growth and increases plant density. Other influencing factors include the slope of the land and its orientation relative to the sun.
- The Soil: The chemical composition of the soil, such as pH, minerals, and drainage capacity, nourishes the plant in a specific way. Volcanic soils are notable for their acidity and mineral notes, which are highly valued in the market. The areas studied are characterized by volcanic soil.
- Human Factor and Tradition: which include producer decisions such as the variety planted, the cultivation techniques used, and the processing methods employed, such as fermentation and drying.
- 1.
- Origin Characterization: This involves mapping the production areas. To do this, coffee samples are collected from farms to create a reference database. Each sample is analyzed using near-infrared (NIR will be used in this study) spectroscopy to capture the chemical signature of the soil and the plant. Values are also obtained, which are "recorded" in the hydrogen and oxygen isotopes of the bean, for various variables such as altitude, rainfall cycle, and soil nutrients.
- 2.
- Sampling of Green Grain: Before export, green coffee is analyzed to verify that its fingerprint matches that of the declared origin. This involves scanning the unroasted beans, whole or ground, with a spectrophotometer to detect if the batch has been mixed with lower-quality beans or beans from another region.
- 3.
- Monitoring during the Roasting: Roasting alters the chemical composition of coffee, creating a new "fingerprint" of the process. Spectroscopy is used to maintain the roast profile. It validates two key factors for this category: whether the uniformity of the color has been maintained and whether the roasting level is appropriate to highlight the notes of specialty coffee.
- 4.
- Sensory Quality Analysis: The sensory quality of coffee can also be validated by comparing spectral curves with cupping scores (SCA). This is possible because certain spectral signatures are linked to specific high levels of acidity or sweetness, allowing for a quick and objective prediction of cup quality (above 80 points).
- 5.
- Verification at the Point of Sale: To confirm authenticity, the importer or final roaster can scan the package to see the "fingerprint" that guarantees the coffee is indeed from the specified farm. Spectral data is typically linked to this "fingerprint" via a QR code or blockchain system as in this study.
3. Results
- •
- Kotlin Programming Language: selected as the official language for Android development due to its null-safety, conciseness, and complete interoperability with the Java ecosystem.
- •
- The application architecture: implements the MVVM (Model-View-ViewModel) pattern with the following layers:
- ○
- Interface Layer (UI Layer): Built with Jetpack Compose, a declarative framework for user interfaces. This layer is limited to displaying the state provided by the ViewModel and notifying user interactions, without containing business logic.
- ○
- ViewModel: manages interface logic and state, using StateFlows to expose data to the UI. It is designed to survive configuration changes, such as screen rotations.
- ○
- Data Layer: Manages all data sources using the Repository pattern, isolating the ViewModels from the source of the data (local database or web services).
- •
- User Interface Framework: Jetpack Compose, which allows for the development of complex interfaces with less code, in an intuitive way, and with reusable components. The visual design strictly adheres to the Material Design 3 (M3) guidelines.
- •
- Local Storage:
- ○
- Structured and Relational Data: Room, an abstraction layer on top of SQLite, is used to simplify database access and perform compile-time query verification for managing batches, farms, and processes.
- ○
- Key-Value Data: Jetpack DataStore is used to store user preferences and session tokens.
- •
- Backend Communication:
- ○
- The application connects to a server using a RESTful API.
- ○
- Retrofit is used to define API calls declaratively, along with OkHttp as the HTTP client.
- ○
- JSON object serialization and deserialization are performed with Moshi, optimized for Kotlin.
- •
- Asynchronous Management: Background operations, such as network calls or database access, are handled with Kotlin coroutines, ensuring a smooth, non-blocking interface.
- •
- Dependency Injection: Hilt is used to manage dependencies throughout the application, simplifying the architecture, facilitating testing, and reducing repetitive code.
4. Discussion
5. Conclusions
Supplementary Materials
Author Contributions
Funding
Institutional Review Board Statement
Informed Consent Statement
Data Availability Statement
Acknowledgments
Conflicts of Interest
References
- Fadli, F.; Baidhawi, B.; Adhiana, A. ANALYSIS OF COFFEE QUALITY CONTROL BASED ON SCA (SPECIALTY COFFEE ASSOCIATION) STANDARDS ON ARABICA COFFEE AT DEPUTROE COFFE. Int. J. Econ. Agribisnis Dev. Stud. 2024, vol. 1(n.o 2), 62–69. [Google Scholar]
- Assa. , «Chemical compounds and sensory characteristics of Arabica coffee (Coffeaarabica) as a novel specialty coffee from Sinjai Regency, Indonesia. Food Res. 2021, vol. 5(n.o S2), 107–112. [Google Scholar] [CrossRef]
- Loppies, J. E. , «Physical quality and flavor profile of arabica coffee beans (Coffea arabica) from Seko, South Sulawesi as a specialty coffee». IOP Conf. Ser. Earth Environ. Sci. 2024, vol. 1338(n.o 1), 012048. [Google Scholar] [CrossRef]
- Ramos, M. F.; Ribeiro, D. E.; Cirillo, M. Â.; Borém, y F. M. Discrimination of the sensory quality of the Coffea arabica L. (cv. Yellow Bourbon) produced in different altitudes using decision trees obtained by the CHAID method. J. Sci. Food Agric. 2016, vol. 96(n.o 10), 3543–3551. [Google Scholar] [CrossRef] [PubMed]
- «Best of Panama Eauction—Specialty Coffee. 2025. Available online: https://bestofpanama.auction/.
- Núñez, N.; Saurina, J.; Núñez, y O. Liquid Chromatography–High-Resolution Mass Spectrometry (LC-HRMS) Fingerprinting and Chemometrics for Coffee Classification and Authentication. Molecules 2023, vol. 29(n.o 1), 232. [Google Scholar] [CrossRef]
- Querme, M. Eduarda Terra; Lima, D. Araújo. Traceability Automation in Coffee Production: A Case Study on QR Code Integration to Optimize Manual Steps. Arch. Adv. Eng. Sci. 2023, vol. 2(n.o 3), 170–180. [Google Scholar] [CrossRef]
- Camacho, J. J. A.; Gómez, A. M. M.; Riaño, L. N. A. TRACEABILITY ARCHITECTURE TECHNOLOGY FOR SHORT COMMERCIAL EXCHANGE». In Proceedings of the International Conference on Industrial Engineering and Operations Management; IEOM Society International: Sao Paulo, Brazil, 2021; pp. 2695–2708. [Google Scholar] [CrossRef]
- Tadesse, M. D.; Gebresenbet, G.; Ljungberg, D.; Tavasszy, y L. Digital Traceability Capabilities: The Case of the Ethiopian Coffee Supply Chain. Future Transp. 2024, vol. 4(n.o 3), 780–794. [Google Scholar] [CrossRef]
- Available online: https://www.iso.org/obp/ui#iso:std:iso:22005:ed-1:v1:en.
- Available online: https://www.iso.org/obp/ui/es/#iso:std:iso:ts:23635:ed-1:v1:en.
- Katya Kule, E.; Kyohangirwe, A.; Midamba, D. C.; Byakatonda, y J. Determinants of adoption of climate-smart agricultural technologies among smallholder coffee farmers in Western Uganda. Cogent Soc. Sci. 2025, vol. 11(n.o 1), 2588856. [Google Scholar] [CrossRef]
- Jakkaew, P.; Yingchutrakul, Y.; Aunsri, y N. A data-driven approach to improve coffee drying: Combining environmental sensors and chemical analysis. PLOS ONE 2024, vol. 19(n.o 2), e0296526. [Google Scholar] [CrossRef]
- Chiang, W.-Y. Using a data-driven marketing strategy on customer relationship management: an empirical case of urban coffee shops in Taiwan. Br. Food J. 2021, vol. 123(n.o 4), 1610–1625. [Google Scholar] [CrossRef]
- Tolulope Joel y Vincent, Oloruntosin; Oguanobi, Ugochukwu. Data-driven strategies for business expansion: Utilizing predictive analytics for enhanced profitability and opportunity identification. Int. J. Front. Eng. Technol. Res. 2024, vol. 6(n.o 2), 071–081. [Google Scholar] [CrossRef]
- Sott, M. K. Precision Techniques and Agriculture 4.0 Technologies to Promote Sustainability in the Coffee Sector: State of the Art, Challenges and Future Trends. IEEE Access 2020, vol. 8, 149854–149867. [Google Scholar] [CrossRef]
- Montoya-Munoz y, I.; Rendon, O. M. C. An Approach Based on Fog Computing for Providing Reliability in IoT Data Collection: A Case Study in a Colombian Coffee Smart Farm. Appl. Sci. 2020, vol. 10(n.o 24), 8904. [Google Scholar] [CrossRef]
- Hong, S.; Park, S.; Youn, H.; Lee, J.; Kwon, y S. Implementation of Smart Farm Systems Based on Fog Computing in Artificial Intelligence of Things Environments. Sensors 2024, vol. 24(n.o 20), 6689. [Google Scholar] [CrossRef]
- Bahri, T. S.; Manyamsari, I.; Putri, R. J.; Iskandar, y E. Technology needs assessment for the development of smart coffee production in Aceh, Indonesia. IOP Conf. Ser. Earth Environ. Sci. 2024, vol. 1290(n.o 1), 012053. [Google Scholar] [CrossRef]
- Muñoz-Belalcazar, J. A.; Benavides-Cardona, C. A.; Lagos-Burbano, T. C.; Criollo-Velázquez, C. P. Manejo agronómico sobre el rendimiento y la calidad de café (Coffea arabica) variedad Castillo en Nariño, Colombia. Agron. Mesoam. 2021, vol. 32(n.o 3), 750–763. [Google Scholar] [CrossRef]
- Hernández-Salazar, C. A.; González-Estrada, O. A.; González-Silva, G. Integración de la inteligencia artificial y la agricultura de precisión en cultivos de café. Rev. UIS Ing. 2024, vol. 23(n.o 4). [Google Scholar] [CrossRef]
- Rojas-Ruiz, R.; Alvarado-Huamán, L.; Borjas-Ventura, R.; Torres, E. C.; Castro-Cepero, V.; Julca-Otiniano, A. CARACTERIZACIÓN DE FINCAS PRODUCTORAS DE CAFÉ CONVENCIONAL Y ORGÁNICO EN EL VALLE DEL ALTO MAYO, REGIÓN SAN MARTÍN, PERÚ. ISSN.
- Wulandari y, S.; Ferry, Y. Strategies on technology management for coffee smallholder to promote the smart farming implementation. IOP Conf. Ser. Earth Environ. Sci. 2021, vol. 759(n.o 1), 012057. [Google Scholar] [CrossRef]
- Vega, J. A. D.; León; Reyes, S. M.; Gallardo, J. M. Modelo matemático para determinar la correlación entre parámetros fisicoquímicos y la calidad sensorial de café Geisha y Pacamara de Panamá. Inf. Tecnológica 2021, vol. 32(n.o 1), 89–100. [Google Scholar] [CrossRef]
- Vega; Reyes, S. M.; Troestch, y J. Physicochemical Parameters and Multivariate Analysis to Predict the Sensory Quality in Specialty Coffee from Panama. ACS Omega 2025, vol. 10(n.o 13), 13251–13259. [Google Scholar] [CrossRef]
- Vega; Reyes, S.; León, J. D.; Bonilla, A. CUANTIFICACIÓN DE CAFEÍNA EN CAFÉS COMERCIALES DE PANAMÁ. Cienc. Tecnol. 2014. [Google Scholar]
- Trigoso, J.-A. C.; Valderrama, N. L. M.; Trujillo, P.-A. R.; Rosero, L. M. G. Sostenibilidad del café: revisión sistemática de la literatura. Rev. Venez. Gerenc. 2021, vol. 26(n.o 95), 943–961. [Google Scholar] [CrossRef]
- Saiful Bahri, T.; Sakti Nasution, I.; Iskandar, y E. The study of smart farming for the sustainable coffee plantation. IOP Conf. Ser. Earth Environ. Sci. 2025, vol. 1510(n.o 1), 012051. [Google Scholar] [CrossRef]
- Pradhana y, A. S.; Kotama, I. N. D. Mobile Application Development for Robusta Coffee Planting Cycle Mapping and Recording as Part of an Initiative to Revitalize Smart-Agriculture Technology. 2023, vol. 13(n.o 02). [Google Scholar]
- Abreu, M. B.; Marcheafave, G. G.; Bruns, R. E.; Scarminio, I. S.; Zeraik, M. L. Spectroscopic and Chromatographic Fingerprints for Discrimination of Specialty and Traditional Coffees by Integrated Chemometric Methods. Food Anal. Methods 2020, vol. 13(n.o 12), 2204–2212. [Google Scholar] [CrossRef]
- Specialty Coffee Panama. Available online: https://scap-panama.com.
- Gómez, R. Determination of chemical compounds of roasted coffee by Near-Infrared Spectroscopy (NIRS); Cenicafé, 2023. Available online: https://publicaciones.cenicafe.org/index.php/cenicafe/article/view/361.
- Gamboa, J. P. Z.; Arreaga, C. A. L. Evolución de las Metodologías y Modelos utilizados en el Desarrollo de Software. Evolution of the Methodologies and Models used in Software Development. 2018, vol. 3(n.o 10). [Google Scholar]
- Hema, V.; Thota, S.; Naresh Kumar, S.; Padmaja, C.; Rama Krishna, C. B.; Mahender, y K. Scrum: An Effective Software Development Agile Tool. IOP Conf. Ser. Mater. Sci. Eng. 2020, vol. 981(n.o 2), 022060. [Google Scholar] [CrossRef]
- Pargaonkar, S. A Comprehensive Research Analysis of Software Development Life Cycle (SDLC) Agile & Waterfall Model Advantages, Disadvantages, and Application Suitability in Software Quality Engineering. Int. J. Sci. Res. Publ. 2023, vol. 13(n.o 8), 120–124. [Google Scholar] [CrossRef]
- Pohjolainen, S. (Ed.) Mathematical Modelling; Springer: Cham, 2016. [Google Scholar] [CrossRef]









| Region | Altitude Range (masl) | Temperature Range (°C) |
| Boquete | ~ 1,200 – 2,000 | ~13 – 24 |
| Tierras Altas | ~ 1,200 – 1,900 | ~ 12 – 25 |
| Renacimiento | ~ 1,200 – 1,950 | ~ 14 – 29 |
| Symbol | Formal Role | Meaning in This System |
| E | Static domain universe | Defines what exists in the system as users, farms, zones, coffee types, locations, etc. |
| State space | This application represents all valid configurations of entities, attributes, and stored objects. | |
| T | State evolution | Traceability coffee process is represented as system changes via actions or events. |
| Coordination mechanism | Blockchain technologies introduce consistency across concurrent or distributed transitions. | |
| Safety constraints or Invariants | Properties that must be configured during the activity logging processes. Invariants sample are: Every zone belongs to exactly one farm. Evidence must refer to a valid time. Stored objects must be associated with an entity. Users may only modify farms they own or manage. |
| Symbol | Entity Set | Interpretation |
| U | Users | Represents the coffee grower or system actors interacting with the application. |
| F | Farms | Agricultural units under observation or management. |
| Z | Zones | Each farm could have many areas with different types of coffee (e.g., plots, microclimates). This areas are known as zones. |
| M | Evidence | Observations of coffee samples, measurements, or records (e.g., temperature data). This information is given without user manipulation and shared by internet connections. |
| Time | Temporal dimension enabling ordering and historical reasoning. | |
| D | Stored Objects |
Persisted digital artifacts such as files or datasets. |
| Evaluation Attribute |
Traditional Method
(Q-Graders) |
Mobile System
(NIRS + PAMS) |
Advantage |
| Nature of Analysis | Sensory and Subjective (Taste/Smell) | Chemical and Objective (Spectroscopy) | Elimination of human bias |
| Turnaround Time | 24 - 48 hours (includes prep and panel) | < 5 minutes (Edge processing) | 95% reduction in time |
| Cost per Sample | High (Expert fees and logistics) | Low (Energy and cloud consumption) | Economic scalability |
| Data Traceability | Manual / Spreadsheets (Error-prone) | Automatic (Blockchain + Georeference) | Immutable data integrity |
| Requirements | On-site certified experts | Farm staff with minimal training | Decentralization of knowledge |
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content. |
© 2026 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).