Skip to the content.

User Guide


Introduction

CaféCTRL aims to optimize managing of inventory and cash flow in a restaurant. Our CLI platform empowers users to streamline stock inventory, menu and orders. Users will also briefly be able to gain valuable insights through comprehensive sales reporting, enabling them to analyze sales trends and calculate revenue/profit margins, eliminating the need for cross-platform management.


Quick Start

  1. Ensure that you have Java 11 installed.
  2. Down the latest version of CafeCtrl from here.
  3. Copy the file to the folder you want to use as the home folder for your Cafe Manager CLI Application.
  4. Open a command terminal, cd into the folder you put the jar file in, and use the java -jar tp.jar command to run the application.
  5. If the setup is correct, you should see something like the below as the output:
    Hello! Welcome to 
      _/_/_/                _/_/              _/_/_/    _/                _/   
      _/          _/_/_/    _/        _/_/    _/        _/_/_/_/  _/  _/_/  _/    
     _/        _/    _/  _/_/_/_/  _/_/_/_/  _/          _/      _/_/      _/     
    _/        _/    _/    _/      _/        _/          _/      _/        _/      
     _/_/_/    _/_/_/    _/        _/_/_/    _/_/_/      _/_/  _/        _/       
    ------------------------------------------------------------------------
    > 
    

Summary

In CaféCTRL, the user is able to craft and add dish to the menu. If needed, he/she can delete a dish or edit the price of the dish that is already in the menu. When there is a new order, the user can add the order and prepare it. If there is insufficient stock of ingredients, the user can buy ingredients. At the end of the day, the user can check the sales of the day or the total sales since day one. The user can advance to the next day or go back to the previous day to take in orders of the day.


Features

Notes about command format:

Viewing help : help

Shows a message explaining how to use all the commands

Format: help Output:

------------------------------------------------------------------------
These are all the commands I recognise: 

- Words in UPPER_CASE are the parameters to be supplied by the user.
 e.g. in add name/NAME, NAME is a parameter that can be used as add name/Chicken.
- Parameters in [] are optional.

------------------------------------------------------------------------
To add a new dish to the menu: 
add name/DISH_NAME price/DISH_PRICE ingredient/INGREDIENT1_NAME qty/INGREDIENT1_QTY[, ingredient/INGREDIENT2_NAME, qty/INGREDIENT2_QTY...]
Example:add name/chicken rice price/3.00 ingredient/rice qty/200g, ingredient/chicken qty/100g
------------------------------------------------------------------------
To delete a menu item:
deleteParameters: INDEX
Example: delete 1
------------------------------------------------------------------------
To edit price of a menu item: 
edit_price dish/DISH_INDEX price/NEW_PRICE
Example: edit_price dish/1 price/4.50
------------------------------------------------------------------------
To view menu:
list_menu
------------------------------------------------------------------------
To list out the ingredients needed along with the quantity for a specific dish:
Parameters: index/DISH_INDEX
Example: list_ingredients dish/1
------------------------------------------------------------------------
To buy ingredient:
buy_ingredient ingredient/INGREDIENT1_NAME qty/INGREDIENT1_QTY[, ingredient/INGREDIENT2_NAME, qty/INGREDIENT2_QTY...]
Example:buy_ingredient ingredient/milk qty/200ml, ingredient/chicken qty/100g
------------------------------------------------------------------------
To view pantry stock:
view_stock
------------------------------------------------------------------------
To add a new order: 
add_order name/DISH_NAME qty/QUANTITY
Example: add_ordername/chicken rice qty/2
------------------------------------------------------------------------
To show sales for all days:
list_total_sales
------------------------------------------------------------------------
To show sales for a chosen day:
list_sale day/DAY_TO_DISPLAY
Example: list_sale day/1
------------------------------------------------------------------------
To travel to next day:
next_day
------------------------------------------------------------------------
To go back to previous day:
previous_day
------------------------------------------------------------------------
To exit:
bye
------------------------------------------------------------------------
To view all commands:
help
------------------------------------------------------------------------
------------------------------------------------------------------------

Adding a dish : add

Adds a dish consisting of its ingredients to the menu

Format: add name/DISH_NAME price/PRICE ingredient/INGREDIENT1_NAME qty/INGREDIENT1_QTY<g/ml>[, ingredient/INGREDIENT2_NAME qty/INGREDIENT2_QTY<g/ml>, ...]

Example:

> add name/chicken rice price/2.00 ingredient/rice qty/100g, ingredient/chicken qty/200g, ingredient/soup qty/50ml
You have added the following dish...
+-------------------------------------------------------+
| Dish: chicken rice                                    |
+----------------------------------------+--------------+
| Price: $2.00                                          |
+----------------------------------------+--------------+
| Ingredient                             + Quantity     |
+----------------------------------------+--------------+
| rice                                   | 100g         |
| chicken                                | 200g         |
| soup                                   | 50ml         |
+-------------------------------------------------------+

Deleting a dish : delete

Deletes a specific dish from the menu

Format: delete DISH_INDEX

Example: delete 1

Output:

Okay! chicken rice is deleted! :)

Editing price of a dish : edit_price

Edits the price of an existing dish on the menu

Format: edit_price dish/DISH_INDEX price/NEW_PRICE

Example: edit_price dish/1 price/4.50

Output:

Price modified for the following dish: 
chicken rice $4.50

Listing all dishes : list_menu

Shows a list of all dishes on the menu

Format: list_menu

Example:

+-------------------------------------------------------+
|        Ah, behold, the grand menu of delights!        |
+----------------------------------------+--------------+
| Dish Name                              |  Price       |
+----------------------------------------+--------------+
| 1. chicken rice                        |  $2.50       |
| 2. chicken curry                       |  $4.30       |
+-------------------------------------------------------+

Listing ingredients needed for the selected dish : list_ingredients

Lists out the ingredients needed along with the quantity for a specific dish

Format: list_ingredients dish/DISH_INDEX

Example:

+-------------------------------------------------------+
|Dish: chicken rice                                     |
+----------------------------------------+--------------+
| Ingredient                             + Quantity     +
+----------------------------------------+--------------+
| rice                                   | 100g         |
| chicken                                | 200g         |
| soup                                   | 50ml         |
+-------------------------------------------------------+

Buying an ingredient : buy_ingredient

Adds one or more ingredients to the pantry

Format: buy_ingredient ingredient/INGREDIENT1_NAME qty/INGREDIENT1_QTY<g/ml>[, ingredient/INGREDIENT2_NAME qty/INGREDIENT2_QTY<g/ml>, ...]

Example: buy_ingredient ingredient/chicken qty/500g, ingredient/milk qty/1000ml

Output:

Added to stock:
Ingredient: milk
Total Qty: 1000ml

Ingredient: chicken
Total Qty: 500g

Viewing the total stock of ingredients : view_stock

Displays the available stock of all the ingredients found in the pantry

Format: view_stock

Output:

+-------------------------------------------------------+
| You have the following ingredients in pantry:         |
+----------------------------------------+--------------+
| Ingredients                            |  Qty         |
+----------------------------------------+--------------+
| chicken                                | 300g         |
| noodles                                | 2100g        |
| rice                                   | 2900g        |
| bread                                  | 500g         |
+-------------------------------------------------------+

Adding an order : add_order

Adds an order consisting of dishes off the menu to an order list

Format: add_order name/DISH_NAME qty/DISH_QTY

Example:

> add_order name/chicken rice qty/2
I'm busy crafting your selected dish in the virtual kitchen of your dreams. Bon appétit!
-----------------------------------------------------
Order is ready!
Total order cost: $5.00
-----------------------------------------------------
Listed below are the availability of the dishes for the next order!
Dish: chicken rice
Available Dishes: 8
-----------------------------------------------------
Dish: chicken curry
Available Dishes: 4

However, if there is insufficient ingredients in the pantry required for the desired dish quantity, the following message will be shown, prompting the user to buy_ingredient

> add_order name/chicken rice qty/2
I'm busy crafting your selected dish in the virtual kitchen of your dreams. Bon appétit!
+----------------------------------------+--------------+--------------+
| Restock                                | Current      | Needed       |
+----------------------------------------+--------------+--------------+
| chicken                                | 0g           | 200g         |
+----------------------------------------------------------------------+
| rice                                   | 0g           | 100g         |
+----------------------------------------------------------------------+
Please restock ingredients before preparing the order :) 

Showing total sales : list_total_sales

Displays the dishes sold and total sales for each from Day 1 to the current day that the cafe is operating on.

Format: list_total_sales

Example: list_total_sales

Output:

+---------------------------------------------------------------------------+
| Day 1:                                                                    |
+----------------------------------------+--------------+-------------------+
| Dish Name                              |  Dish Qty    |  Total Cost Price |
+----------------------------------------+--------------+-------------------+
| Chicken Rice                           | 2            | 5.00              |
| Chicken Nuggets                        | 4            | 6.00              |
+---------------------------------------------------------------------------+
| Total for day:                                        | $11.00            |
+---------------------------------------------------------------------------+
+---------------------------------------------------------------------------+
| Day 2:                                                                    |
+----------------------------------------+--------------+-------------------+
| Dish Name                              |  Dish Qty    |  Total Cost Price |
+----------------------------------------+--------------+-------------------+
| Chicken Rice                           | 2            | 5.00              |
| Chicken Nuggets                        | 3            | 4.50              |
+---------------------------------------------------------------------------+
| Total for day:                                        | $9.50             |
+---------------------------------------------------------------------------+

Showing sales for a chosen day : list_sale

Displays the dishes sold along with the total sales for any chosen day.

Format: list_sale day/DAY_TO_DISPLAY

Example: list_sale day/2

Output:

+---------------------------------------------------------------------------+
| Day 2:                                                                    |
+----------------------------------------+--------------+-------------------+
| Dish Name                              |  Dish Qty    |  Total Cost Price |
+----------------------------------------+--------------+-------------------+
| chicken chop                           | 2            | 4.00              |
| chicken sandwich                       | 2            | 6.00              |
| chicken noodles                        | 1            | 2.00              |
+---------------------------------------------------------------------------+
| Total for day:                                        | $12.00            |
+---------------------------------------------------------------------------+

Advancing to the next day: next_day

Proceeds to the next business day

Format: next_day

Output:

Prepare for liftoff! We're about to fast-forward to the next day. Hold onto your hats; here we go!
Today is Day 2

Returning to the previous day: previous_day

Goes back to the previous business day

Format: previous_day

Output:

Sure thing! Let's rev up the virtual DeLorean and take a spin to the previous day. Buckle up, it's time to hit that rewind button!
Today is Day 1

Exiting the program : bye

Exits the program.

Format: bye


Known Issues

  1. The application is unable to decode the data text files if they have been edited in the wrong decoding format.
  2. The application is unable to detect wrong argument tag, a general incorrect command format will be printed out for wrong argument tag.
  3. The application is unable to support unit conversion, hence only ml and g are accepted as ingredient unit and the use of unit must be constant for the same ingredient.
  4. The application is unable to save data for Menu, Pantry and OrderList if it is force exited using Ctrl+C command.
  5. The application currently accepts any valid dish name from orders.txt as a valid dish made on a given day, regardless of its presence in the current menu.
    • This decision ensures that orders remain intact even if dishes are removed from the menu, allowing for a comprehensive record of all transactions.
    • Restricting orders to only those present in the current menu would lead to unintentional deletion of orders containing dishes no longer available.
    • Consideration was given to storing the names of dishes in the menu at the time the order was made in orders.txt.
    • However, concerns about orders.txt becoming bloated with data were acknowledged.
    • As this does not affect the functionality of any aspects of our application nor the logic of functions related to the content stored in orders.txt, we have decided that this can be considered in future improvements.
  6. The application is unable to differentiate hash string that has been modified by user in the text file with normal data text.
    • This leads the decoder of the text file to attempt to decode the modified hash string, hence resulting in an error message.
    • This example illustrates the error message shown when the hash string in pantry_stock.txt is modified to 000000
    • Well, well, well, looks like someone's been playing with the save files!
      Let's keep it classy and use the prescribed format below.
      
      Format for Pantry_stock.txt:
      {Ingredient Name} | {Ingredient Qty} | {Ingredient Unit}
      
      pantry_stock.txt: Invalid format, this pantry stock will be removed -> 000000
      Done loading pantry_stock.txt!
      ------------------------------------------------------------------------
      
  7. If the user manually adds an order of dish that does not exist in menu to orders.txt, the order will still be generated but the new dish will not be added to the menu.
  8. The decoder of orders.txt will use the string the last day has no orders but please account for it as keywords to mark the end of the order history. If the user moves the string, any orders after it will be discarded.

Command Summary

Action Format, Examples
Add add name/DISH_NAME price/PRICE ingredient/INGREDIENT1_NAME qty/INGREDIENT1_QTY<g/ml> [, ingredient/INGREDIENT2_NAME qty/INGREDIENT2_QTY<g/ml>, ...]

Example:
add name/chicken rice price/3.00 ingredient/rice qty/50g, ingredient/chicken qty/100g
List Menu list_menu
List Ingredients list_ingredients dish/DISH_INDEX

Example:
list_ingredients index/1
Delete delete DISH_INDEX

Example:
delete 1
Edit Price edit_price dish/DISH_INDEX price/NEW_PRICE

Example:
edit_price dish/1 price/4.50
List Sale list_total_sales
List Sale by Day list_sale day/DAY_TO_DISPLAY

Example:
list_sale day/1
View Ingredient Stock view_stock
Buy Ingredients buy_ingredient ingredient/INGREDIENT1_NAME<g/ml> qty/INGREDIENT1_QTY<g/ml>[, ingredient/INGREDIENT2_NAME qty/INGREDIENT2_QTY<g/ml>, ...]

Example
buy_ingredient ingredient/chicken qty/500g, ingredient/milk qty/1000ml
Add Order add_order name/DISH_NAME qty/QUANTITY

Example:
add_order name/chicken rice qty/2
Previous Day previous_day
Next Day next_day
Help help
Exit Program bye

Glossary