Smart Fridge Inventory Software

Smart Fridge Inventory Software

Summary
The Smart Fridge Inventory System (SFIS) is a software application developed as a group project by my group for the EECS3311 course.
Tech
Java
MySQL
JUnit
JDBC
Created
Apr 29, 2023 07:33 AM

Fridge Tracking Application For EECS 3311 Course

Introduction

The Smart Fridge Inventory System (SFIS) is a software application developed as a group project by my group for the EECS3311 course. The primary objective of the SFIS is to help users manage the inventory of their fridge effectively. The system allows users to view the items in their fridge, add new items, adjust the quantity of the existing items, and remove the items. Additionally, the system also enables users to create a grocery list and a favourites list.

Agile Process

The project was developed following the agile process, which is an iterative approach to software development. Our team followed the Scrum methodology, which involves planning, daily stand-up meetings, sprint reviews, and retrospectives. This process helped our team to manage the project effectively, prioritize tasks, and ensure that the software met the client's requirements.
 

Application UML and Architecture

Code Share
notion image
UML
notion image
App Architecture
notion image

Design Choices Following SOLID Principles

Single Responsibility Principle:
  • The responsibility of the food item descriptions and managing the number of available items is split into the FoodItem Class and Stock Interface.
  • The responsibility of accessing and writing to different-purpose databases is split into the FridgeDatabase Class (for storing user's fridge items) and ItemDatabase for storing a list of available items that the user can add to their fridge.
Open/Closed Principle:
  • In the case that items outside of the fridge were to be stored we use inheritence with the StoredItem Interface and Inventory Interface which can support concrete classes for Fridge and FridgeItem and allow simple extension for new classes such as PantryItem.
  • In the case where other forms of data must be stored, a reference to that item just needs to be stored in the StubDB class, and a new class definition for a new database.
Liskov Substitution Principle:
  • Items can be added to the fridge regardless of whether they were manually created by the user or selected from a list generated from the Database.
  • The Page superclass has 2 main functions to create a child Page and to return to the previous Page to be able to create and display windows in a recursive manner while easily being able to go back to the previous window/page. All “something”-View subclasses inherit the functionality in the same way and are replaceable with the Page superclass
Interface Segregation Principle:
  • All interfaces (Stock, StoredItem, Inventory, DB) are kept simple so that they abstract only the functionalities that extending classes will have to implement.

Dependency Inversion Principle:

  • The DB Interface abstracts all the implementation of the actual database access and management. The client simply needs to specify which database they are using (StubDB or FunctionalDB) when creating a DB object and simply call the abstracted methods.
  • The Stock Interface abstracts the implementation of the management of how much of each food/drink we have in the fridge. The client should simply instantiate either a ContinuousStock or DiscreteStock when calling the increment() and decrement() methods which will modify the storage of the item based on the implementation in the concrete classes.

Evaluation

The SFIS project was evaluated by a Quality Assurance (QA) team and a client team. The QA team reviewed the project and provided feedback on the system's functionality, usability, and reliability.
The client team evaluated the project based on their requirements and provided feedback on the user interface and user experience. The feedback was used to improve the software and ensure that it met the client's expectations.

Refactoring

Major Refactoring 1: Refactor of duplicate code in persistence layer. Description:
notion image
 
Major Refactoring 2: Refactoring Multi-line UI Component Initialization to Custom Extensions
notion image
 
Major Refactoring 3: Refactoring Reused Useful GUI Elements
notion image

Installation

To use the SFIS application, the user must have the following dependencies installed on their system: JUnit 5, JDBC 8.0.23, MySQL, and Java 9 or above.
Additionally, the MySQL must be added to the windows PATH for windows devices. The installation process is described in detail in the project's ReaMe.

Application

Once installed, the user can access the SFIS application by running the SIFS.exe executable file.
The home page of the SFIS displays the list of items in the fridge. The user can search for specific items by entering the text in the search field.
The user can add new items by clicking the + icon and adjust the quantity of the existing items by using the Increment or Decrement buttons.
The user can remove items by clicking the Remove button. The user can add items to the grocery list by clicking the Add to Grocery List button, and export the grocery list by selecting an option from the dropdown and clicking Export. The user can also view and edit their favorites list by clicking the Favorites List button.
 
notion image
⬇️
Download the executable in our repository to try it out!

Conclusion

In conclusion, the SFIS is a software application developed as a group project for the EECS3311 course. The project was developed following the agile process, The SFIS was evaluated by a QA team and a client team, and the feedback was used to improve the software and refactor the code.
✅
This group Project got an A!