Individual Report

Dunyu Yang (dyan060)

Abstract - This report presents a food management application and its development process. It begins by discussing the background and motivation for creating the application. Then, the report compares the food management system with existing applications and introduces its design. The report describes the implemented features, explains the testing methods, and outlines the project management methodologies used during the development process. The report also highlights the use of software tools and AI techniques in the project. Additionally, it reflects on the challenges encountered during implementation, summarizes the lessons learned from the course team project, and proposes future directions for further development of the application.

Keywords- Food management, recipe recommendations, food stock tracking, shopping lists, expiration reminders, health, food waste reduction, sustainability, software tools and techniques, artificial intelligence, teamwork.

I. INTRODUCTION

In modern society, the fast pace of life presents challenges for people trying to choose healthy diets. Deciding on dinner menus, especially on busy workdays, often becomes a daunting task. Ensuring nutritional balance while avoiding food waste requires a delicate balance. When planning and preparing meals, people sometimes find they are missing key ingredients or discover that some food has already expired. These issues not only increase daily stress and time expenditure of people but also lead to unnecessary food waste.

With the increasing awareness of health and sustainable living, people now need intelligent food management solutions more than ever before. Having recognized this trend, we decided to develop a food management system that leverages software tools and techniques to integrate a range of practical features. These include recommending nutritionally balanced recipes, reminding users of soon-to-expire ingredients and so on, helping people address various problems in ingredient management and meal planning, and ultimately achieving the goal of enhancing users' health levels, reducing time and food waste, and promoting environmental sustainability.

In this report, we will start with related work and delve into the project design, implementation, testing, management methodology, and the tools we used to develop our food management system.

Before comparing our project to related work, it is crucial to reconfirm our vision of an ideal food management system. Firstly, an ideal food management system should recommend delicious and nutritionally balanced recipes. Secondly, it needs to track the stock of ingredients at home. By automatically updating the stock, users can always know the status of their ingredients, avoiding duplicate purchases or missing key items. Additionally, the system should generate detailed shopping lists based on selected recipes, making the shopping process more efficient and convenient. Furthermore, it should have a reminder function to notify users when ingredients are about to expire, helping them use or replace these items in time, thus reducing food waste and improve and improving dietary health.

Prior to our work, some applications in the software market had already implemented similar features above. In this report, we will focus on comparing our project with three of these applications:

  • Pepperplate [1]: Pepperplate is a meal planning application that simplifies the cooking process. It allows users to import recipes, create shopping lists, and plan meals. The app includes a feature to adjust recipes according to serving sizes, helping manage food portions and reduce waste. Pepperplate's main advantage lies in its simplicity and focus on core functions related to recipe management and meal planning, with few additional features. In contrast, our project offers some features that it lacks, including weekly recipe recommendations.
  • Plan to Eat [2]: Plan to Eat application provides a comprehensive meal planning solution, integrating a personal recipe library, a meal planning calendar, and automatic shopping lists. Users can import and organize their favourite recipes, plan meals for specific dates and times, and generate shopping lists

based on their plans. The application also supports batch cooking and freezing, allowing users to manage meals in advance. Plan to Eat is feature-rich but can have a steep learning curve for new users compared to our app, which is much easier for users to get started.

  • DVO [3]: DVO (also known as Cook'n) offers a digital recipe and meal organization tool, allowing users to collect and organize recipes from various sources. It includes meal planning and shopping list functions similar to other meal planning apps. One of its unique features is nutrition analysis, helping users understand the nutritional content of their meals. This app is particularly suited for those who want detailed control over their diet. While our app may be weaker in nutritional analysis, it provides stronger support in real-time food stock tracking and expiration reminders.

In summary, Pepperplate emphasizes userfriendliness, Plan to Eat focuses on offering a comprehensive solution for recipe management, and Cook'n prioritizes detailed nutritional analysis. While our application is a student project and may not match these well-established applications, it nonetheless provides an effective solution for food management.

III.DESIGN

Our project database adopts a relational database design, using foreign keys to enforce data integrity and maintain relationships between tables. For example, the food table has a foreign key reference to the food_category table, ensuring that each food item is associated with a valid category. Indexes are applied to frequently queried fields to improve query performance and ensure the system can efficiently handle large amounts of data. Additionally, the relational model supports cascading operations, making it easier for developers to implement API functionalities. The specific Entity-Relationship Diagram of our project is shown in Figure 1.

_page_1_Figure_5.jpeg

Figure1- ERD of the application database

Our project adopts a simple and intuitive UI design aimed at enhancing user-friendliness and efficiency. With this simplified design, users can quickly find the information they need. The main frontend pages include the home page, stock page, recipe page, menu page, shopping cart page, and user management page. Various React components are customized according to the page layout.

_page_1_Picture_8.jpeg

Figure2 – Homepage of our application

The backend design of our project revolves around the database structure and aligns with the frontend business requirements. Our backend APIs primarily handle CRUD (create, read, update and delete) operations on the database, ensuring that data can be accessed and manipulated efficiently and accurately. The main functional backend modules correspond to the frontend pages include user management, menu management, ingredient management, recipe management, and shopping management. In addition, we have developed some special APIs based on more detailed requirements, such as the tag management API. Each functional module is relatively independent to ensure clear code structure. This modular API design not only enhances the system's maintainability and scalability but also ensures efficient and consistent data interaction between the frontend and database.

IV. IMPLEMENTATION

Through the thoughtful implementation of our design, we have successfully built a food management system. This system can display recipes that can be made with the existing ingredients, helping users quickly find suitable recipes based on what they have on hand. It also identifies which ingredients are missing for specific recipes, helping users quickly understand what they need to purchase. Additionally, the system can automatically generate shopping lists that include the missing ingredients, making it convenient for users to shop efficiently and plan their meals.

We also offer weekly menu recommendations to help users with meal planning and save time. Whether it's a busy workday or a leisurely weekend, our system provides thoughtful meal suggestions.

To assist users in making healthier dietary choices, we have implemented a feature that displays the nutritional information of recipes. This feature is particularly important for users who are conscious of their diet and nutritional balance.

In terms of ingredient management, our system records detailed stock information, including quantities, allowing users to keep track of their household ingredients at any time. We have also implemented an automatic reminder for expiring ingredients, helping users reduce waste and manage their food stock better. Users can easily view, add, or update food stock information through a userfriendly interface, ensuring that all operations are simple and efficient.

Furthermore, our system provides powerful search capabilities, enabling users to quickly find specific ingredients or recipes, significantly improving usage efficiency. This feature ensures that users can find the information they need in the shortest amount of time, enhancing the overall user experience.

For other functions, we have implemented user login and logout features, with middleware for login authentication to ensure system security. The system also integrates weather and time display features, allowing users to reference current weather conditions and time information when planning meals. Additionally, we offer a print shopping list feature, enabling users to conveniently print their shopping lists for offline use.

With the implementation of these features, our system provides a comprehensive, convenient, and efficient solution for ingredient and recipe management, helping users better plan and manage their daily meals and improve their quality of life.

V. TESTING

We have conducted comprehensive unit testing for the frontend, backend, and database to ensure the system's stability and reliability.

For frontend testing, we used Axios Mock. Axios Mock allows us to simulate HTTP requests, enabling the testing of frontend components under different request statuses. The frontend unit tests cover the main React components and functionalities, ensuring that components render and respond correctly under various inputs and states.

For backend testing, we used Jest for unit testing. Jest is a widely-used JavaScript testing framework, particularly suitable for testing Node.js applications. The backend unit tests cover various API functional modules, including user management, menu management, ingredient management, recipe management, and shopping management. This ensures that each API endpoint correctly handles different requests and data states. To further ensure API functionality and performance, we also used Postman for API testing, simulating various user operations and data scenarios to verify that the APIs correctly process and return expected results.

For database testing, we used MongoDB Memory Server for unit tests. MongoDB Memory Server allows us to run a MongoDB instance in memory, facilitating rapid testing of database operations without relying on a real database. The tests cover CRUD operations for user data, ingredient data, recipe data, and shopping list data, verifying the integrity and constraints of the database models, ensuring data consistency and reliability.

In addition to unit testing, we also performed manual testing. After completing all unit tests, we conducted manual inspections by simulating real user operation flows. This ensured that each functional module operates as expected. This testing method helps uncover UI and business logic issues that automated tests might not cover.

Through these thorough testing processes, we have ensured that our system provides a reliable and robust solution for users.

VI. METHODOLOGY

Our team adopts agile software development mindset [4] and uses Jira for task management. Team members assign tasks to themselves based on their interests and expertise. We have several sprint periods set according to the team members' schedules to ensure optimal workflow. For code submission, we follow a sprint-based branch merge strategy.

We conduct weekly meetings to discuss any issues that arise during project execution. This frequency is carefully chosen to strike a balance between not disrupting independent work and ensuring adequate collaboration. Our team operates with a flat structure, without a formal leader. However, roles are generally defined with the database designer acting as the architect, the frontend developer as the designer, and the backend developer handling requirements analysis, communication, documentation, and API coding. This dual-driven approach by data and business requirements guides the entire project development.

Throughout the process, we place a strong emphasis on documentation, considering it the most crucial communication tool within the development team. Every design diagram, API, bug, task breakdown, and weekly meeting minutes are meticulously recorded in the GitHub wiki page.

_page_3_Picture_5.jpeg

Figure3 – Detailed wiki page of our project

VII. TOOLING

In our project, we leverage a variety of efficient tools to streamline the development process and ensure high-quality project completion. These tools not only optimize our workflow but also enhance team collaboration and project management capabilities.

Firstly, as previously mentioned, Jira is our primary tool for daily task management and progress monitoring. By using Scrum and Kanban board, we can effectively break down tasks and manage iterations. Jira enables us to define project requirements, set priorities, self-assign tasks, and track each task's progress in real-time. Its reporting features, such as burndown charts and velocity charts, help us assess the project's overall health and make timely strategic adjustments to ensure on-time delivery. Jira's flexibility and scalability allow us to customize workflows and views according to different project stages and needs, enhancing team collaboration and project transparency.

For team collaboration, we rely on Zoom for video meetings. Zoom's stability and versatility ensure seamless communication during online meetings. With Zoom, we can easily share screens and generate meeting minutes automatically, enhancing communication efficiency and collaboration.

For code version control, we primarily use Git. Git allows team members to work independently on different branches, reducing code conflicts. With Git, we meticulously record changes for each commit, making it easy to revert to previous versions when needed, ensuring code stability and reliability. To simplify version control, we use GitHub Desktop, which provides a graphical user interface for executing Git commands, such as commit, pull, and merge branches, without extensive command-line operations. GitHub Desktop's intuitive interface lowers operational difficulty and improves code review and collaboration efficiency, allowing the team to focus more on development.

Postman is another essential tool for our backend development and testing. It is specifically designed for independent API testing and supports creating and executing tests with various payloads. Postman's intuitive interface allows us to quickly create complex API requests and inspect response data, ensuring the reliability and performance of backend services.

To deploy our application efficiently to remote servers, we use Docker. Docker's containerization feature allows us to pack frontend and backend modules along with their dependencies, enhancing application portability. This method simplifies the deployment process and significantly reduces environment-related issues. Additionally, combining Git with Docker Compose allows for quick pulling of the newest code in repository, building, and run the application.

For documentation, we use Markdown language to create and maintain documentation. Markdown's simple syntax makes documentation easy to write and read for other developers. With Markdown, we can quickly generate clear, formatted documents, improving the readability and maintainability of our project.

Throughout the project, we effectively utilized ChatGPT as an assistant. Whether for code debugging, algorithm optimization, or document writing, ChatGPT provided valuable suggestions and guidance, making the development process smoother and more efficient. However, it is worth noting that there are occasional issues when using the ChatGPT. For instance, during backend development, ChatGPT sometimes recommended incorrect algorithms, and generated code often contained erroneous file paths. This highlights the widely accepted notion that AI cannot yet fully replace human developers, reminding us to understand the code and project architecture independently and not overly rely on AI for tasks requiring creativity and logical thinking.

By leveraging these tools and techniques, our team ensures efficient development processes, highquality outcomes, and effective collaboration throughout the project lifecycle.

VIII. DISCUSSION

Our team has achieved our goals. While there is still room for improvement for the application, it is gratifying to see that both our must-have features and should-have features are functioning as intended.

During the project development process, we implemented systematic testing and optimization measures to ensure that each functional module operates as expected. Although we encountered some issues throughout the development phase, they were within our control and were promptly resolved through collective team effort.

For the must-have features, such as ingredient management and recipe management, we conducted repeated testing and optimization to ensure their stability under various conditions.

For the should-have features, we also conducted comprehensive testing and debugging, such as menu recommendation feature. Although thisfeature is not as critical as those must-haves, it play a significant role in enhancing the user experience.

Overall, we have successfully achieved our expected goals within the planned timeframe.

IX. CONCLUSION

Through a comprehensive development process and the application of various software tools and techniques learned from the course, we successfully built an intelligent food management system. During the project development process, we gained many valuable experiences and lessons.

First, we recognize the importance of team communication. During the development process, we encountered problems with dirty data and redundant code, which were difficult to detect through regular testing. Fortunately, regular meetings helped us identify and resolve these issues in a timely manner.

In addition, we recognize the importance of technique selection. During deployment, we initially using Render [5] for backend hosting, while we found that the application latency was too high and it was difficult to address this issue through code optimization. Ultimately, we solved this problem by using Oracle Cloud Infrastructure and Docker instead.

Our project was not without flaws, but it did yield valuable results. Upon completion of the project, we evaluated the current state of the application and identified areas for future improvement:

  • User Interface and Experience: Although our interface design is simple and intuitive, there is still room for improvement in user interaction. Adding more friendly animations and feedback prompts could make user operations smoother. Furthermore, enhancing the responsive design will ensure the system performs well on various devices (such as mobile devices and tablets), further improving the user experience.

  • Ingredient Data Management: Introducing smart sensors or barcode scanning functionality could automatically update food stock data, reducing the workload of manual input and improving data accuracy. Additionally, adding historical data analysis functions could help users understand their consumption and usage patterns, providing more targeted suggestions and optimization plans.

  • Social Features: Creating a user community or forum where users can share recipes, cooking tips, and experiences would increase social interaction and user engagement. Enhancing the sharing functionality for recipes and shopping lists would allow users to share their favourites and recommendations via social media or email.

By implementing these improvements in the future, we hope to further enhance the system's functionality and user experience, making it more attuned to user needs and providing a more comprehensive and efficient solution for ingredient and recipe management.

X. REFERENCES

[1] Pepperplate. (n.d.). Retrieved from https://www.pepperplate.com/
[2] Plan to Eat. (n.d.). Retrieved from https://www.plantoeat.com/welcome/
[3] DVO. (n.d.). Retrieved from https://www.dvo.com/
[4] Wikipedia Contributors. (2018, December 4). Agile software development. Wikipedia; Wikimedia Foundation.https://en.wikipedia.org/wiki/Agile_software_devel opment
[5] Cloud Application Hosting for Developers | Render. (n.d.). Cloud Application Hosting for Developers | Render. https://render.com/