By: AY1920S2-CS2103T-W12-4 Since: Feb 2020 Licence: MIT

1. Introduction

1.1. Product Information [Done by Zain Alam]

Greetings, and welcome to CookBuddy!

Looking for an all-in-one solution to manage your recipe? Look no further!

CookBuddy is an integrated platform fully customized for users with the aim of helping you manage your recipes effectively. The application allows you to keep track of your recipes. It looks like you will never have to worry about finding your recipe anymore!

CookBuddy uses a graphical user interface (GUI) to display your recipes, while allowing interaction using text, which is optimised for users familiar with the command-line, and are fast typists.

If you are looking for a way to easily manage your recipes and have quick fingers, then CookBuddy is definitely for you!

Interested? Proceed to Section 2, “Quick Start” to get started!

1.2. How to navigate this User Guide

This user guide provides documentation on CookBuddy such as a quick start guide and an overview of its features for you to fully utilise CookBuddy.

If you want to find out more about CookBuddy’s features and commands, you can go to the Section 4, “Features” section.

If you need an overview regarding the usage of CookBuddy’s commands, head on to the [Command Summary] section.

Throughout this guide, you may come across a few symbols. They are used to draw your attention to important or note-worthy information.

Here are the symbols used in this User Guide:

This block displays additional notes that contains extra information that you should take note of.
This block displays tips that you may find useful.
This block displays cautions that you should exercise.

2. Quick Start

The following steps will walk you through installing CookBuddy on your computer.

  1. Ensure you have Java 11 or later installed on your computer.

    • If not, download and install the latest Java Runtime Environment from here.

  2. Download the latest CookBuddy.jar from here.

  3. Copy the executable to the folder you want to use as the home folder for CookBuddy.

  4. Double-click the executable to start CookBuddy. CookBuddy’s GUI should appear in a few seconds as shown in the diagram below:

    Ui
    Home page of CookBuddy
  5. Type your command in the command box and press Enter to execute it. e.g. typing help and pressing Enter will open the help window.

  6. Some example commands you can try:

    • list : lists all the recipes stored in CookBuddy.

    • new n/Ham Sandwich ing/bread, 2 slices; ham, 1 slice ins/put ham between bread; serve on plate: adds a recipe named "Ham Sandwich" to CookBuddy.

    • delete 3 : deletes the 3rd recipe shown in the current list from CookBuddy.

    • exit : quits CookBuddy.

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

3. Understanding CookBuddy’s GUI [Done by Zain Alam]

This section teaches you on how to utilise CookBuddy’s GUI.

ui components
The different components of CookBuddy’s GUI

There are four major components that you will be using in CookBuddy as seen in the diagram above and will be referenced in the upcoming sections.

  1. Menu bar
    The menu bar contains clickable buttons that you can use to execute certain commands, such as help, help to open the help window.

  2. Command Line
    The command line is where you enter all your commands in CookBuddy.

    After entering your command, you can execute it by simply using the Enter key on your keyboard!

  3. Result Display
    The result display displays feedback from CookBuddy to you after you have executed a command in CookBuddy.

  4. Status bar
    The status bar shows you the path where your data is saved when you are using the features of CookBuddy.

4. Features

The following sub-sections describes the features you can use in CookBuddy.

COMMAND FORMAT
  • Words in UPPER_CASE are values of the parameters to be supplied by the user.

    • In find n/RECIPE_NAME, RECIPE_NAME refers to the value of the n/ parameter supplied to the find command.

  • Words in square brackets indicate that they are optional. [t/TAG] means the t/ parameter is optional.

Please follow the format specified strictly and carefully.

4.1. Command History [Done by Kevin]

You can view previously entered commands with Page Up and Page Down.

Ensure the Command Box is in focus.

To view the previous command in the command history, press Page Up.

To view the next command in the command history, press Page Down.

4.2. Help — help

You can list all the commands recognised by CookBuddy by typing help into the command box and pressing Enter.

If you also specify a command after typing help, CookBuddy will show how to use that specific command.

Format: help [COMMAND]

You can also execute this command by using the F1 key on your keyboard.

Example 1: You can type help and CookBuddy will display the commands that it recognises.

Expected Outcome

A separate help window will appear.

helpwindow

Example 2: You can type help delete and CookBuddy will show you how to use the delete command.

Expected Outcome

A separate help window will appear with details on the delete command’s usage.

helpwindowdelete

4.3. Adding a recipe — new [Done by Kevin]

You can add a new recipe to CookBuddy using the new command.

Parameters in bold indicate they are mandatory.

Format: new n/NAME ing/INGREDIENT, QUANTITY [; …​] ins/INSTRUCTION [; …​] [p/PATH] [cal/CALORIES] [s/SERVING_SIZE] [r/RATING] [t/TAG [, …​]]

Remember to follow the format specified strictly and carefully.

CookBuddy accepts the following parameters:

  • n/ - name of the recipe

  • ing/ - ingredients in the recipe

  • ins/ - instructions to follow

  • p/ - path of the recipe’s photo

  • cal/ - calories in the recipe (in kcal)

  • s/ - serving size of the recipe (any integer greater than 0)

  • r/ - personal rating of the recipe (any integer between 0-5 inclusive)

  • d/ - difficulty in following the recipe (any integer between 0-5 inclusive)

  • t/ - tags (separated by commas)

Example 1: You can enter new n/Fried Rice ing/White rice, 1 cup; salt, 1 gram ins/Fry the rice; add salt into CookBuddy, and a new recipe with the following attributes will be added:

  • Name: Fried Rice

  • Ingredients:

    • 1 cup of white rice

    • 1 gram of salt

  • Instructions:

    1. Fry the rice

    2. Add salt

Expected Outcome

new before
1) If you would like to add a recipe to CookBuddy, enter the new command including the attributes of the recipe
new after
2) After using the new command, the new recipe will be added to CookBuddy and will be displayed.

4.4. Viewing a Recipe — view

You can view a recipe at the given index on CookBuddy using the view command.

Format: view INDEX

INDEX must be a positive integer value, within the range of the number of recipes in your CookBuddy.

Example: You can type view 2 and CookBuddy will display you the recipe at index 2 on the main page.

Expected Outcome

view before
1) You want to view the second recipe in CookBuddy
view after
2) After using the view command, the recipe will be displayed to you

4.5. Assigning a time to a recipe — time [Done by: Adarsh Chugani]

You can assign a time to an existing recipe from CookBuddy using the time command.

Format: time INDEX TIMING

  • INDEX must be a positive integer value, within range of the number of recipes in CookBuddy.

  • The timing specified must be in the format hh:MM:ss

  • for the timing, it is optional to include minutes and seconds. If they are omitted, they will be set to 0.

Example: You can type time 1 00:10:00 and CookBuddy will assign the recipe at index 1 a timing of 10 minutes.

Expected Outcome

timecommand before
1) You want to assign the first recipe in CookBuddy a timing of 10 minutes.
timecommand after
2) After typing in time 1 00:10:00 command, the recipe time will be updated accordingly

4.6. Deleting a recipe — delete

You can delete an existing recipe from CookBuddy using the delete command.

Format: delete INDEX

Example: You can type delete 1 and CookBuddy will delete the recipe at index 1.

  • INDEX must be a positive integer value, within the range of the number of recipes in CookBuddy.

Expected Outcome

delete before
1) You want to delete the first recipe in CookBuddy
delete after
2) After using the delete command, the recipe will be removed from CookBuddy

This command cannot be undone. Once a recipe has been deleted, its respective data entry in the save file will be permanently deleted.

+

4.7. Modifying a recipe — modify

You can modify the attributes of an existing recipe in CookBuddy using the modify command.

Format: modify INDEX [ing/INGREDIENT, QUANTITY [; …​]] [ins/INSTRUCTION [; …​]] [cal/CALORIES] [s/SERVING_SIZE] [r/RATING] [t/TAG [, …​]]

INDEX must be a positive integer value, within range of the number of recipes in CookBuddy.

Remember to follow the format specified strictly and carefully.

4.7.1. Modifying a recipe’s ingredients

You can modify a recipe’s ingredients by appending ing/INGREDIENT, QUANTITY [; …​] to a modify command.

Example: You can type modify 1 ing/ham, 2 slices and CookBuddy will modify the ingredients of the 1st recipe in the list to contain 2 slices of ham.

4.7.2. Modifying a recipe’s instructions

You can modify a recipe’s instructions by appending ins/INSTRUCTION [; …​] to a modify command.

Example: You can type modify 2 ins/boil eggs; slice apples and CookBuddy will modify the instructions in the 2nd recipe to contain two instructions:

  • boil eggs

  • slice apples

4.7.3. Modifying a recipe’s tags

You can modify a recipe’s tags by appending [t/TAG [, …​]] to a modify command. If you want to remove all the tags from the recipe, append t/ instead.

Example 1: You can type modify 2 t/lunch, dinner and CookBuddy will update the tags in the 1st recipe to contain two tags:

  • lunch

  • dinner

Expected Outcome

modifytag before
1) You want to modify a recipe’s tags in CookBuddy
modifytag after
2) After using the modify command, the recipe’s tags will be changed accordingly

Example 2: You can type modify 1 t/ and CookBuddy will remove all the existing tags from the 1st recipe.

Expected Outcome

modifyremovetag before
1) You want to remove all the tags from a recipe in CookBuddy
modifyremovetag after
2) After using the modify command, the recipe’s tags will be removed accordingly

4.8. Favouriting a recipe — fav [Done by: Adarsh Chugani]

You can favourite an existing recipe from CookBuddy using the fav command.

Format: fav INDEX

  • INDEX must be a positive integer value, within range of the number of recipes in CookBuddy.

  • A favourited recipe is indicated by a red filled heart.

Example: You can type fav 1 and CookBuddy will favourite the recipe at index 1.

4.9. Un-Favouriting a recipe — unfav [Done by: Adarsh Chugani]

You can un-favourite an existing recipe from CookBuddy using the unfav command.

Format: unfav INDEX

  • INDEX must be a positive integer value, within range of the number of recipes in your CookBuddy.

  • Recipes are not favourited by default.

  • This command is only useful if you wish to un-favourite a recipe that is already favourited.

  • A non-favourited recipe is indicated by a heart with a read outline and no fill.

4.10. Marking a recipe as done — done [Done by: Adarsh Chugani]

You can mark an existing recipe from CookBuddy as being done using the done command. This indicates that the recipe has been attempted.

Format: done INDEX

  • INDEX must be a positive integer value, within the range of the number of recipes in your CookBuddy.

Example: You can type done 1 and CookBuddy will mark the recipe at index 1 as being done, indicating that it has been attempted.

4.11. Un-Marking a recipe as done — undo [Done by: Adarsh Chugani]

You can un-mark an existing recipe from CookBuddy as being done, using the`undo` command. This indicates that the recipe has not been attempted.

Format: undo INDEX

  • INDEX must be a positive integer value, within range of the number of recipes in your CookBuddy.

  • Recipes are marked as not attempted by default.

  • This command is only useful if you wish to un-mark recipe that is already marked as done.

Example: You can type undo 1 and CookBuddy will un-mark the recipe at index 1 as done, indicating that it has not been attempted.

4.12. Listing recipes — list

You can list all the existing recipes from CookBuddy using the list command. This command also helps to refresh the current recipe list.

Format: list

Example: You can type list and CookBuddy will display all the recipes that are currently stored in it.

4.13. Finding recipes — find [Done by Kevin]

You can find an existing recipe with a particular attribute from CookBuddy using the find command.

Format: find [n/NAME […​]]
Format: find [ing/INGREDIENT 1, QUANTITY [; …​]]
Format: find [ins/INSTRUCTION [; …​]]

CookBuddy can find recipes from one parameter at a time.

4.13.1. Finding a recipe by name

You can find a recipe by its name by running find n/NAME […​].

Example: You can type find n/Ham and CookBuddy will display recipes that contain the word Ham in their name.

Expected Outcome

findName before
1) You want to find recipes that contain Ham in their name
findName after
2) After using the find n/Ham command, recipes that contain Ham in their name are displayed.

4.13.2. Finding a recipe by ingredient

You can find a recipe by its ingredients by running find ing/INGREDIENT […​].

Example: You can type find ing/bread and CookBuddy will display the recipes containing bread as an ingredient to you.

findIngredients before
1) You want to find recipes that contain bread in their ingredients
findIngredients after
2) After using the find ing/bread command, recipes that contain bread in their ingredients are displayed.

4.13.3. Finding a recipe by instructions

You can find a recipe by its instructions by running find ins/INSTRUCTION […​].

Example: You can type find ins/head and CookBuddy will display the recipes containing head in its instructions to you.

findInstructions before
1) You want to find recipes that contain head in their instructions
findInstructions after
2) After using the find ins/head command, recipes that contain head in their ingredients are displayed.

4.14. Counting recipes — count

You can count the total number of recipes stored in CookBuddy using the count command.

Format: count

Example: You can type count and CookBuddy will display the total number of recipes stored in it.

4.15. Deleting all recipes — reset

You can remove all the recipes stored in CookBuddy using the `reset`command.

Format: reset

Example: You can type reset and CookBuddy will clear all the recipes stored in it.

4.16. Exiting CookBuddy — exit

You can exit from CookBuddy using the exit command.

Format: exit

Example: You can type exit and CookBuddy will terminate.

5. Configuration and Recipe Data [Sharadh]

5.1. Configuration

CookBuddy may be easily configured, by editing the key-value pairs in preferences.json, which is automatically created at the same folder where the CookBuddy jar file is. The key-value pairs are detailed in Table 1, “preferences.json key-value pairs”.

Table 1. preferences.json key-value pairs
Key Default value Valid values

windowWidth

740.0

Any positive floating-point (decimal) number

windowHeight

600.0

Any positive floating-point (decimal) number

windowCoordinates: x

398

Any positive integer

windowCoordinates: y

88

Any positive integer

dataFilePath

data/recipebook.json on *nix, \data\\recipebook.json on Windows

Any valid file path appropriate to the OS

"recipeImagePath"

data/images on *nix, data\\images on Windows

Any valid file path appropriate to the OS

5.2. Recipe data

The recipe data is stored in the specified path above, as another .json file, with key-value pairs.

Do not edit the recipebook.json file by hand, nor delete any lines from the file. CookBuddy may fail to read the file and may crash, or worse, overwrite the file with placeholder data.

The file may be copied out elsewhere for editing, but adhere strictly to the format as written out by CookBuddy.

5.3. Image data

Each recipe’s image is stored as a .png file in the pecified folder, with the recipe name, and a unique identifier (UID). If a given recipe does not have an image, CookBuddy will automatically use a placeholder instead, and denote so in recipebook.json.

6. Coming in v2.0 [Done by: Adarsh Chugani]

Look forward to these features coming up in version 2.0 of CookBuddy!

6.1. Adding price (coming in v2.0): price

Adds the price attribute to recipes. With this, to can assign every recipe a specific price.

Format: price INDEX PRICE

Inputs from user:

  • INDEX: the index of the recipe you wish to assign a price to

  • PRICE: the price that you wish to assign to the recipe (accepts both integer and decimal values)

Example: price 1 10.50

This would assign the recipe at index a price of $10.50

6.2. Viewing statistics (coming in v2.0): stats

Format: stats

Displays your statistics: such as percentage of recipes attempted, difficulty breakdown of attempted recipes, amongst many others. With this feature, you will be able to analyse your cooking preferences!

6.3. Suggestions (coming in v2.0): suggest

Format: suggest

This feature suggests a recipe from your CookBuddy application for you to attempt. You will be suggested a recipe based on your statistics, namely the difficulty and ratings of the recipes you have attempted. The suggested recipe is more likely to be a recipe that you have not attempted, as we do not want you to constantly cook the same recipes. Additionally, the suggested recipe is more likely to have a difficulty similar to, or slightly higher than the recipes you have attempted, as we want you to grow as a budding cook!

6.3.1. Scale the recipe (coming in v2.0): scale

This feature scales a recipe to your intended size. The quantities of the ingredients used, as well as the prep time required will be adjusted for your use.

Format: scale INDEX SIZE

Inputs from user:

  • INDEX: The index of the recipe you wish to scale

  • SIZE: The size that you wish to scale the recipe to

Example: scale 1 3

This would scale the recipe at index 1 to be able to serve 3 people.

6.4. Import and export (coming in v2.0): import, export

6.4.1. Import a file: import

Imports recipes from the file at the given path.

Format: import PATH

Inputs from user:

  • PATH: the file path at which the desired file is

Example: import "/docs/recipebook.json"

This would import the "recipebook" JSON file from the docs folder.

6.4.2. Export transactions: export

Exports all transactions to the given path.

Format: export PATH

Inputs from user:

  • PATH: the file path at which the desired file is

Exports the recipes from cookbuddy into the given path

Example: export "/docs/"

This would export the recipes from CookBuddy into a file in the docs folder.

6.5. Printing (coming in v2.0): print

Prints out the recipe.

Format: print INDEX

Key-Words: * INDEX: the index of the recipe you wish to print.

Example: print 1

This would print out the recipe at index 1.

6.6. Sharing Recipes (coming in v2.0): share

Prints out the recipe.

Format: share INDEX SITE

Key-Words: * INDEX: the index of the recipe you wish to share.

  • SITE: the website you wish to share the recipe to

Example: share 1 facebook

This would share the recipe at index 1 on the user’s facebook account.

7. FAQ [Done by Zain Alam]

The following section answers some questions you might have regarding CookBuddy.

Q: Is *CookBuddy safe to use?*
A: Yes, CookBuddy is safe to use. We regularly review our code to ensure that there are no vulnerabilities for hackers to exploit.

Q: Is *CookBuddy secure?*
A: Yes, CookBuddy is secure. Your data is stored only on your computer. No data is sent to any online server.

Q: Do I need an Internet connection to use *CookBuddy?*
A: No. CookBuddy works 100% offline.

Q: Will *CookBuddy receive updates?*
A: Yes. We are a dedicated team of software developers who are constantly collating feedback and running tests on the app. We are also working towards delivering additional features for our users.

Q: Can I use CookBuddy on a mobile device?
A: CookBuddy is designed to work best on a desktop/ laptop computer. We are currently working on releasing CookBuddy on mobile platforms.

Q: How do I transfer my data to another Computer?
A: Download the jar in the other computer and copy the entire data folder over to the same directory. Run CookBuddy and update the preferences.json if necessary.

Q: Can I edit my data folder of *CookBuddy which contains the information regarding my recipes?*
A: No. Please do not modify the data folder of CookBuddy. All modifications of the recipes should be done through the modify command only.

Q: How do I retrieve back all the recipes in *CookBuddy if I accidentally reset CookBuddy?*
A: Right now CookBuddy does not support a backup feature. Thus, it would be best if you do not accidentally use the reset command. The backup feature will be released soon in the near future.

Q: *CookBuddy is not working on my computer. How do I fix it?*
A: Ensure that your computer is running on Java 11 and not other versions. CookBuddy does not support other versions of Java.

8. Command Summary [Done by Zain Alam]

The following section gives a quick summary of all the commands you can use in CookBuddy arranged in an alphabetical order in the table below.

Table 2. Various commands of CookBuddy.
Command Usage

count

Counts the total number of recipes stored in CookBuddy.

delete INDEX

Deletes the recipe at the given INDEX.

done INDEX

Marks the recipe at the given INDEX as done.

exit

Exits CookBuddy.

fav INDEX

Favourites the recipe at the given INDEX.

find [n/NAME […​]] [ing/INGREDIENT […​]]

Finds an existing recipe with the given parameter(s) from CookBuddy.

help

Lists all the commands recognised by CookBuddy.

help [COMMAND]

Displays how to use the COMMAND command.

list

Lists all the recipes.

modify INDEX [ing/INGREDIENT, QUANTITY [; …​]] [ins/INSTRUCTION [; …​]] [cal/CALORIES] [s/SERVING_SIZE] [r/RATING] [t/TAG [, …​]]

Modifies the given parameter(s) of the recipe.

new n/NAME ing/INGREDIENT, QUANTITY [; …​] ins/INSTRUCTION [; …​] [p/PATH] [cal/CALORIES] [s/SERVING_SIZE] [r/RATING] [t/TAG [, …​]]

Adds a new recipe.

reset

Removes all the recipes from CookBuddy.

undo INDEX

Undoes the recipe at the given INDEX.

unfav INDEX

Un-favourites the recipe at the given INDEX.

view INDEX

Displays the recipe at the given INDEX on CookBuddy.

9. Glossary [Done by Zain Alam]

This section will cover and explain certain technical/CookBuddy specific terms used in this user guide in the table below.

Table 3. Explanation of various terms used in this user guide.
Term Explanation

Command Line Interface (CLI)

A user interface where a user is required to use the program by entering commands into a text box.

Graphical User Interface (GUI)

A user interface that includes visuals such as buttons, icons, images, menus etc.

Metadata

Details associated with an entity. For example, metadata of a recipe include the name, ingredients, instructions etc.