Eaten is a meal planning app, that aims to help its users reach their health goals through curated recipes, automated calorie counting and progress tracking
The team dev log is kept as a markdown file in the docs repository. The group has meetings to determine the project's direction, progress task priority, and dev task assignment. Tasks are selected on a volunteer basis to accommodate varying dev availability and to encourage flexibility. Length of meetings and discussions are also kept in this log. The devlog can be found here
- This feature is on the initial app activity the meal diary screen. This screen can be accessed by clicking on the cutlery icon on the bottom navigation bar. Users can scroll up and down to view all the food items and the amount they are consuming for the day.
- This feature is on the meal diary screen. Users can set the number of calories they want to consume for the day by clicking the Budget text below the progress bar.
- This feature is on the meal diary screen. Users can add an estimate of the calories they burn in a day by clicking the Exercise text below the progress bar.
- This feature is on the meal diary screen. Users can see at a glance the total calories from food numerically and as a graphic progress relative o the goal.
- This feature is on the meal diary screen. Users can instantly see graphically and numerically on the progress bar the effect of any changes to the meal entries, the actual exercise calories and the calorie goal.
- This feature is on the meal diary screen. Users can add new meal entries from a food, drink and meal database by clicking the green plus button at the bottom of their daily log. This launches a screen which allows the user to select a list of food, meals, or drinks. The user is shown a selection of items with images, names and calorie count for each item. The user can then click on the item cards to show a context UI and can add the selected item by clicking the green plus button.
- This feature is on the meal diary screen. Users can can click on any entry in the meal diary to show a context UI. The user can click on the red trash can to delete an entry or the pencil to modify the quantity of an entry. Modification allows users to alter the log so that it reflects the actual consumption of the user.
- This feature is on the meal diary screen. Users can click on arrows on the top center of the screen above the progress bar date traversal 1 day at a time. Users can click on the date to show a date selector for more efficient selection of further out dates.
- This feature is a separate screen the recipe book. This screen can be accessed by clicking on the book icon on the bottom navigation bar. Users are presented a scrolling list of cards with item images, names, and calories. Users can switch between lists by selecting the desired tab in the middle of the screen.
- This feature can be accessed from the recipe book. Users can click the floating action button then the plus icon to show a new item entry screen. users can add food by selecting the food tab then the action button. Similarly users can click the meal tab or the drinks tab then the action button to add items to those lists. Users can enter food details and add the item using the OK button. The user is notified visually if input does not meet the app requirements.
- This feature can be accessed from the recipe book. Users can click the floating action button then the plus icon to show a new item entry screen. users can add food by selecting the food tab then the action button. Similarly users can click the meal tab or the drinks tab then the action button to add items to those lists. In this tab there is recycler view with the familiar add button. Clicking this add button will navigate the user to the recipe book. If a recipe is selected that contains its own ingredients, the individual ingredients are added in place of that recipe. Once added these ingredients can be further modified or removed to meet the user's goals. The user is notified visually if input does not meet the app requirements.
- This feature can be accessed from the recipe book when adding a new recipe. Users can select up to 5 flags to further describe the recipe they are adding. Flags consist of alcoholic, spicy, vegan, vegetarian and gluten free
- This feature can be accessed from the daily progress activity screen. User's can scroll through 4 different bar charts corresponding to their calorie intake, net calories, burnt calories and weight. This can be accessed via the leftmost nav button.
- This feature is in the trends activity screen. User's can scroll through 4 different graphs corresponding to their calorie intake, net calories, burnt calories and weight. Results have the option to span the previous week, month, last 3 months, last 6 months and year. This can be accessed via the fourth nav button from the left.
- This can be enabled in the DBSelector class by commenting the appropriate lines in the constructor lines 23-28
Our team used Android Studio Chipmunk 2021.2.1 Patch 1 for development on Windows 10. We tested our code both on a Nexus 7 device and several Android virtual devices created in Android studio. Android virtual devices used had SDK 23 for testing and SDK 30 for debugging.
Application classes handle program maintenance through the course of its life cycle
- Main handles database and device related maintenance and path handling
Business classes handle program logic related to their activities.
- The meal diary ops class handles logic and operations related to the main app activity; logging users meals. This class handles meal log requests and updates to and from persistence and date manipulation to display the uesr's history for a given date they'd like to view.
- The recipe book ops handles logic and operations related to the recipe book and curated recipe functionality. This class handles the retrieval and storage of food, drink, and meal recipeto and from persistence classes.
- The trend ops handles the retrieval of a user's history to create meaningful and informative graphs
- The user data ops handles logic and operations related to the active user. This class handles the retrieval, storage and updating of a user's personal data. In future updates, it will also detect when vital information is missing thus prompting the user to enter their information.
Object classes represent the meal planner's well defined entities that are known and shared by Business, Presentation, and Persistence.
- This is the base class at the top of the edible heirarchy that defines essential attributes and functionality all edible items should have.
- Inside of the edible hierarchy, below edible, this abstract class defines additional properties and functionality more complex Edibles require.
- Inside of the edible hierarchy, below prepared edible, this class defines essential attributes and functionality for all drinks, with or without ingredients
- Inside of the edible hierarchy, below prepared edible, this class defines essential attributes and functionality for all meals
- Inside of the edible hierarchy, below edible, this class defines essential attributes and functionality for all edibles that appear in the edible log such as maintaining their calories with respect to the original edibles base measurements.
- This class defines essential attributes and functionality for each instance of a user's diary history
- Serves as a central source to validates generated values and sanitize user input
- This class defines essential attributes and functionality for all edibles that appear as an ingredient in a meal
- This class defines essential attributes and functionality for all edibles that appear as an ingredient in a drink. In future updates, this class will be imperative for the redistributing of ingredients when its alcohol contents are modified
- This class is responsible for holding relevant constants throughout the codebase
- This class defines essential attributes and functionality for all individual users
- This class defines the collection of data requested by the buisness class trendsops. Dataframe provides summary statistics of the data contained within
- This class handles calorie conversions given base measurements of an edible and a seperate set of measurements to convert to.
Persistence classes interact directly with databases through buisness classes and use well defined interfaces to retrieve and store information.
- An interface that defines database operations in relation to the logs and a user's history
- An interface that defines database operations in relation to its users data
- An interface that defines database operations in relation to recipes
- This class provides methods that allow the retrieval and storage of data into a in-memory based database (does not persist through restarts).
- This class provides methods that allow the retrieval and storage of data into a HSQL database (persists through restarts). It is worth mentioning, most tables have a "custom" counterpart. This will be more relevant in future updates to accomodate a user's desire to add their own recipes and acts as a seperation between the provided curated recipes and the recipes users may add.
- This class provides easy toggleability between the data access stub and HSQL DB using dependency injection (see lines 24 and 25 in DBSelector.java - whichever line is uncommented is the active database and handles all processes)
Presentation classes handle all UI activities. Drawing new elements on the screen, displaying information, accepting user input, handling user gestures, etc.
- This class handles the UI for the meal diary activity. This is the user interface for logging food consumed. This activity shows a users daily progress at glance and allows the user add their days exercise activity.
- This class handles the UI for the recipe book. This is the user interface to view the availible food, meal and drink recipes. In future updates, user's will be able to select one of these recipes to view more in-depth details and add their own custom recipes.
- This class handles the UI for the daily progress. This is the user interface to view the week's current progress through various scrollable bar charts.
- This class handles the UI for the user trends. This is the user interface to view the user's progress and history trends through various scrollable graphs over a user selected time span.
- This is an interface of methods that allow fragments that comprise the meal diary to send and recieve infromation from the parent activity.
- This is an interface of methods that allow fragments that comprise the recipe book to send and recieve infromation from the parent activity.
- This is a recycler view adapter for the meal diary activity. This adapter handles the display of different fragment layouts in a recycler view.
- This is a recycler view adapter for the recipe book activity. This adapter handles the display of different fragment layouts in a recycler view.
- This is a class that allows the use of the observer design pattern in Android Activities. UI elements can be set to observe this class for changes and allow all observers to update their own elements when this class is updated.
- Fragments are reusable UI components that perform specific functions in activities. The most important example is the navigation fragment which is shared across all activities.
- All objects have been overhauled
- Moved around logic and processing including data validation to comply with seperation of concern/don't repeat yourself
- Took persistance out of the presentation layers
- Added new unit, integration and acceptance tests
- All tabs are now functional
- Edibles in a log can now be modified without side effects (only affects the current edibleLog)
- Moved stub to correct location, hsql is now default and stub is only usable by unit and integration test calsses
- Fixed ingredient patching