doi: 10.56294/nds2024132

 

ORIGINAL

 

Mobile application for planning and monitoring healthy eating habits with artificial intelligence and augmented reality

 

Aplicación móvil de planificación y seguimiento de hábitos alimenticios saludables con inteligencia artificial y realidad aumentada

 

María Julieta Rabozzi Orelo1

 

1Universidad Siglo 21, Ingeniería en software. Córdoba, Argentina.

 

Cite as: Rabozzi Orelo MJ. Mobile application for planning and monitoring healthy eating habits with artificial intelligence and augmented reality. Nursing Depths Series. 2024; 3:132. https://doi.org/10.56294/nds2024132

 

Submitted: 28-06-2023                   Revised: 26-09-2023                   Accepted: 06-01-2024                 Published: 07-01-2024

 

Editor: Dra. Mileydis Cruz Quevedo

 

ABSTRACT

 

Staying healthy in today’s world can be a considerable challenge due to the difficulty of accessing personalized meal plans, the lack of tools for habit tracking, and the limited availability of information about the foods we consume. Although technology has advanced significantly, there is no platform that combines nutritional plans comparable to those designed by a professional nutritionist with detailed information about consumed foods and tools that facilitate evaluating the user’s progress. For this reason, a mobile application was developed to provide meal plans generated by artificial intelligence, based on the Dietary Guidelines for the Argentine Population. This application adapts to each user’s dietary preferences, personal data, and objectives, featuring functionalities such as food scanning and a section where users can track their progress. This project was developed thanks to the knowledge acquired during the Software Engineering program, encompassing stages such as identifying and analyzing the problem and designing a proposal that incorporates transformative technologies like artificial intelligence and augmented reality, reflecting the integration of technical and analytical skills from the conception of the idea to the implementation of the system.

 

Keywords: Dietary Planning; Artificial Intelligence; Augmented Reality; Healthy Habits; Mobile Application.

 

RESUMEN

 

Mantenerse saludable en la actualidad puede ser un desafío considerable, debido a la dificultad de acceder a planes alimenticios personalizados, falta de herramientas para seguimiento de hábitos y la limitada disponibilidad de información sobre los alimentos que consumimos. Aunque la tecnología ha avanzado significativamente, no existe una plataforma que combine planes nutricionales comparables a los diseñados por un nutricionista profesional, con información detallada sobre alimentos consumidos y herramientas que faciliten evaluar el progreso del usuario. Por ello, se desarrolló una aplicación móvil que ofrece planes alimenticios generados mediante inteligencia artificial que se fundamentan en las Guías Alimentarias para la Población Argentina. Esta se adapta a las preferencias alimenticias, datos personales y objetivos de cada usuario, contando con la funcionalidad de escanear alimentos y un apartado donde el usuario puede observar su progreso. Este proyecto fue desarrollado gracias a los conocimientos adquiridos durante la carrera de Ingeniería en Software, atravesando etapas como la identificación y análisis de la problemática, y el diseño de una propuesta que incorpora tecnologías transformadoras como la inteligencia artificial y realidad aumentada, reflejando la integración de competencias técnicas y analíticas, desde la concepción de la idea hasta la implementación del sistema.

 

Palabras clave: Planificación Alimentaria; Inteligencia Artificial; Realidad Aumentada; Hábitos Saludables; Aplicación Móvil.

 

 

 

INTRODUCTION

It is common that the organization and planning of meals does not receive the necessary attention. However, the Honorary Commission for Cardiovascular Health(1) stated that "certain eating habits and some components of the food and products we consume increase the risk of developing diseases such as diabetes, hypertension, cardiovascular diseases, cancer, excess weight, high cholesterol, among others". In view of this, a dietary plan takes on special relevance, as it is fundamental for health care. However, not everyone has access to one, and making a long-term commitment to a plan can be complicated, leading to a loss of consistency. In addition, most of the time, people did not have enough information about what they consume.

Due to this problem, the need arose to develop a food organization application, designed to follow the guidelines of the Dietary Guidelines for the Argentine Population. This application allows users to record data such as age, measurements and goals, and receive appropriate meal plans. In addition, it has the functionality to scan food to receive nutritional information and record daily consumption, to later evaluate their progress, encouraging the commitment to maintain good habits.

The present study was developed in the Province of Córdoba, Argentina, and its objective was to facilitate the care of the eating habits of people in the region.

 

Background

According to figures from the World Health Organization (WHO), between 1975 and 2016 the global prevalence of obesity has almost tripled, affecting adults as well as children and adolescents.(2) In response to this issue, technology has begun to play a crucial role in promoting a healthier and more balanced lifestyle.

Currently, various applications combine technology and health to simplify people's lives. An example of this is El CoCo, an application that allows you to scan supermarket products, providing detailed information for more conscious and healthier shopping. Similarly, MyFitnessPal(3) focuses on health and fitness tracking, offering a calorie counter and physical activity log for its users.

Another notable app is Fitia, which provides personalized meal plans based on the user's needs and goals, such as weight loss, maintenance or muscle mass gain. Fitia calculates the calories needed and suggests food combinations, making it easy for users to track their diet and nutritional goals.

These apps demonstrate how technology can be a valuable tool for addressing nutrition-related health issues, making information more accessible and improving adherence to a personalized eating plan. However, the need remains for more integrated solutions that combine different technologies to provide an even more complete experience.

How can a mobile application, based on artificial intelligence and augmented reality, contribute to improve food organization and promote healthy eating habits in the population of Cordoba, Argentina?

 

Objective

To develop a mobile application that provides healthy eating plans using trained Artificial Intelligence, based on user data such as measurements, goals and personal preferences, with the functionality of scanning food using Augmented Reality to promote conscious eating and the possibility of observing a weekly progress after performing daily follow-ups where the user can mark their compliance.

 

METHOD

The development of the project is carried out under the agile methodology Scrum to facilitate its organization with Sprint of 2 weeks, and the Trello Software. According to Redacción APD (2024) "In this work method what is intended is to achieve the best result of a given project."

 

Tools Used

The development of the mobile application was carried out using SwiftUI as the main framework, allowing the construction of modern and adaptive user interfaces in a declarative way, which simplifies the development process and improves the user experience.(4) For the organization of the application logic, the MVVM (Model-View-ViewModel) architecture was used, which facilitates the separation between the user interface and the business logic, ensuring a more modular and maintainable code.(5)

On the backend, Node.js, a JavaScript platform that provides an efficient environment for building servers, was used. Thanks to its ability to handle multiple requests simultaneously, a seamless integration with artificial intelligence and augmented reality services, essential aspects of the project, was achieved.(6) In addition, the MongoDB database was chosen for its NoSQL nature, allowing large volumes of data to be stored in a JSON-like document format. This facilitates the management of user data, food plans and consumption records, offering a flexible and scalable structure.(7)

The use of SwiftUI together with the MVVM architecture allowed the interface to be automatically updated with data managed from the backend, providing a seamless and efficient user experience. Communication between the mobile application and the server developed in Node.js ensured constant data updates, while MongoDB took care of storing all the necessary information in a fast and accessible way.

 

Data Collection

Data collection for this project is carried out using two techniques:

1.   Observation: observations were conducted with family, friends and acquaintances to identify how they manage their eating habits, the difficulties they face, and how they interact with technological tools for diet planning.

2.   Documentation review: the Dietary Guidelines for the Argentine Population were analyzed in order to support the characteristics of the application and ensure that the recommendations are aligned with official nutritional standards.

 

Activity Planning

The following is a Gantt chart, which shows how the project time was organized and distributed.

 

Figure 1. Gantt Diagram

 

Survey

Structural Survey

Since this is a project aimed at people seeking to improve their eating habits, there is no specific geographical location for it, since it depends on the place where the main actors interact: patients and nutritionists. These actors are usually found in environments such as private or clinical offices or virtual environments. It was found that, in addition to face-to-face communication between patient and nutritionist, tools such as video-call platforms, instant messaging to solve doubts or e-mails to share meal plans or recipes are also used.

 

Functional Survey

After analyzing the data collected through observation, it is concluded that currently no formal structure is used for the functional processes related to the improvement of eating habits. Therefore, this survey is based on people who face difficulties in improving their diet and the agents that surround them, such as:

·      Nutritionists: professionals who provide personalized dietary plans and monitor patients' progress usually in monthly consultations.

·      Patients: Individuals who seek nutritional guidance, but often face barriers to maintaining consistency in the recommended plans.

 

The processes surveyed are detailed below:

 

Pr8       ocess: Visit to the Nutritionist

Roles Involved: Nutritionist, Patient. Steps:

1.   Search and appointment scheduling: the patient searches for a nutritionist and schedules a consultation (face-to-face or remote).

2.   Initial consultation: the nutritionist conducts an interview to collect data such as weight, height, mass index and body measurements.

3.   Design of the dietary plan: the nutritionist prepares a personalized plan considering the caloric needs, food preferences and goals of the patient.

4.   Follow-up: the patient implements the plan and attends periodic consultations (usually monthly) to evaluate progress.

5.   The nutritionist adjusts the plan according to the results and difficulties reported.

 

Process: Implementation of the Meal Plan

Roles Involved: Patient, Nutritionist (indirectly). Steps:

1.   Review of the dietary plan: patient studies the indications provided by the nutritionist.

2.   The patient makes the necessary food purchases.

3.   Communication of difficulties: If the patient encounters barriers to following the plan, he/she communicates these difficulties to the nutritionist in the follow-up consultation.

 

Business Process

The following shows how the processes will be carried out in the system.

 

Figure 2. Flowchart of the nutritionist care process

 

RESULTS AND DISCUSSION

Diagnosis

 

Figure 3. Problems and causes of diagnosis

 

Figure 4. Problems and causes of the diagnosis

 

Proposal

A comprehensive mobile application for planning and monitoring eating habits was developed that addressed the problems identified, with the aim of providing users with personalized food plans, facilitating access to clear nutritional information through real-time food scanning with augmented reality, and ensuring continuous monitoring of their eating habits.

Key features of the system included:

1.   Automation of personalized meal plans: an artificial intelligence-based algorithm was implemented that generated meal plans adapted to the personal data and objectives of each user. These plans were dynamically adjusted according to the progress recorded by the user.

2.   Food scanning with AR: the application integrated augmented reality technology, allowing users to scan food products and receive detailed nutritional information in real time. This information was presented in an understandable way, with clear recommendations on consumption.

3.   Continuous monitoring of eating habits: the application incorporated a system for recording food consumed, to encourage consistency in following the plan.

 

This digital solution solved the problems of accessibility, personalization and consistency in eating habits, providing an intuitive, practical and technologically advanced tool to promote healthy and sustainable eating over time.

 

Objectives, Limits and Scope of the Prototype

Objective

To develop a prototype system that allows planning, tracking and personalizing healthy eating habits, through the integration of artificial intelligence and augmented reality, providing personalized food plans and facilitating the scanning of food to obtain nutritional information in real time.

 

Limits

From the moment the user enters their personal data and sets their dietary goals, until a personalized meal plan is generated and progress is tracked through the recording of food consumed and product scanning.

 

Scopes

Within these limits, the prototype will cover the following business processes:

·      Personal data entry and dietary goals.

·      Generation of personalized food plans.

·      Food scanning with augmented reality to obtain nutritional information.

·      Daily record of food consumed.

·      Dynamic adjustment of the meal plan based on the user's progress.

 

System Description

The following is the description of the system developed for the planning and monitoring of eating habits through a mobile application. The Product Backlog is presented, which contains the user stories necessary for the development of the system, each one of them with its priority and effort estimation (Story Points).

 

Product Backlog

 

Figure 5. Product Backlog

 

User Stories

 

Figure 6. User Story 1

 

Figure 7. User Story 2

 

Figure 8. User Story 3

 

Figure 9. User Story 4

 

Figure 10. User Story 5

 

Figure 11. User Story 6

 

Figure 12. User Story 7

 

Figure 13. User Story 8

 

Figure 14. User Story 9

 

Figure 15. User Story 10

 

Figure 16. User History 11

 

Figure 17. User Story 12

 

Figure 18. User Story 13

 

Figure 19. User Story 14

 

Figure 20. User History 15

 

Sprint Backlog

 

Figure 21. Sprint Backlog

 

Data Structure

The following is the data structure of the system, which includes the diagrams necessary to represent the organization and management of the data used in the project. These are fundamental to understand how information is structured and stored, ensuring that design decisions are consistent with the needs of the project.

 

Class Diagram

Since the system was developed in Swift, an object-oriented programming language, a class diagram was used to show the characteristics of the objects and their relationships within the system. This diagram allows visualizing how the entities are structured and related in the context of the application development.

 

Figure 22. Class Diagram

 

NoSQL Database Diagram

Since MongoDB was used as a NoSQL database management system, a NoSQL database diagram is included. This diagram represents the organization of data in collections and documents, reflecting the flexibility and scalability of this type of non-relational storage systems.

 

Figure 23. NoSQL diagram

 

Screen interface prototypes

The prototype developed for the application shows a series of screens that guide the user through the main functions and navigation flow of the tool. The user experience begins with a welcome screen, where a choice is made between logging in or creating an account.

In the case of creating an account, the user goes through an onboarding where data entry is performed, requesting basic information such as age, gender, weight and dietary goals. These data are essential to customize the plans that the application will generate, adapting them to the needs of each individual. After these steps, the home screen is displayed with the generated plan.

In the case of logging in, the user is directed directly to the home screen. This displays their meal plan as well as a Tab Bar to navigate between the other screens to scan food, view profile and view progress.

The food scanning function is designed to allow users to obtain nutritional information from the products they consume. From the scanning screen, the device's camera is activated.

In the my profile section, the user can view and edit their data entered at onboarding.

In the view progress session, the user can visualize their progress. Through clear and simple graphics, which helps the user to monitor his progress and make the necessary adjustments.

 

Figure 24. Registration and login

 

Figure 25. Onboarding part 1

 

Figure 26. Onboarding part 2

 

Figure 27. Start

 

Figure 28. Food scanning

 

Figure 29. My profile

 

Figure 30. My progress

 

Architecture Diagram

The architecture diagram shows the general operation of the mobile application for planning and monitoring eating habits. The application is downloaded from the AppStore to the users' mobile devices, allowing them to access its main functionalities, such as the registration of personal data and the creation of personalized food plans.

From the mobile device, users interact with the application to send requests for data or updates, such as querying nutritional information by scanning food. These requests are sent to a server, which acts as an intermediary between the application and the database. The server processes the requests and, if necessary, queries the database, which stores user information, meal plans, and consumption records.

Communication between the mobile device, the server and the database takes place over the Internet, ensuring that data remains synchronized and accessible to users from any location. Once the server processes the information or performs an update, it sends the response back to the mobile device, allowing the user to view the results in real time.

 

Figure 31. Architecture Diagram

 

Security

Two fundamental aspects related to system security are detailed below: access control and information backup policy.

 

Access to the Application

The following table details the security policies implemented for access to the mobile food planning application. These policies aim to protect users' personal information and ensure secure access to the application.

 

Figure 32. Table of application access policies

 

Information backup policy

The information backup policy for the food planning application was developed to protect and ensure the continued availability of user data. The information, including personal data, food plans and consumption records, was mainly stored in the cloud using MongoDB Atlas, which ensured fast and reliable access from anywhere.(8,9)

Data backups are performed daily at 03:00 a.m., a time when low user activity is expected, to minimize any potential service disruption. These backups are stored both in the cloud and in a local location on the server, which provides redundancy and facilitates data recovery in case of loss or damage.(10,11)

As for local storage, the backups are stored in a secure directory on the backend server configured with Node.js, protected using advanced encryption (AES- 256). This approach ensures that even if the local system is compromised, the data will be protected against unauthorized access. In addition, each backup copy has a 30-day retention, after which it is automatically deleted to optimize the use of storage space.

To ensure the integrity of the backups, automatic consistency checks are performed after each backup process. If errors are detected, the system generates immediate alerts to the technical team, who can take action to correct the problem and prevent any data loss.(12)

This robust approach guarantees data security and availability, ensuring that users can rely on the platform to manage their power supply without interruption or risk.

 

Cost Analysis

To represent the costs of the project, the effort required for its execution (human resources), licensing costs and necessary equipment were considered. The values shown are expressed in Argentine pesos as of the year 2024.

 

Development costs

The following table shows the remuneration of personnel, whose values were obtained from the Recommended Fees page, updated by IPIM index.(8)

 

Figure 33. Development Costs Table

 

Analysis of operating costs

The operating costs are presented below, taking into account the resources necessary to guarantee the operation of the system, initial investments and monthly expenses.

 

Figure 34. Table of Operating Costs

 

Summary

 

Figure 35. Summary Table

 

The total initial cost of purchasing all the hardware is $3 700 000, while the monthly recurring cost is $3500. This initial investment allows the project to have the necessary infrastructure from the beginning, with lower operating costs in the long term.

 

Risk Analysis

The following table details the risks identified that affect the project. The following is a matrix of possible risks for the project.

 

Figure 36. Identified risks

 

Once the risks affecting the project have been identified, their impact is analyzed by means of a risk matrix.

 

Figure 37. Risk matrix

 

By applying the risk matrix to the identified risks, the risk exposure is obtained exposure to risk.

 

Figure 38. Risks identified

 

Using the values obtained for risk exposure and applying the Pareto principle, it is possible to identify and differentiate between the few vital risks and the many trivial risks.

 

Figure 39. Pareto diagram

 

The contingency plan is shown below, based on the risks shown in the risk matrix.

 

Figure 40. Contingency Plan

 

CONCLUSIONS

The project was developed with the objective of providing users with a tool that facilitates the adoption of healthy eating habits, using artificial intelligence for the personalization of meal plans and augmented reality for food scanning. The main motivation for carrying out this project was the need to provide an accessible and effective solution for those who wish to improve their diet, but face difficulties in following a plan due to lack of information and continuous support.

Throughout the development, the objectives were achieved: an application was designed and programmed that allows users to record their data, receive personalized plans and track their progress by recording food diaries and obtaining nutritional information in real time.

This project not only allowed me to apply and deepen knowledge acquired during my degree, such as the development of mobile applications and the integration of advanced technologies, but also gave me the opportunity to improve my skills in project management and teamwork. Personally, the process was enriching, as it required me to overcome my own limits and acquire new technical and analytical skills, which fills me with satisfaction and better prepares me to face future professional challenges.

 

BIBLIOGRAPHIC REFERENCES

1. Comisión Honoraria para la Salud Cardiovascular. Comisión Honoraria para la Salud Cardiovascular; s.f. https://www.cardio.com.uy

 

2. Organización Mundial de la Salud. WHO.int; 2017. https://www.who.int

 

3. MyFitnessPal. MyFitnessPal; s.f. https://www.myfitnesspal.com

 

4. Apple Developer. SwiftUI documentation. Apple Developer; s.f. https://developer.apple.com/documentation/swiftui

 

5. SwiftBeta. SwiftBeta; 2023. https://www.swiftbeta.com

 

6. Node.js. About Node.js. Node.js; s.f. https://nodejs.org/en/about

 

7. IBM. IBM Documentation. IBM; s.f. https://www.ibm.com/docs/en

 

8. Honorarios Recomendados. Honorariosprofesionales.com; 2024. https://www.honorariosprofesionales.com

 

9. Universidad Valle del Grijalva. Universidad Valle del Grijalva; s.f. https://www.uvg.edu.mx 

 

10. Organización Mundial de la Salud. WHO.int; 2024. https://www.who.int

 

11. MongoDB. MongoDB Pricing. MongoDB Inc.; s.f. https://www.mongodb.com/pricing

 

12. Fernández AA. Alimentación consciente: principios y prácticas. Revista de Nutrición Integral. 2022.

 

FINANCING

None.

 

CONFLICT OF INTEREST

The authors declare that there is no conflict of interest.

 

AUTHORSHIP CONTRIBUTION

Conceptualization: María Julieta Rabozzi Orelo.

Data curation: María Julieta Rabozzi Orelo.

Formal analysis: María Julieta Rabozzi Orelo.

Research: María Julieta Rabozzi Orelo.

Methodology: María Julieta Rabozzi Orelo.

Project Management: María Julieta Rabozzi Orelo.

Resources: María Julieta Rabozzi Orelo.

Software: María Julieta Rabozzi Orelo.

Supervision: María Julieta Rabozzi Orelo.

Validation: María Julieta Rabozzi Orelo.

Visualization: María Julieta Rabozzi Orelo.

Writing - original draft: María Julieta Rabozzi Orelo.

Writing - proofreading and editing: María Julieta Rabozzi Orelo.