By: Team AY1920S1-CS2103T-W11-4 Since: Sep 2019 Licence: MIT

1. Introduction

CaloFit is suitable for those who prefer to track their calories gained from day-to-day meals. CaloFit primarily uses a Command Line Interface(CLI) while still displaying the results through a Graphical User Interface(GUI). You can set your daily calorie target and CaloFit will do its best to help you stay on track.

The CLI is where you can input your command into CaloFit and is a rectangular area near the top of the application, while the GUI is the main screen that you will see upon the startup of CaloFit.
Do not worry if the above terms are not clear as our features will have pictures to guide you along!

As of our latest version, v1.4, CaloFit would be able to run on all computers, be it Windows, Mac, Linux and more!

Currently our product is able to let you set a desired calorie budget, track your meals, provide assistance to keep you on track, and last but not least create a monthly report just for you!

2. About

This user guide provides the user a simple yet useful utility guide on how CaloFit operates.

There will be very minimal prior technical knowledge that the user would need to have in order to use Calofit.

Here are some symbols that we will be using in this guide to help you along:

This icon means that there is important information listed!

add n/spaghetti c/980 Text in a grey highlight represents a command that you can enter to CaloFit.

3. Quick Start

Here are the steps to download CaloFit and start using it immediately!:

  1. Ensure you have Java 11 or above installed in your Computer.

  2. Go to our [GitHub Releases page] and find our latest release! An example is shown in the picture below.

    UserGuideQuickStartReleasesPage


  3. Download the latest version of CaloFit by clicking on the .jar file.

  4. Open Calofit and start using it now!

Refer to Section 5, “Features” for details of each command.

4. UI Overview

This section covers the various parts of the CaloFit user interface.

4.1. Command Box

command bar

The command box is the main means of interacting with CaloFit. Users can enter commands, as detailed in [Commands], in order to work with the app.

To submit a command, the user can press the Enter key. The application will parse and evaluate the command. Any further feedback from the command will be displayed in the feedback box below.

command bar err

If any error is encountered, the command text will not be cleared, and turn red.

4.2. Budget Bar

budgetbar partial

The budget bar shows a visual overview of the meals the user has consumed today. Each meal displayed in the budget bar is proportionately sized to its calories, and is labelled by its dish name. Additionally, a white buffer segment is shown, representing the remaining amount of calories availablee today.

The yellow mark indicates the current budget limit, while the red mark indicates 120% of the current budget limit. This gives you a visual overview as to how much more the user can consume for today, and give a margin of error even when exceeding the budget.

When the total calorie count of meals today exceeds even the 120% mark, the bar will not show a buffer segment. Instead, the meals will occupy the entire width of the bar, remaining proportionate to their calorie counts. The budget marks will also move to the appropriate positions, still representing 100% and 120% of the budget.

Coming in v2.0: When a meal’s bar segment is too small, its dish name will be hidden. Information on the dish still can be viewed as a tooltip, when hovering over the segment.

4.3. Consumed Meals

consumed pane

The Consumed Meals pane will display the current meals that were consumed today. This pane will automatically updating upon adding, editing or deleting meals.

Each meal displays its name and tags, together with its index in the whole list. The edit/delete commands can be given indexes of meals from this list, to manipulate them further.

4.4. Suggested Meals

suggest pane

At the start of the program, the Suggested Meals pane displays all dishes that fit within the remaining calorie budget. As more meals are logged as consumed, it will automatically update and filter out dishes that no longer fit. Additionally, it will also track dishes from directly-added meals, for future reuse.

It also doubles as the result pane for the find command. To toggle it back to suggestion mode, use the suggest command.

Each dish displays its name and tags, together with its index in the whole list. The add command can be given the indexes of dishes from the list, to add them as meals today.

5. Features

Command Format

  • Words in UPPER_CASE are the parameters to be supplied by the user e.g. in add n/MEAL_NAME, MEAL_NAME is a parameter which can be used as add n/Carbonara.

  • Items in square brackets are optional e.g add n/MEAL_NAME [c/CALORIES] can be used as add n/Carbonara c/430 or as add n/Carbonara.

5.1. Meal Tracking

5.1.1. Adding a meal: add

Adds a meal that the user consumed.
There are 2 formats that can be used:

Format 1: add n/MEAL_NAME [c/CALORIES] [t/TAGS]
Inputting calories of the meal is optional.
If the meal is a dish stored in CaloFit, the calories will be taken from CaloFit. If not, a default value of 700 will be added for you,
Tags are completely optional and there is no default tag. You could also have more than 1 tag.

Format 2: add NUMBER_IN_SUGGESTED_MEAL_LIST [NUMBER_IN_SUGGESTED_MEAL_LIST] …​
NUMBER_IN_SUGGESTED_MEAL_LIST is the number that corresponds to the meal in suggested list on the right side of the application. You can also add multiple meals at one go using the indexes. This can be done by separating the numbers with a space. e.g. add 1 2 3

MEAL_NAME can only be a maximum of 30 characters to ensure it displays correctly for you.

Examples usage:
It is lunchtime and you are about to go have some Mushroom Soup. You would like to add the meal into CaloFit to record it down. What do you do?

If format 1 is your preferred choice, you could do the following:

  • Type add n/Mushroom Soup into the command box and press the enter key.

AddCommandInitialFormat1
  • If calofit has the information for the meal (Mushroom Soup in this case), it will grab the relevant information and update the meal log accordingly. The meal that is added will be shown in the result window.

AddCommandAddedFormat1
  • If CaloFit does not have the information, and the information is not provided, the default calorie information will be 700 calories

If format 2 is your prefered choice, you could do the following:

  • Type find mushroom soup into the command box and press the enter key.

AddCommandFind1Command
  • If the meal exist in our meal database, it will show up under the suggested meals header.

AddCommandSearchResult
  • Afterwards, enter the command add 1 to the command box and press the enter key.

AddCommandAdd1
  • The meal "Mushroom Soup" will then be added to the consumed meals.

AddCommandAdd1Success

Commands below are some other example commands:

  • add n/Spaghetti c/480 t/tasty - Adds a meal named Spaghetti of 480 calories with the tag "tasty".

  • add n/Chicken Rice c/500 - Adds a meal named Chicken Rice of 500 calories.

  • add n/Mushroom Soup - Adds a meal named Mushroom Soup of 700 calories by default.

  • add 1 - Adds the first meal shown under the suggested meal section.

  • add 1 2 3 - Adds the first and second meal shown under the suggested meal section.

5.1.2. Editing previous meal entry : edit

Edits a meal that the user previously consumed today.
Format: edit MEAL-NUMBER [n/MEAL-NAME] [c/CALORIES] [t/TAGS] [tr/TAGS-TO-REMOVE]
The input of at least 1 field (either NAME, CALORIES or TAGS) is required. A mix of the different fields is possible as well with some restrictions stated below.

You cannot add tags and clear all tags at the same time. (i.e. You cannot execute a command that contains both "t/" and "t/[TAGS]".)

Example usages:
While rushing to type in the meals, you misspelled "Mushroom Soup" as "Mushroom Soop" and added 2000 calories instead of the correct 200 calories. What do you do?

  • Type "edit 1 n/Mushroom Soup c/200" into the command box and press the enter key.

EditCommandInitial
  • The name of the meal will be edited to "Mushroom Soup" and the calories will be edited to the correct amount of 200 in the calorie bar.

EditCommandSuccess

Commands below are some other example commands:

  • edit 1 n/Wanton Noodle c/1000 - Edits the meal at index 1 to name "Wanton Noodle" with calorie 1000.

  • edit 2 n/Chicken Rice - Edits the meal at index 2 to name "Chicken Rice" without changing anything else.

  • edit 3 c/500 - Edits the meal at index 3 to have a calorie count of 500 without changing the other fields.

  • edit 4 t/tasty - Adds the tag "tasty" to the existing list of tags for meal at index 4.

  • edit 5 tr/tasty - Removes the tag "tasty" if it exists in the list of tags for meal at index 5.

  • edit 6 t/ - Clears all tags for meal at index 6.

5.1.3. Deleting previous meal entry : delete

Deletes a meal that the user previously consumed today.
The meal will be removed from the consumed meal section
and the calorie tracking bar.

Format: delete MEAL_NUMBER [MEAL_NUMBER] …​

Example usage:
You thought you were going to have Mushroom Soup for lunch when you were queuing. So you decided to add Mushroom Soup to the meal log using the add command. However, while queuing, your boss called you saying that there is an emergency and wants you back in the office immediately. You abandon the queue and go back to the office. Since you did not consume the meal, you would want to remove it from the meal log. What do you do?

  • Type delete 1 into the command bar and press the enter key.

DeleteCommandDelete1
  • When the meal is successfully deleted, a message will appear in the result box and the meal will be removed.

DeleteCommandDelete1Success
"1" can be changed to any number in the consumed meal section. However, in this example, Mushroom Soup is located at index 1.

Commands below are some other example commands:

  • delete 1 - deletes the first meal in the consumed meal section.

  • delete 1 2 3 - bulk deleting of meals 1, 2 and 3 in the consumed meal section.

5.2. Find meals in the meal database: find

Searches for meals that contains the words the user has inputted.
The search results will be shown under the "Suggested Meals" section of the application.
The find feature will replace the suggest feature when being used, vise versa. Thus, in order to get the suggest feature back, the user would have to type "suggest" into the command box.

Example usage: You would like to know the amount of calories in an "Apple Pie" which you know exist in the CaloFit database. However, you do not want to scroll through the entire suggested list just to find it.

  • Type find apple pie into the command box and press the enter key.

FindCommandFindApplePie
  • The apple pie result will show under the suggested meals section with its relevant calorie information.

FindCommandFindApplePieSuccess

Format: find MEAL_WORD

5.3. Suggesting Meal options: suggest

Suggest possible meals based on user calorie intake budget.
The available meals will be shown under the "Suggested Meals" section of the application.
The suggest feature is automatically toggled when the application starts, however if you use the find feature which replaces the suggest feature, then the suggest feature can be toggled back by typing "suggest" into the command box.

Example usage: You’re tired from work and you don’t want to think about what to eat for the day, you just want to have a meal to keep yourself full and stay within the calorie budget that you want set for yourself.

Type "suggest" into the command box and press the 'enter' key, if you have previously used the find feature to look for a meal.
SuggestCommandToggle
  • The budget was set to a huge budget to show that there are actually a list of food inside as shown in the image below.

SuggestCommandBefore
  • The budget was then set to an average male budget of 2200, which then could be seen in the image that only those within the budget was shown.

SuggestCommandAfter

Format: suggest

5.4. Notification that a meal is missed

A notification will automatically be prompted when the application starts up or every 10 minutes if a meal is missed.
This feature cannot be disabled and will start once the application starts.

The first meal will always be breakfast, hence no matter at which timing, if the first meal is not consumed, it will always notify the user as breakfast missed.
If lunch have not been consumed after 8pm, notification will change and notify user that they have not consumed their dinner instead of lunch, as consuming two meals at once is not healthy.
Notification of dinner will notify the user till 11.59pm, after which it will be counted as breakfast.
Notification will be prompted:
- After 10am for breakfast
- After 2pm for lunch
- After 8pm for dinner
Meals that will be counted:
- As breakfast - anytime
- As lunch - after 11am
- As dinner - after 4pm
  • If breakfast is missed this will be how it looks like

NotificaitonMissedBreakfast
  • If lunch is missed this will be how it looks like

NotificaitonMissedLunch
  • If dinner is missed this will be how it looks like

NotificaitonMissedDinner

5.5. Setting calorie intake budget: set

Set user calorie intake budget for today.
This will update the calorie bar to show reflect the new amount of calories remaining. If in suggestion mode, the suggest meals will also be refreshed depending on the calories remaining as well.

Format: set CALORIES

Examples:

  • set 2500 Sets the calorie budget to 2500 calories.

5.6. Generating a Report: report

Want to have your very own report that summarises your calorie intake progress over this month? Here are the steps to create one now!:

  1. Type the word "report" in the command box. A picture is shown below highlighting the command box.

    UserGuideReportStep1


  2. Press "Enter" and a separate window which is the report will appear in the center of your screen as highlighted in the picture below.

UserGuideReportStep2


If an error message pops up like the one in the picture below, do not panic! This simply means that you have not entered a meal into CaloFit for this month. To fix this, go ahead and add a meal, and you should now be able to generate your report!
ReportCommandError


Your report will display the following statistical data for you to monitor your own progress!:

  1. Your Maximum, Minimum and Average calorie intake per day of the current month.

    Average value is rounded.
    Average value is calculated by totalling your calorie intake in that month so far and dividing it by the total number of days in that month, NOT the number of days that have passed in that month so far.
  2. The number of days where calorie intake exceeded calorie budget of the month.

  3. Your list of most consumed dishes of the month.

  4. Your calorie intake per day over the entire month.

  5. The quantity of each type of dish consumed in that month.

Below is a picture of the report showing where each type of information mentioned above can be found, corresponding to their number.

UserGuideReportStep3


Changing your system time at any point while CaloFit is running may affect the report shown!
To ensure correct data is displayed to you, allow 2 minutes for CaloFit to update itself before creating your report.

Format: report

5.7. Shows an overview of commands usable in CaloFit: help

Displays all the commands that are usable in CaloFit, including examples of how to use them.
Format: help

6. Command Summary

  • Add add n/MEAL_NAME [c/CALORIES]
    e.g. add n/duck rice c/360

  • Add add NUMBER_IN_SUGGESTED_MEAL_LIST
    e.g. add 1

  • Edit : edit MEAL_NUMBER [n/MEAL_NAME] [c/CALORIES]
    e.g. edit 1 n/duck noodle c/250

  • Delete : delete MEAL_NUMBER
    e.g. delete 3

  • Set : set CALORIES
    e.g. set 2600

  • Find : find MEAL_NAME
    e.g. find soup

  • Suggest : suggest
    e.g. suggest

  • Report : report
    e.g. report

  • Help : help
    e.g. help

7. Command Syntax Notes

  • Calorie values are positive integers from 0 to 2 billion, inclusive.

  • Dish names must be alphanumeric ([A-Z], [a-z],[0-9]), and at most 30 characters long.

8. Trouble shooting/FAQ

Q: Do I need to key in the date or time?
A: There won’t be a need to as CaloFit will automatically update the current system date and time for the user.

Q: Do I have to pay for anything?
A: Currently CaloFit is totally free!

Q: Will the dishes that I add be saved for future use?
A: The dishes added will be saved for future use! Clearing of outdated dishes will come in v2.0.

Q: What are the dishes stored when I just installed CaloFit?
A: Currently we have a sample dish database loaded, however we plan to integrate the database from the Health Promotion Board(HPB) in v2.0 of CaloFit!

9. Product Glossary

CaloFit → The name of our application! :) Java → A widely used programming language. Typing "java 11 download" into Google should show you page results downloading Java 11. Tag(s) → A description that is entirely up to you, but do note that tags can only be alphanumeric.