diff --git a/.github/workflows/gradle.yml b/.github/workflows/gradle.yml
index fd8c44d086..391c46b4fe 100644
--- a/.github/workflows/gradle.yml
+++ b/.github/workflows/gradle.yml
@@ -32,19 +32,3 @@ jobs:
- name: Build and check with Gradle
run: ./gradlew check
-
- - name: Perform IO redirection test (*NIX)
- if: runner.os == 'Linux'
- working-directory: ${{ github.workspace }}/text-ui-test
- run: ./runtest.sh
-
- - name: Perform IO redirection test (MacOS)
- if: always() && runner.os == 'macOS'
- working-directory: ${{ github.workspace }}/text-ui-test
- run: ./runtest.sh
-
- - name: Perform IO redirection test (Windows)
- if: always() && runner.os == 'Windows'
- working-directory: ${{ github.workspace }}/text-ui-test
- shell: cmd
- run: runtest.bat
\ No newline at end of file
diff --git a/.gitignore b/.gitignore
index 2873e189e1..b7e9079f00 100644
--- a/.gitignore
+++ b/.gitignore
@@ -15,3 +15,7 @@ bin/
/text-ui-test/ACTUAL.TXT
text-ui-test/EXPECTED-UNIX.TXT
+users.txt
+
+drugs.txt
+soldItems.txt
diff --git a/build.gradle b/build.gradle
index ea82051fab..0b34b1a98e 100644
--- a/build.gradle
+++ b/build.gradle
@@ -29,11 +29,11 @@ test {
}
application {
- mainClass.set("seedu.duke.Duke")
+ mainClass.set("seedu.stocker.Stocker")
}
shadowJar {
- archiveBaseName.set("duke")
+ archiveBaseName.set("stocker")
archiveClassifier.set("")
}
@@ -43,4 +43,5 @@ checkstyle {
run{
standardInput = System.in
+ enableAssertions = true
}
diff --git a/docs/AboutUs.md b/docs/AboutUs.md
index 0f072953ea..bcd0bf5501 100644
--- a/docs/AboutUs.md
+++ b/docs/AboutUs.md
@@ -1,9 +1,11 @@
# About us
-Display | Name | Github Profile | Portfolio
---------|:----:|:--------------:|:---------:
- | John Doe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
- | Don Joe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
- | Ron John | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
- | John Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
- | Don Roe | [Github](https://github.com/) | [Portfolio](docs/team/johndoe.md)
+| Display | Name | Github Profile | Portfolio |
+|-----------------------------|:----------------:|:------------------------------------------:|:-------------------------------:|
+|  | Martin Schneider | [Github](https://github.com/martinschnder) | [Portfolio](team/Martin.md) |
+|  | Karishma | [Github](https://github.com/karishma-t) | [Portfolio](team/karishma-t.md) |
+|  | Barbara Chong | [Github](https://github.com/barbaracwx) | [Portfolio](team/barbaracwx.md) |
+|  | Teo Hao Zhi | [Github](https://github.com/TeoHaoZhi) | [Portfolio](team/teohaozhi.md) |
+|  | Azfarul Matin | [Github](https://github.com/azfarulmatin) | [Portfolio](team/Azfarul.md) |
+
+
diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md
index 64e1f0ed2b..cc7779fb9c 100644
--- a/docs/DeveloperGuide.md
+++ b/docs/DeveloperGuide.md
@@ -2,37 +2,805 @@
## Acknowledgements
-{list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
+1. Reference to AB-3 Developer Guide
+
+- [Source](https://se-education.org/addressbook-level3/DeveloperGuide.html#proposed-undoredo-feature)
+- Used as template to structure this Developer Guide
## Design & implementation
-{Describe the design and implementation of the product. Use UML diagrams and short code snippets where applicable.}
+
+
+The architecture diagram given above explains the high level design of the application. The diagram depicts the key
+component of the application that enables it to provide its functionalities.
+
+Majority of the app's work is done by the following components
+
+- Login System : Handles user authentication before enabling app usage
+- Ui : Asks for user input by handling output messages
+- Parser : Makes sense of user input
+- Commands : List of various commands
+- CommandResult : Execution of various commands
+
+The section below will explain in more detail the design considerations, implementations and rationale of the various
+components listed above.
+
+---
+
+### Login System Component
+
+---
+
+The login system component seeks to authenticate and login existing users or register a new user.
+
+#### Design considerations
+
+- There must be a way to check and verify users with a master list
+- The search for existing users username and password must be fast
+- Master list must be stored separately on hard drive of machine
+
+#### Implementation and rationale
+
+The login system class works in the following way. Upon booting up the application, a txt file
+containing a current list of existing users will be loaded into a users attribute within the class in the form of a hash
+table.When a user attempts to login to their account, the entered username and password is checked against
+the current list of users in the hashtable. If the username and password matches, the user is logged in.
+
+As for registering new users, newly inputted username and password will be saved to the users attribute and this
+pair of username and password is then appended to the txt file containing current users. The updated user list will be
+loaded into the users attribute when the application is booted up again.
+
+The login system class uses the below methods to achieve its functionality
+
+- `authenticateUserChoice()` -Decides whether the user chooses to register or login
+- `newUserCreator()` -Creates a new user for future login
+- `loginExistingUser()` -Login existing user
+- `loadExistingUsers()` -Load existing users into hashtable for reference
+
+Given below is an example of how the login system class works.
+
+When the user first launches the programme, the Stocker object will be instantiated. The object will
+invoke its own `run()` method which will call its own `start()` method. The Stocker object then instantiates a
+new UI object which displays the login message by invoking `showLoginMessage()` method. At this point, Stocker object
+will also instantiate a new login system object.
+
+The login system object will invoke its own `run()` method to begin the login process. This method begins by loading
+existing users into the users attribute of the login system class by `loadExistingusers()` method. it then invokes
+`authenticateUserChoice()` to receive an input from the user to whether register or login a user. Based on the input of
+the user, either `newUserCreator()` is launched or `loginExistingUser()` methods will be called to register or login a
+user.
+
+The following sequence diagram shows how the login system class works when the program is launched.
+
+
+
+Another consideration that was considered was the situation that the user maliciously edited the users txt file to
+prevent it from loading properly into the app when it is booted up. In that case the list of old users would be deleted
+and the user would have to register as a new user to access the system once again.
+
+---
+
+### Parser Component
+
+---
+
+The Parser component is responsible for interpreting user input and converting it into executable commands. It plays a
+critical role in bridging the user interface (UI) and the command execution components of the application.
+
+#### Design considerations
+
+- **User Input Parsing:** The Parser must effectively break down user input into its constituent parts, such as the
+ command
+ keyword and any associated arguments.
+
+- **Command Recognition:** The Parser must recognize the specific command the user intends to execute. This involves
+ matching
+ the command keyword to a predefined set of commands.
+
+- **Arguments Extraction:** For commands that require additional information, the Parser should correctly extract and
+ format
+ arguments, ensuring they are ready for command execution.
+
+- **Error Handling:** In cases where the input does not match any recognized command or has formatting errors, the
+ Parser
+ should generate appropriate error messages.
+
+#### Implementation and rationale
+
+The Parser class is designed to handle these considerations through a well-structured parsing process. Here's how it
+works:
+
+1. Splitting User Input: The Parser takes the full user input and splits it into two parts: the command word and the
+ remaining arguments.
+
+2. Command Recognition: It matches the command word to a predefined set of commands. If a valid command is recognized,
+ it
+ proceeds to the next step.
+
+3. Arguments Extraction: Depending on the specific command, the Parser may further parse and extract arguments. For
+ instance, for the "AddCommand," it extracts drug-related details like name, expiry date, serial number, and quantity.
+
+4. Command Creation: The Parser creates an instance of the appropriate Command class, passing along any required
+ arguments.
+ This encapsulates the user's request in an executable command object.
+
+5. Error Handling: If the user input does not match any recognized command or has formatting errors, the Parser
+ generates
+ an "IncorrectCommand" with an error message, providing feedback to the user.
+
+By structuring the parsing process this way, the application ensures that user input is correctly interpreted and
+translated into executable commands for the subsequent phases of the application.
+
+The parser class uses the below method to achieve its functionality
+
+- `parseCommand(String userInput)` - This method takes the user's input as a parameter and processes it to identify the
+ command keyword and any associated arguments. It then recognizes the specific command and prepares it for execution.
+
+Given below is an example of how the login system class works.
+
+Suppose a user enters the command `add /n Paracetamol /d 2023-12-31 /s ABC123 /q 100`. The Parser first splits this
+input
+into the command word "add" and the arguments. It then recognizes the "add" command, extracts the drug details (name,
+expiry date, serial number, and quantity), and creates an instance of the "`AddCommand`" with these details. If the user
+enters an invalid command or incorrect formatting, the Parser provides feedback to guide the user, ensuring a seamless
+interaction between the user and the application.
+
+The Parser is a crucial component that forms the bridge between user intentions and the core functionality of the stock
+management system.
+
+The following sequence diagram shows how the parser class works when the program is running.
+
+
+
+---
+
+### Command Class
+
+---
+The `Command` class serves as a foundational component of the stock management system, acting as a bridge between user
+requests and the core functionality of the application. This class is extended by various concrete command classes, each
+representing a specific action that a user can perform within the system.
+
+#### Key Components
+
+1. **Inventory**: This represents the collection of drugs and their quantities in stock.
+
+2. **SalesList**: It maintains records of sales transactions.
+
+3. **Cart**: The user's shopping cart, where they can add and remove items.
+
+4. **VendorsList**: This contains information about vendors and suppliers.
+
+#### Design and Purpose
+
+- **Data Access**: It provides access to essential data structures and components of the system, including the inventory
+ of
+ drugs, sales records, the user's shopping cart, and the list of vendors.
+- **Abstraction**: It acts as an abstract command template, defining a common interface for all concrete command classes
+ to
+ implement.
+- **Execution**: It enforces the execution of commands through its abstract execute method, which returns a result that
+ may be
+ specific to the particular command.
+- **Data Initialization**: The class enables the initialization of data dependencies through the setData method,
+ ensuring that
+ commands have access to the necessary data for their execution.
+
+#### Implementation and Rationale
+
+Prior to execution, the `setData` method is used to provide the required data dependencies to the command. The
+extensibility of the `Command` class allows the addition of new commands as the application evolves. Each new command
+class extends the Command class and implements its own execute method, providing flexibility for incorporating new
+features and functionalities.
+
+Given below is an example of how the Command class works.
+
+Suppose a user adds a new drug to the inventory, using the `AddDrugCommand`.
+
+First, the application sets the necessary data dependencies by invoking the `setData` method. It
+provides access to the inventory, sales records, the user's cart, and vendor information.
+The `AddDrugCommand` class implements the execute method. Within this method, the logic for adding a new drug
+to the inventory is defined. The command verifies the drug details, quantity, and other relevant data. It also ensures
+that the drug meets the required criteria.
+Upon successful execution, the `AddDrugCommand` class returns a result, which may be a confirmation message such
+as "New drug added to the inventory". In case of any issues during execution, an
+appropriate error message is returned.
+
+The following sequence diagram shows how the command class works when the program is running.
+
+
+---
+
+### CommandResult Class
+
+---
+
+The `CommandResult` class is a crucial part of the Stocker application, responsible for providing feedback and results
+to the user after executing various commands. It contains a feedback message to describe the outcome of the command
+execution, as well as an optional list of relevant elements produced by the command.
+
+**Design Considerations**
+The design of the `CommandResult` class considers the following aspects:
+
+1. **Feedback Message:** The class stores a feedback message to inform the user about the outcome of the executed
+ command.
+
+2. **Relevant Elements:** For commands that produce a list of relevant elements, the `CommandResult` can store this list
+ for display.
+
+**Implementation and Rationale**
+
+The `CommandResult` class is implemented with two constructors and methods to access relevant elements and construct
+feedback messages.
+
+- `CommandResult(String feedbackToUser)`: This constructor is used when there are no relevant elements to be included in
+ the result. It sets the feedback message.
+
+- `CommandResult(String feedbackToUser, List relevantElements)`: This constructor is used when the command produces a
+ list of relevant elements (e.g., a list of drugs). It sets both the feedback message and the list of relevant
+ elements.
+
+- `getRelevantElements()`: This method returns an optional list of relevant elements. It can be used to check if
+ relevant elements are present.
+
+- `getFeedbackToUser()`: This method returns the feedback message as a string.
+
+- `getFeedbackToUserWithElements()`: This method constructs a feedback message that includes the relevant elements. It
+ formats the list of elements with serial numbers (if applicable) and includes the feedback message.
+
+**Example Usage**
+
+The `CommandResult` class is used throughout the Stocker application to provide feedback to the user after executing
+commands. For example, when a user issues a `list` command, the `CommandResult` includes a list of drugs produced by the
+command along with the success message. The feedback message is then displayed to the user.
+
+The following sequence diagram shows how the Command Result function works.
+
+
+
+---
+
+### Main data structures
+
+---
+
+#### Implementation
+
+##### Drug
+
+The Drug class is a basic class that holds information related to drug stock management for users. It contains the
+product name, its serial number, its quantity, expiry date and price. These are the most necessary inputs needed, to
+allow for proper distribution, selling or storing of the drug.
+
+##### Inventory
+
+The Inventory class is used to keep track of the quantity of product in stock. The hash map seemed to be the most
+appropriate data structure to match a product id to a quantity and a product entity which are encapsulated in a "
+StockEntry" class.
+
+##### Cart
+
+The Cart class is used to represent an ongoing transaction : to perform a sale, the vendor can add different products
+with their respective quantities in a cart which will be deducted from the inventory at the checkout.
+To represent this, we chose to use an arraylist of "CartEntry" classes which represent a product/quantity tuple.
+
+##### SalesList
+
+The SalesList is used to represent every past sales in order to create some statistics and reports. This class is only a
+list of subclasses representing validated carts.
+
+##### Description
+
+The Description class is used to keep track of the descriptions for various drugs. It is a simple class that can be
+customised by the user to either store drugs' usages, specific instructions or more. It utilises a static map for the
+association between drug names and their descriptions. However, these drugs are not related to the existing drugs in
+the inventory.
+
+##### Vendors
+
+The VendorsList class and VendorSupplyList class is used to keep track of all information related to the vendors who
+supply the drugs. The VendorsList uses an arrayList to store the vendor names, and the VendorSupplyList manages and
+stores the association between the vendor names and their respective supplies using the HashMap.
+However, the supply list is only associated with the VendorsList, and not the drug class, as it is a catalogue more
+relevant to the buying and re-ordering of drugs from vendors.
+
+---
+
+## Commands
+
+---
+
+## 1. Find Function
+
+The "Find" function is designed to enable users to search for specific drugs in the inventory using either the drug's
+name or the drugs expiry date. This component assists in locating and retrieving relevant drugs efficiently.
+
+**Design Considerations**
+The design of the "Find" function takes into account the following considerations:
+
+1. **Search Criteria:** The function must provide users with the ability to specify each criteria, such as keywords or
+ attributes, to filter the items they are looking for.
+2. **Search Speed:** To enhance user experience, the search process should be fast and responsive, ensuring that users
+ receive search results quickly.
+
+**Implementation and Rationale**
+
+The "Find" function is implemented as follows:
+
+- **User-Defined Search Criteria:** Users provide search criteria, such as keywords, to define what they
+ are looking for. The "Find" function processes these criteria to locate relevant items.
+
+- **Search Algorithm:** A robust search algorithm is employed to efficiently scan through the list of items and identify
+ those
+ that match the specified criteria.
+
+- **Result Presentation:** The function displays the search results, presenting users with a list of items that meet the
+ search criteria, allowing them to quickly identify the items they are interested in.
+
+- **User-Friendly Interface:** The "Find" function is integrated into the user interface, making it easily accessible
+ and intuitive for users to perform searches.
+
+- **Alternative Consideration:** During the design process, alternative approaches to searching are evaluated to ensure
+ the
+ most effective and user-friendly method is implemented.
+
+The "Find" function offers a valuable way for users to narrow down their searches, find specific items of interest, and
+enhance the usability of the application.
+
+**Function Methods**
+
+The "Find" function includes the following method to achieve its functionality:
+
+- `execute()` - This method is responsible for executing the "Find" command, searching for drugs that match the
+ user-specified keyword within the inventory.
+- It returns a `CommandResult` containing the outcome of the command execution,
+ which includes a success message and a list of found StockEntry objects.
+
+**Example Usage**
+
+To illustrate how the "Find" function works, consider the following example usage:
+
+1. **User Input:** The user initiates the "Find" command by typing something like the following:
+
+`find /n panadol` - This command instructs the program to search for drugs in the inventory based on the name criteria
+and the keyword "panadol."
+
+`find /d 12/03/2026` - This command instructs the program to search for drugs in the inventory based on the expiry date
+criteria and the keyword "12/03/2026."
+
+`find /s PARC3189` - This command instructs the program to search for drugs in the inventory based on the serial number
+criteria and the keyword "PARC3189."
+
+2. **Method Execution:** The `execute()` method within the "FindCommand" class is called. It takes the provided keyword
+ and criterion as input.
+
+3. **Search Process:** The method processes the search by iterating through the list of `StockEntry` objects in the
+ inventory.
+ For each entry, it checks if the `matches` method returns `true`, which means that the drug name or expiry date
+ contains the given keyword.
+4. **Building Results:** As matching entries are found, they are added to a list called `foundEntries`.
+5. **Result Display:** The `CommandResult` is prepared, containing a success message (e.g., "Listed all drugs with the
+ keyword
+ in the inventory.") and the list of found `StockEntry` objects.
+6. `User Feedback:` The result is then displayed to the user, showing a list of drugs in the inventory that match the
+ specified keyword.
+
+The following sequence diagram shows how the Find Command function works.
+
+
+
+---
+
+## 2. ListCommand
+
+The `ListCommand` is responsible for listing all drugs in the inventory. This command retrieves the list of drugs from
+the inventory and provides it as part of the command result. If the inventory is empty, it informs the user that the
+inventory has no drugs.
+
+### Design Considerations
+
+- **User-Friendly Listing:** The primary goal of the `ListCommand` is to provide a user-friendly way to list all drugs
+ in the inventory, enhancing the user's experience in accessing inventory information.
+
+- **Data Presentation:** The design considers how to present the list of drugs in a clear and organized manner to
+ provide valuable information to the user.
+- **Performance:** The implementation should be optimized to list the inventory efficiently, even if it contains a large
+ number of drugs.
+
+### Implementation
+
+The `ListCommand` is implemented as follows:
+
+- **Retrieving Drug List:** The command retrieves the list of drugs from the inventory using the `getAllDrugs` method.
+
+- **Handling Empty Inventory:** It checks if the list of drugs is empty. If the inventory is empty, it returns a
+ user-friendly message indicating that the inventory is empty.
+
+- **Listing Drugs:** If the inventory contains drugs, the command constructs a success message and includes the list of
+ drugs in the command result.
+
+- **User-Friendly Presentation:** The implementation ensures that the list of drugs is presented in a clear and
+ organized format, including relevant details such as drug names, quantities, and other attributes.
+
+- **Optimized Performance:** To enhance user experience, the command is designed to list the inventory efficiently,
+ ensuring that users receive search results quickly.
+
+### Function Methods
+
+The `ListCommand` includes the following method to achieve its functionality:
+
+- `execute()`: This method is responsible for executing the `ListCommand`, listing all drugs in the inventory. It checks
+ the inventory, prepares a user-friendly result message, and returns a `CommandResult` containing the outcome of the
+ command execution, which includes a success message and the list of found `Drug` objects.
+
+### Example Usage
+
+To illustrate how the `ListCommand` works, consider the following example usage:
+
+1. **User Input:** The user initiates the `ListCommand` by entering the following command:
+
+2. **Method Execution:** The `execute()` method within the "ListCommand" class is called.
+
+3. **Inventory Check:** The method checks the inventory to retrieve the list of drugs.
+
+4. **Result Building:** If the inventory contains drugs, the method constructs a success message (e.g., "Listed all
+ drugs in the inventory.") and includes the list of drugs with relevant details.
+
+5. **User Feedback:** The result is displayed to the user, showing a clear and organized list of drugs in the inventory.
+
+The "ListCommand" enhances the user's ability to access inventory information efficiently and is designed to handle
+various inventory sizes while providing a user-friendly experience.
+
+The following sequence diagram shows how the List Command function works.
+
+
+
+---
+
+## 3. ShowStockLevel Command
+
+This command allows users to generate a report displaying the
+stock levels of drugs. This report is sorted in ascending order based on the quantity of each drug, providing a clear
+overview of the available inventory.
+
+### Design Considerations
+
+- **Stock Level Report**: The primary objective of this command is to create a stock level report, which shows the
+ quantity of
+ drugs available, allowing users to assess the stock levels efficiently.
+- **Sorting**: The report is designed to be sorted by quantity in ascending order to make it easier for users to
+ identify
+ drugs with lower quantities.
+
+### Implementation
+
+The `ShowStockLevelCommand` is implemented to create a report of drug stock levels sorted in ascending order by
+quantity.
+It retrieves and sorts the list of stock entries, returning the sorted list in a CommandResult if the inventory is not
+empty. If the inventory is empty, it returns a message indicating that.
+
+---
+
+## 4. Delete Command
+
+The "Delete" function is designed to enable users to remove specific drugs from the inventory based on the drug's name,
+to remove drugs they no longer need, fully depleted or discontinued.
+
+**Design Considerations**
+
+1. **User-Specified Drug Name:** The function allows users to specify the drug name they want to delete from the
+ inventory.
+
+2. **Data Integrity:** It ensures that the deletion operation maintains the integrity of the inventory data structure,
+ updating it correctly.
+
+**Implementation and Rationale**
+
+This method is executed when the delete command is invoked. First, it attempts to delete a drug from the inventory
+using the inventory.deleteDrug(this.keyToDelete) method. If successful, it retrieves the deleted entry.
+If the drug is successfully deleted, it returns a success message.
+If the drug is not found (i.e., a DrugNotFoundException is thrown), it returns a failure message.
+
+---
+
+## 5. Help Command
+
+The command is responsible for showing users a list of all possible commands.
+
+**Design Considerations**
+
+The command was designed to print out and show how to use a list of all possible commands in a neat and concise way.
+
+**Implementation and Rationale**
+
+Command will use java's system out to print out all required information with a blank line in between for clarity.
+
+---
+
+## 6. saveDrugs Command
+
+The saveDrugs command was made as a means to backup user entered drug data into the hard drive of the computer to ensure
+previously entered data is saved and accessable whenever the app is launched.
+
+### Design Considerations
+
+The save command had to be implemented in a way to enable direct writing of files onto the hard drive and a function had
+to be made to load said file back into the drug inventory upon starting the application.
+
+### Implementation
+
+There is a method to access the drugs within the inventory class. a separate method from the inventory class would then
+write the contents of these drugs back to the txt file for saving. This is depicted by the sequence diagram shown below.
+
+
+
+Upon booting up the system, a method from the inventory class goes through the contents of the txt file and copies it to
+the inventory drug list.
+
+The implementation of this class also considered the possibility of the user accidentally editing the saved drug list
+txt file causing it to become unable to be loaded into the app. In that case the previous drug list will be deleted and
+the drugs have to be added again into the drug list.
+
+---
+
+## 7. SetThreshold Command
+
+This command allows users to specify a threshold
+quantity for a particular drug in the inventory, aiding in better management of stock levels.
+
+### Design Considerations
+
+This command enable users to set a specific threshold quantity for a drug.
+The threshold quantity serves as a reference point, indicating the minimum quantity of a drug that should trigger a
+restock or reorder.
+
+### Implementation
+
+The default threshold for all drugs is initially set at 100. If a user decides to modify this threshold for a specific
+drug, the new threshold will replace the default value for that particular drug.
+
+---
+
+## 8. ListThreshold Command
+
+This command enables users to retrieve a list
+of all drugs in the inventory, along with their associated threshold levels.
+
+### Design Considerations
+
+The storage capacity should be size adjustable based on the quantity of items, specifically drugs, and their
+corresponding threshold levels added to it.
+
+### Implementation
+
+In order to attain the adjustable storage based on number of items, an ArrayList was used as additional drugs can be
+appended to the ArrayList whenever a new entry is required.
+
+---
+
+## 9. addVendor Command
+
+The command was made to add vendors to a list of vendors so as to have access to it when needed.
+
+### Design Considerations
+
+The storage must be size adjustable based on the number of objects, in this case vendors placed into it.
+
+### Implementation
+
+In order to attain the adjustable storage based on number of objects, an ArrayList was used as additional vendors can be
+appended to the ArrayList whenever a new entry is required.
+
+---
+
+## 10. deleteVendor Command
+
+It is designed to remove vendors from the list of vendors, ensuring that the system remains organized and up to date.
+
+### Design Considerations
+
+The storage must be size adjustable based on the number of objects, in this case vendors removed from it.
+
+### Implementation
+
+In order to attain the adjustable storage based on number of objects, an ArrayList was used as vendors can be
+removed from the ArrayList.
+
+---
+
+## 11. listVendors Command
+
+The command was made to list all vendors being tracked by the system in a neat way to the user
+
+### Design Considerations
+
+The possibility of an empty list had to be considered
+
+### Implementation
+
+The list of vendors could be printed by using streams to efficiently collect and print out the information of vendors
+
+---
+
+## 12. addVendorSupply Command
+
+This method adds a drug to a vendor's supply list in the inventory management system, to track
+what vendors supply what products.
+
+### Design Considerations
+
+This method checks if the specified vendor exists and, if so, adds the drug to their supply list. However, it does not
+check if the drug already exists in the inventory system. Not only does this serve the intended purpose of a catalogue
+for potential buying or reordering, but it helps with separation of concerns. It is only concerned with a vendor's
+supply list and adding to it, and not the existing drug inventory.
+
+### Implementation
+
+The `AddVendorSupplyCommand` class extends a generic `Command` and implements the command pattern. It includes the
+`execute` method, which first checks the existence of the specified vendor, utilizing case-insensitive comparison for
+robustness. It then verifies if the drug is not already present in the vendor's supply list. If conditions are met,
+the command adds the drug using the `addDrugToVendor` method from `VendorSupplyList`. The `VendorSupplyList` class
+employs a static `Map>` named `vendorSuppliedDrugs` to store associations between vendors and the
+drugs they supply. The `addDrugToVendor` method uses `computeIfAbsent` to ensure that each vendor has an associated
+drug list, preventing null pointer issues.
+
+
+
+---
+
+## 13. Checkout Command
+
+The Checkout Command allows users to remove items from the current cart and record the corresponding sales transactions. This command helps manage the checkout process efficiently and maintain accurate records of sales.
+
+### Design Considerations
+- Ensure that the command handles scenarios where the cart is empty or there are no matching items in the inventory.
+- Calculate the total cost of the checked-out items to provide users with a clear understanding of the transaction.
+
+### Implementation
+In the execute method of the CheckOutCommand class:
+- Check if the current cart is empty. If it is, return a message indicating that the cart is empty, and the checkout process cannot proceed.
+- If the cart is not empty, create a temporary holder to store the sold items, which include the serial number, quantity, and selling price.
+- For each item in the current cart, retrieve the corresponding StockEntry from the inventory.
+- Calculate the total cost of the item based on the selling price and quantity.
+- Add the sold item to the temporary holder, and update the total cost.
+- Create a new Cart containing the sold items and add it to the SalesList.
+- Return a message to the user indicating the successful checkout and the total cost of the transaction.
+
+The following sequence diagram illustrates how the Checkout Command function works:
+
+
+
+---
+
+## 14. ListSales Command
+
+The ListSalesCommand is designed to list all sales transactions tracked by the system. This command provides users with a clear and organised view of the sales data, making it easier to review and manage sales transactions.
+
+### Design Considerations
+The command should account for scenarios where there are no sales transactions to display.
+The output should be presented in a user-friendly and organized format for better user experience.
+
+## Implementation
+
+In the execute method of the ListSalesCommand class:
+- Retrieve the list of sales transactions from the system.
+- Check if there are any sales transactions to display. If the list is empty, return a message indicating that there are no sales.
+- If sales transactions are available, process and format the data for presentation.
+- Organise and present the sales data in a structured format, including details such as serial numbers, quantities, and selling prices for each transaction.
+- Ensure that the sales data is neatly formatted and clearly presented to the user.
+
+The following sequence diagram shows how the listSales Command function works.
+
+
+
+---
+
+## 15. SaveSales Command
+
+The SaveSalesCommand is responsible for saving the current sales data to an external file. This file serves as a record-keeping mechanism and a reference for past sales transactions.
+
+### Design Considerations
+The command should handle the process of writing sales data to an external file.
+It should ensure data integrity and include error handling in case of write failures.
+
+### Implementation
+
+In the execute method of the SaveSalesCommand class:
+- Check if there are any sales transactions to save. If the list is empty, return a message indicating that there are no sales to save.
+- If sales transactions exist, write the data to a specified file in a structured and well-organized format.
+- Implement error handling to address any potential file writing failures.
+- Confirm the successful save operation by returning a message indicating that the sales data has been saved.
+
+The following sequence diagram shows how the saveSales Command function works.
+
+
+---
+
+## 16. AddDescription Command
+
+The `AddDescriptionCommand` is responsible for adding drug descriptions to the `Description` class. This command is
+an integral part of the command pattern employed in the application, providing a modular approach to managing
+less critical drug-related information .
+
+### Design Considerations
+The command should manage the associations between the description and drugs properly, and ensure that the descriptions
+can be updated if needed. However, it does not access the drug class directly similar to the vendor supply commands, as
+this is intended as a catalogue. Moreover, it adheres to the principle of separation of concerns better.
+
+### Implementation
+The command requires two parameters during instantiation: the drug name (`drugName`) and its corresponding description
+(`drugDescription`).
+The `execute` method initiates the addition of the drug description by calling the static method `addDescription`
+from the `Description` class. It converts the drug name and description to lowercase for case-insensitive handling.
+To update the description, users can call this command again, and the description will show the most recent addition.
+Upon successful execution, the command returns a `CommandResult` with a formatted success message indicating the drug
+name and description that have been added.
+
+The following diagram shows how the addDescription Command function works.
+
+
+
+---
## Product scope
+
+---
+
### Target user profile
-{Describe the target user profile}
+- Works in the field of drug distribution, such as pharmacies and doctors' offices.
+- Manages a large inventory of pharmaceuticals with varying details (expiration dates, manufacturers, storage
+ conditions).
+- Prefers desktop applications for their work.
+- Proficient in fast typing.
+- Favors typing over mouse interactions.
+- Comfortable using Command Line Interface (CLI) applications for efficiency.
+- Requires password-protected access to sensitive patient healthcare information.
### Value proposition
-{Describe the value proposition: what problem does it solve?}
+**Stocker** is designed to cater to the specific needs of drug distributors by offering the following benefits:
+
+1. Quick access to real-time inventory information.
+2. Efficient tracking of incoming stock.
+3. Categorization of drugs based on various labels.
+4. A prioritized list of urgently needed restocks for timely replenishment.
+5. Assistance in generating comprehensive reports for stock turnover analysis.
+6. Secure access through individual user accounts to safeguard patient healthcare data.
+7. Enhanced user experience for experienced professionals who prefer keyboard commands and CLI interactions for seamless
+ stock management.
## User Stories
-|Version| As a ... | I want to ... | So that I can ...|
-|--------|----------|---------------|------------------|
-|v1.0|new user|see usage instructions|refer to them when I forget how to use the application|
-|v2.0|user|find a to-do item by name|locate a to-do without having to go through the entire list|
+Priorities: High (must have) - \* \* _, Medium (nice to have) - _ _, Low (unlikely to have) - _
-## Non-Functional Requirements
+| Priority | Version | As a ... | I want to ... | So that I can ... |
+|----------|---------|----------------------|------------------------------------------------------|----------------------------------------------------------------|
+| \* \* \* | v1.0 | Pharmacist | Add drugs to track what drugs are available in stock | Reduce manual errors |
+| \* \* \* | v1.0 | Pharmacist | Remove drugs to track what are no longer in used | Ensure compliance |
+| \* \* \* | v1.0 | Receptionist | View a list of products of that category | Easily obtain an overview of the products |
+| \* \* \* | v1.0 | First-time user | See a list of all available actions | Better understand how to use the application |
+| \* \* \* | v1.0 | Inventory Staff | Find a specific drug currently in the system | Check up its details and quantities specifically |
+| \* \* \* | v1.0 | user | Have a way to login to the system | Access the system only if i am allowed to |
+| \* \* | v2.0 | System Administrator | Perform regular backup of inventory database | Safeguard against data loss and system failure |
+| \* \* \* | v2.0 | Receptionist | Add vendors supplying drugs into the system | Keep track of what vendors i am working with |
+| \* \* \* | v2.0 | Receptionist | View a list of vendors | Easily access a list of contacts for current and future orders |
+| \* \* \* | v2.0 | Inventory Staff | Add and view vendors' supply lists | Keep track of what each vendors' supply |
+| \* \* \* | v2.0 | Inventory Staff | Find which drugs are supplied by which vendors | Easily access a list of vendors to contact for drug reordering |
+| \* \* | v2.0 | Pharmacist | Add and view descriptions of various drugs | Easily access usage of products for quick reference |
+| \* \* | v2.0 | Receptionist | Add drugs to cart and checkout | facilitate the selling of those drugs to clients |
+| \* \* | v2.0 | Receptionist | View total price of drugs in cart | Easily keep track of what clients would pay and the revenue |
+| \* \* \* | v2.0 | Inventory Staff | Get alerts for low stock | Replenish the drugs in low quantity |
+| \* \* \* | v2.0 | Manager | View past sales of drugs | Keep track of drug turnover |
-{Give non-functional requirements}
-## Glossary
-* *glossary item* - Definition
+## Non-Functional Requirements
+
+1. Should work on any mainstream OS as long as it has Java 11 or above installed.
-## Instructions for manual testing
+2. Should be able to hold up to 1000 drug entries without a noticeable sluggishness in performance for typical usage.
-{Give instructions on how to do a manual product testing e.g., how to load sample data to be used for testing}
+3. A user with above-average typing speed for regular English text (i.e. not code, not system admin commands) should be
+ able to accomplish most of the tasks faster using commands than using the mouse.
diff --git a/docs/README.md b/docs/README.md
index bbcc99c1e7..d319c383c9 100644
--- a/docs/README.md
+++ b/docs/README.md
@@ -1,6 +1,9 @@
-# Duke
+# Stocker
-{Give product intro here}
+Stocker is a desktop app that will provide quick access to currently available stock,
+track incoming stock and expiration dates, and categorize drugs based on different labels.
+It is optimized for use via a Command Line Interface (CLI). If you can type fast, Stocker
+can get your inventory management tasks done faster than traditional GUI apps.
Useful links:
* [User Guide](UserGuide.md)
diff --git a/docs/UML Diagrams/AddDescriptionDiagram.png b/docs/UML Diagrams/AddDescriptionDiagram.png
new file mode 100644
index 0000000000..8229f3378c
Binary files /dev/null and b/docs/UML Diagrams/AddDescriptionDiagram.png differ
diff --git a/docs/UML Diagrams/AddDescriptionDiagram.puml b/docs/UML Diagrams/AddDescriptionDiagram.puml
new file mode 100644
index 0000000000..e0a900bd34
--- /dev/null
+++ b/docs/UML Diagrams/AddDescriptionDiagram.puml
@@ -0,0 +1,38 @@
+@startuml
+
+hide footbox
+actor User
+participant ":AddDescriptionCommand" as AddDescriptionCommand
+participant ":CommandResult" as CommandResult
+participant ":Description" as Description
+
+
+User -> AddDescriptionCommand: initiate AddDescription
+Activate AddDescriptionCommand
+
+AddDescriptionCommand -> AddDescriptionCommand : Convert to lowercase
+
+AddDescriptionCommand -> Description: addDescription(drug, description)
+Activate Description
+
+Description --> CommandResult: generate success message
+Activate CommandResult
+
+AddDescriptionCommand --> User: return success message
+Deactivate CommandResult
+
+User -> AddDescriptionCommand: initiate AddDescription with invalid data
+Activate AddDescriptionCommand
+
+AddDescriptionCommand -> Description: addDescription(InvalidDrug, InvalidDescription)
+Activate Description
+
+Description --> CommandResult: generate error message
+Activate CommandResult
+
+AddDescriptionCommand --> User: return error message
+Deactivate CommandResult
+
+Deactivate Description
+Deactivate AddDescriptionCommand
+@enduml
diff --git a/docs/UML Diagrams/AddVendorSupplyDiagram.png b/docs/UML Diagrams/AddVendorSupplyDiagram.png
new file mode 100644
index 0000000000..d3dd249f65
Binary files /dev/null and b/docs/UML Diagrams/AddVendorSupplyDiagram.png differ
diff --git a/docs/UML Diagrams/AddVendorSupplyDiagram.puml b/docs/UML Diagrams/AddVendorSupplyDiagram.puml
new file mode 100644
index 0000000000..0adeeb2e21
--- /dev/null
+++ b/docs/UML Diagrams/AddVendorSupplyDiagram.puml
@@ -0,0 +1,40 @@
+@startuml
+
+hide footbox
+actor User
+participant ":AddVendorSupplyCommand" as AddVendorSupplyCommand
+participant ":VendorSupplyList" as VendorSupplyList
+participant ":VendorsList" as VendorsList
+participant ":CommandResult" as CommandResult
+
+User -> AddVendorSupplyCommand: initiate AddVendorSupply
+Activate AddVendorSupplyCommand
+
+AddVendorSupplyCommand -> VendorsList: getVendorEntries()
+Activate VendorsList
+
+VendorsList --> AddVendorSupplyCommand: vendor entries
+Deactivate VendorsList
+
+AddVendorSupplyCommand -> VendorsList: getName()
+Activate VendorsList
+
+VendorsList --> AddVendorSupplyCommand: vendor existence check result
+Deactivate VendorsList
+AddVendorSupplyCommand -> VendorSupplyList: containsDrug()
+Activate VendorSupplyList
+
+VendorSupplyList --> AddVendorSupplyCommand: containsDrug result
+Deactivate VendorSupplyList
+
+AddVendorSupplyCommand -> VendorSupplyList: addDrugToVendor()
+Activate VendorSupplyList
+
+VendorSupplyList --> CommandResult: generateSuccessMessage()
+Activate CommandResult
+
+AddVendorSupplyCommand --> User: return success message
+Deactivate CommandResult
+
+Deactivate AddVendorSupplyCommand
+@enduml
diff --git a/docs/UML Diagrams/ArchitectureDiagram.puml b/docs/UML Diagrams/ArchitectureDiagram.puml
new file mode 100644
index 0000000000..b08135f7a9
--- /dev/null
+++ b/docs/UML Diagrams/ArchitectureDiagram.puml
@@ -0,0 +1,25 @@
+@startuml
+
+title Architecture Diagram
+
+skinparam component {
+BackgroundColor lightblue
+}
+
+
+[Parser]
+[Commands]
+[CommandResult]
+[LoginSystem and Ui] as interactor
+interface "user"
+
+user -[hidden]- Parser
+CommandResult -[hidden]- Parser
+
+interactor --> Parser : Makes sense of input
+Parser -> Commands : Searches for inputted command
+Commands -> CommandResult : Executes relevant command
+CommandResult -> interactor : Return control
+user -[#red]-> interactor : Logs in or Register
+
+@enduml
\ No newline at end of file
diff --git a/docs/UML Diagrams/Architecture_Diagram.png b/docs/UML Diagrams/Architecture_Diagram.png
new file mode 100644
index 0000000000..d35427d97b
Binary files /dev/null and b/docs/UML Diagrams/Architecture_Diagram.png differ
diff --git a/docs/UML Diagrams/CheckoutCommandDiagram.png b/docs/UML Diagrams/CheckoutCommandDiagram.png
new file mode 100644
index 0000000000..e4e41e82d4
Binary files /dev/null and b/docs/UML Diagrams/CheckoutCommandDiagram.png differ
diff --git a/docs/UML Diagrams/CheckoutCommandDiagram.puml b/docs/UML Diagrams/CheckoutCommandDiagram.puml
new file mode 100644
index 0000000000..1394a74d0d
--- /dev/null
+++ b/docs/UML Diagrams/CheckoutCommandDiagram.puml
@@ -0,0 +1,46 @@
+@startuml
+hide footbox
+actor User
+participant ":CheckOutCommand" as CheckOutCommand
+participant ":Cart" as Cart
+participant ":StockEntry" as StockEntry
+participant ":Drug" as Drug
+participant ":CartEntry" as CartEntry
+participant ":SalesList" as SalesList
+participant ":CommandResult" as CommandResult
+
+User -> CheckOutCommand: execute()
+activate User
+activate CheckOutCommand
+
+alt Cart is not empty
+ CheckOutCommand -> Cart: getCurrentCart()
+ activate Cart
+ Cart -> Cart: Retrieve current cart
+ Cart -> Cart: Create temporary holder (List)
+ Cart -> StockEntry: Get StockEntry for each entry
+ activate StockEntry
+ loop over entries
+ activate Drug
+ StockEntry -> Drug: Get Drug
+ activate Drug
+ Drug -> Drug: Get SellingPrice
+ Drug --> StockEntry
+ StockEntry --> CartEntry: Create CartEntry with quantity and selling price
+ deactivate Drug
+ deactivate StockEntry
+ deactivate CartEntry
+ end
+ Cart -> SalesList: Add temporary holder to sold items
+ Cart -> CommandResult: Create result message
+ deactivate Cart
+ Cart --> User: Message with total cost
+ else
+ Cart -> CommandResult: Cart is empty
+ Cart --> User: Message failure
+end
+
+User --> CheckOutCommand: CommandResult
+deactivate User
+deactivate CheckOutCommand
+@enduml
diff --git a/docs/UML Diagrams/CommandResultDiagram.png b/docs/UML Diagrams/CommandResultDiagram.png
new file mode 100644
index 0000000000..62ae5212ab
Binary files /dev/null and b/docs/UML Diagrams/CommandResultDiagram.png differ
diff --git a/docs/UML Diagrams/CommandResultDiagram.puml b/docs/UML Diagrams/CommandResultDiagram.puml
new file mode 100644
index 0000000000..a7ea63d29d
--- /dev/null
+++ b/docs/UML Diagrams/CommandResultDiagram.puml
@@ -0,0 +1,20 @@
+@startuml
+title CommandResult Sequence Diagram
+
+actor User
+participant Command
+participant CommandResult
+
+User -> Command: Execute Command
+activate Command
+
+Command -> CommandResult: Create CommandResult
+activate CommandResult
+
+CommandResult --> Command: Return CommandResult
+deactivate CommandResult
+
+Command -> User: Return CommandResult
+deactivate Command
+
+@enduml
\ No newline at end of file
diff --git a/docs/UML Diagrams/FindCommandArchitectureDiagram.png b/docs/UML Diagrams/FindCommandArchitectureDiagram.png
new file mode 100644
index 0000000000..0c6b80f9bb
Binary files /dev/null and b/docs/UML Diagrams/FindCommandArchitectureDiagram.png differ
diff --git a/docs/UML Diagrams/FindCommandArchitectureDiagram.puml b/docs/UML Diagrams/FindCommandArchitectureDiagram.puml
new file mode 100644
index 0000000000..66f496c434
--- /dev/null
+++ b/docs/UML Diagrams/FindCommandArchitectureDiagram.puml
@@ -0,0 +1,26 @@
+@startuml FindCommandArchitectureDiagram
+
+!define LOGIC_COLOR #3333C4
+
+!define ARROW_STYLE [-[#LOGIC_COLOR]->]
+
+actor User as U
+package "Your Application" {
+ [User Interface] as UI
+ [FindCommand] as FindCmd
+ [Inventory] as Inv
+ [StockEntry] as Entry
+ [CommandResult] as CmdResult
+}
+
+U -down-> UI: Initiates 'Find' Command
+UI -down-> FindCmd: Invokes 'FindCommand'
+UI -down-> Inv: Accesses 'Inventory'
+FindCmd -down-> Entry: Iterates Through Entries
+Entry -down-> Entry: Checks Each Entry
+Entry --> FindCmd: Match/No Match
+FindCmd --> CmdResult: Prepares Result
+CmdResult -up-> UI: Returns Result
+CmdResult -up-> U: Displays Search Results
+
+@enduml
diff --git a/docs/UML Diagrams/FindCommandDiagram.png b/docs/UML Diagrams/FindCommandDiagram.png
new file mode 100644
index 0000000000..818bea3678
Binary files /dev/null and b/docs/UML Diagrams/FindCommandDiagram.png differ
diff --git a/docs/UML Diagrams/FindCommandDiagram.puml b/docs/UML Diagrams/FindCommandDiagram.puml
new file mode 100644
index 0000000000..e58fb298f2
--- /dev/null
+++ b/docs/UML Diagrams/FindCommandDiagram.puml
@@ -0,0 +1,22 @@
+@startuml FindCommandDiagram
+
+!define LOGIC_COLOR #3333C4
+!define LOGIC_COLOR_T1 #7777DB
+
+hide footbox
+actor User
+participant ": FindCommand" as FindCmd LOGIC_COLOR_T1
+participant ": Inventory" as Inventory LOGIC_COLOR
+
+User -> FindCmd: Execute 'Find' Command
+activate FindCmd
+User <-- FindCmd: CommandResult
+FindCmd -> Inventory: Retrieve Stock Entries
+activate Inventory
+Inventory --> FindCmd: List of Stock Entries
+
+FindCmd -> FindCmd: Process Entries
+FindCmd --> User: Display Search Results
+
+
+@enduml
diff --git a/docs/UML Diagrams/ListCommandDiagram.png b/docs/UML Diagrams/ListCommandDiagram.png
new file mode 100644
index 0000000000..e4530ad2a2
Binary files /dev/null and b/docs/UML Diagrams/ListCommandDiagram.png differ
diff --git a/docs/UML Diagrams/ListCommandDiagram.uml.puml b/docs/UML Diagrams/ListCommandDiagram.uml.puml
new file mode 100644
index 0000000000..0b7103b9dd
--- /dev/null
+++ b/docs/UML Diagrams/ListCommandDiagram.uml.puml
@@ -0,0 +1,26 @@
+@startuml ListCommandDiagram
+
+!define LOGIC_COLOR #3333C4
+!define LOGIC_COLOR_T1 #7777DB
+
+hide footbox
+actor User
+participant ":ListCommand" as ListCmd LOGIC_COLOR_T1
+participant ":Inventory" as Inventory LOGIC_COLOR
+
+User -> ListCmd: Execute 'List' Command
+activate User
+activate ListCmd
+
+User <-- ListCmd: CommandResult
+ListCmd -> Inventory: Retrieve Stock Entries
+activate Inventory
+Inventory --> ListCmd: List of Stock Entries
+
+ListCmd -> ListCmd: Process Entries
+deactivate Inventory
+ListCmd --> User: Display List Results
+deactivate User
+deactivate ListCmd
+
+@enduml
diff --git a/docs/UML Diagrams/ListSalesCommand.png b/docs/UML Diagrams/ListSalesCommand.png
new file mode 100644
index 0000000000..65e93ce764
Binary files /dev/null and b/docs/UML Diagrams/ListSalesCommand.png differ
diff --git a/docs/UML Diagrams/ListSalesCommand.puml b/docs/UML Diagrams/ListSalesCommand.puml
new file mode 100644
index 0000000000..9b25b9a8cd
--- /dev/null
+++ b/docs/UML Diagrams/ListSalesCommand.puml
@@ -0,0 +1,25 @@
+@startuml
+hide footbox
+actor User
+participant ":ListSalesCommand" as ListSalesCommand
+participant ":SalesList" as SalesList
+participant ":CommandResult" as CommandResult
+
+User -> ListSalesCommand: execute()
+activate User
+activate ListSalesCommand
+
+alt SalesList is not empty
+ ListSalesCommand -> SalesList: Get sales data
+ activate SalesList
+ SalesList -> ListSalesCommand: List of sales
+ deactivate SalesList
+ ListSalesCommand -> CommandResult: List of sales
+ else
+ ListSalesCommand -> CommandResult: SalesList is empty
+end
+
+User -> ListSalesCommand: CommandResult
+deactivate User
+deactivate ListSalesCommand
+@enduml
diff --git a/docs/UML Diagrams/ParserDiagram.png b/docs/UML Diagrams/ParserDiagram.png
new file mode 100644
index 0000000000..2e20ac7f7c
Binary files /dev/null and b/docs/UML Diagrams/ParserDiagram.png differ
diff --git a/docs/UML Diagrams/ParserDiagram.puml b/docs/UML Diagrams/ParserDiagram.puml
new file mode 100644
index 0000000000..3ae5c88271
--- /dev/null
+++ b/docs/UML Diagrams/ParserDiagram.puml
@@ -0,0 +1,26 @@
+@startuml
+hide footbox
+actor User
+participant "User Input" as UserInput
+participant ": Parser" as Parser
+participant ": Command" as Command
+participant ": CommandResult" as CommandResult
+
+
+User -> UserInput: Enter command
+UserInput -> Parser: parseCommand(userInput)
+activate Parser
+Parser -> Command: execute(model)
+deactivate Parser
+activate Command
+Create CommandResult
+Command -> CommandResult
+activate CommandResult
+CommandResult --> Command
+deactivate CommandResult
+Command --> User
+
+
+
+
+@enduml
diff --git a/docs/UML Diagrams/SaveCommandDiagram.puml b/docs/UML Diagrams/SaveCommandDiagram.puml
new file mode 100644
index 0000000000..4df92ab201
--- /dev/null
+++ b/docs/UML Diagrams/SaveCommandDiagram.puml
@@ -0,0 +1,48 @@
+@startuml
+'https://plantuml.com/sequence-diagram
+
+hide footbox
+actor User
+Participant ":SaveDrugsCommand" as SaveCommand
+Participant ":CommandResult" as CommandResult
+Participant ":Inventory" as inventory
+Participant ":Storage" as storage
+
+
+Create SaveCommand
+activate SaveCommand
+User -> SaveCommand
+
+
+Create CommandResult
+
+SaveCommand -> CommandResult
+activate CommandResult
+
+Create inventory
+CommandResult -> inventory
+activate inventory
+inventory -> inventory : getStockEnteries()
+activate inventory
+deactivate inventory
+
+
+Create storage
+inventory -> storage
+activate storage
+deactivate inventory
+
+loop inventory.size() times
+
+storage -> storage :appendToFile()
+activate storage
+deactivate storage
+end
+deactivate storage
+
+CommandResult --> User: Message_Success
+deactivate CommandResult
+deactivate SaveCommand
+
+
+@enduml
diff --git a/docs/UML Diagrams/SaveDrugsCommandDiagram.png b/docs/UML Diagrams/SaveDrugsCommandDiagram.png
new file mode 100644
index 0000000000..dd1d366b7d
Binary files /dev/null and b/docs/UML Diagrams/SaveDrugsCommandDiagram.png differ
diff --git a/docs/UML Diagrams/SaveSalesCommand.png b/docs/UML Diagrams/SaveSalesCommand.png
new file mode 100644
index 0000000000..5de5292960
Binary files /dev/null and b/docs/UML Diagrams/SaveSalesCommand.png differ
diff --git a/docs/UML Diagrams/SaveSalesCommand.puml b/docs/UML Diagrams/SaveSalesCommand.puml
new file mode 100644
index 0000000000..2afa27978b
--- /dev/null
+++ b/docs/UML Diagrams/SaveSalesCommand.puml
@@ -0,0 +1,29 @@
+@startuml
+hide footbox
+actor User
+participant ":SaveSalesCommand" as SaveSalesCommand
+participant ":SalesList" as SalesList
+participant ":CommandResult" as CommandResult
+participant ":Storage" as Storage
+
+User -> SaveSalesCommand: execute()
+activate User
+activate SaveSalesCommand
+
+alt SalesList is not empty
+ SaveSalesCommand -> SalesList: Get sales data
+ activate SalesList
+ SalesList -> Storage: Save sales data to file
+ activate Storage
+ Storage -> SalesList: Success message
+ deactivate Storage
+ deactivate SalesList
+ SaveSalesCommand -> CommandResult: Success message
+ else
+ SaveSalesCommand -> CommandResult: SalesList is empty
+end
+
+User -> SaveSalesCommand: CommandResult
+deactivate User
+deactivate SaveSalesCommand
+@enduml
diff --git a/docs/UML Diagrams/StockerToLoginSystem.png b/docs/UML Diagrams/StockerToLoginSystem.png
new file mode 100644
index 0000000000..1f917498e5
Binary files /dev/null and b/docs/UML Diagrams/StockerToLoginSystem.png differ
diff --git a/docs/UML Diagrams/StockerToLoginSystem.puml b/docs/UML Diagrams/StockerToLoginSystem.puml
new file mode 100644
index 0000000000..3cd44ebab6
--- /dev/null
+++ b/docs/UML Diagrams/StockerToLoginSystem.puml
@@ -0,0 +1,65 @@
+ @startuml
+'https://plantuml.com/sequence-diagram
+
+hide footbox
+actor User
+Participant ":Stocker" as Stocker
+Participant ":Ui" as Ui
+Participant ":LoginSystem" as LoginSystem
+
+Create Stocker
+User -> Stocker
+activate Stocker
+Stocker -> Stocker : run()
+activate Stocker
+Stocker -> Stocker :start()
+Create Ui
+Stocker -> Ui : Ui()
+deactivate Stocker
+
+activate Ui
+Ui -> Ui : showLoginMessage()
+activate Ui
+Ui -> Ui : ShowToUser()
+activate Ui
+deactivate Ui
+Ui --> User : LoginMessage
+
+Create LoginSystem
+Stocker -> LoginSystem :LoginSystem()
+activate LoginSystem
+LoginSystem -> LoginSystem : run()
+activate LoginSystem
+LoginSystem -> LoginSystem : loadExistingUsers()
+activate LoginSystem
+LoginSystem -> LoginSystem: authenticateUserChoice()
+activate LoginSystem
+User -> LoginSystem : register or login input
+
+alt Register
+
+LoginSystem -> LoginSystem : newUserCreator()
+activate LoginSystem
+LoginSystem --> Ui : showSuccessfulRegistrationMessage()
+
+else Login
+LoginSystem ->LoginSystem : loginExistingUser()
+activate LoginSystem
+LoginSystem --> Ui: showSuccessfulLoginMessage()
+
+end
+deactivate Ui
+deactivate Ui
+deactivate LoginSystem
+
+deactivate LoginSystem
+
+deactivate LoginSystem
+
+deactivate LoginSystem
+
+deactivate LoginSystem
+
+deactivate LoginSystem
+
+@enduml
\ No newline at end of file
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index abd9fbe891..2eeef95fc0 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -1,42 +1,837 @@
# User Guide
+## Table of contents
+
+- [Introduction](#introduction)
+- [Quick Start](#quick-start)
+- [Features](#features)
+- [Usage](#usage)
+- [FAQ](#faq)
+- [Command Summary](#command-summary)
+
## Introduction
-{Give a product intro}
+Stocker is a desktop app that will provide quick access to currently available stock,
+track incoming stock and expiration dates, and categorize drugs based on different labels.
+It is optimized for use via a Command Line Interface (CLI). If you can type fast, Stocker
+can get your inventory management tasks done faster than traditional GUI apps.
## Quick Start
-{Give steps to get started quickly}
-
1. Ensure that you have Java 11 or above installed.
-1. Down the latest version of `Duke` from [here](http://link.to/duke).
+2. Down the latest version of `Stocker` from [here](https://github.com/AY2324S1-CS2113-T17-3/tp/releases).
+3. Copy the absolute filepath to where the jar file is
+4. Run the following JAR file with the following command
+
+```
+java -jar ""
+```
+
+## Features
+
+### Feature-Login System
+
+Authentication system that allows user to register as a user or login
+as an existing user.
+
+### Feature-add
+
+Adds a drug into the inventory list.
+
+### Feature-delete
+
+Deletes a drug being tracked by the system.
+
+### Feature-list
+
+List all drug information that is being tracked by the system.
+
+### Feature-find
+
+Finds drugs using their name or expiry date.
+
+### Feature-help
+
+List all currently available commands in current version, their
+uses and how to format them in the command line.
+
+### Feature-register
+
+Register a new user into the login system.
+
+### Feature-login
+
+Login an existing user into the system.
+
+### Feature-saveDrugs
+
+Save existing drugs from inventory list onto a txt file.
+File is then used to update inventory list when stocker is ran.
+
+### Feature-saveSales
+
+Save existing checked out items onto a txt file.
+File is then used to update sold drugs when stocker is ran.
+
+### Feature-listSales
+
+Displays the list of all sold drugs being tracked by the system.
+It also shows the total amount earned so far.
+
+### Feature-add vendor
+
+Adds a vendor into a list tracked by the system.
+
+### Feature-delete vendor
+
+Deletes a vendor into a list tracked by the system.
+
+### Feature-list vendors
+
+Displays the name of all vendors being tracked by the system.
+
+### Feature-add vendor supply
+
+Adds a drug into a vendor's supply list to be tracked by the system.
+
+### Feature-list vendor supply
+
+Displays the list of all drugs being supplied by a particular vendor.
+
+### Feature-find vendor supply
+
+Displays the list of all vendors that supply a particular drug.
+
+### Feature-delete vendor supply
+
+Deletes a drug from a vendor's supply list.
+
+### Feature-add to cart
+
+Adds a drug to a virtual shopping cart if the requested quantity is available in the inventory. It keeps track of the
+drugs dispensed to customers.
+
+### Feature-view cart
+
+List all drugs and their respective quantities in the current cart. It helps to review the drugs about to be dispensed.
+
+### Feature-checkout
+
+Finalizes the dispensing process by deducting the drugs and quantities in your cart from your inventory. It ensures that
+the inventory accurately reflects the items dispensed.
+
+### Feature-add description
+
+Adds a drug's description into a list to be tracked by the system.
+
+### Feature-get description
+
+Retrieves the description of a particular drug.
+
+### Feature-list description
+
+Displays a list of all the descriptions for all corresponding drugs
+
+## Usage
+
+### `Login System`- Create new user or login existing user
+
+Login system is automatically launched at the start of the programme.
+
+**Registering a user**
+
+> Step 1 : Enter register to select option to register a user.
+>
+> `register`
+>
+> Step 2: Enter desired username and password.
+>
+> Upon successful creation, registration success message is observed
+
+Expected outcome:
+
+```
+Registration successful.
+```
+
+**Login an existing user**
+
+> Step 1 : Enter login to select option to login a user.
+>
+> `login`
+>
+> Step 2: Enter registered username and password.
+>
+> Upon successful creation, successful login message is observed.
+
+Expected outcome:
+
+```
+Login Successful.
+```
+
+### `add` - Adds drug into inventory list
+
+Adds a drug to be tracked by the system.
+
+- Each individual drug is uniquely identified by a serial number.
+- If the input data includes the same serial number, name, and expiry date, it will simply increase the quantity of the
+ existing drug in the system.
+- If the serial number is the same but either the name or expiry date is different, an error will be returned as the
+ system expects consistent information for the same serial number.
+- If it has a different serial number, a new entry will be added to the inventory for
+ that drug.
+- If none of the above conditions are met, the system will also add a new entry to the inventory.
+
+Note:
+
+- The expiry date should be entered in the format "dd/MM/yyyy" (e.g., 01/02/2024).
+- The quantity should be between 1 and 999,999,999.
+- The price (selling price) should be between 0.01 and 1,000.00 and can have up to 2 decimal places.
+- The serial number should be in the format of three capital letters followed by three numbers (e.g., ABC123).
+
+Format:
+
+add /n DRUG_NAME /d EXPIRY_DATE /s SERIAL_NUMBER /q QUANTITY /p PRICE
+
+Example of usage:
+
+`add /n Panadol /d 01/02/2024 /s ABC123 /q 52 /p 19.90
+`
+
+Expected outcome:
+
+```
+|| New drug added in the inventory: Panadol
+```
+
+### `delete` - Deletes a drug being tracked by the system
+
+Deletes a drug being tracked by the system.
+
+Format:
+
+delete /s SERIAL_NUMBER
+
+Example of usage:
+
+`delete /s PANA002
+`
+
+Expected outcome:
+
+```
+|| Drug removed from inventory: Panadol
+```
+
+### `list` - List all drug information that is being tracked by the system
+
+List all drug information that is being tracked by the system.
+
+- If a drug has an expired expiry date at any time, it will be indicated with an (E) next to its entry.
+
+Format:
+
+list
+
+Example of usage:
+
+`list
+`
+
+Expected outcome:
+
+```
+|| Listed all drugs in the inventory.
+|| 1. Name: Panadol, Expiry date: 01/02/2023, Serial number: ABC123, Quantity: 52, Selling Price: 19.9 (E)
+|| 2. Name: Dol, Expiry date: 01/02/2024, Serial number: DOL124, Quantity: 52, Selling Price: 19.9
+```
+
+### `stockLevel` - List all drugs by quantity level in ascending order
+
+List all drugs by quantity level in ascending order.
+
+Format:
+
+stockLevel
+
+Example of usage:
+
+`stockLevel
+`
+
+Expected outcome:
+
+```
+|| 1. Name: histamine, Expiry date: 09/05/2070, Serial number: HIS9447, Quantity: 10
+|| 2. Name: paracetamol, Expiry date: 01/07/2020, Serial number: PARC347, Quantity: 50
+|| 3. Name: Panadol, Expiry date: 04/07/2030, Serial number: PAN947, Quantity: 120
+||
+|| Stock Level Report (Sorted by Quantity)
+```
+
+### `find` - Finds drugs using their name or expiry date
+
+1. Finds drugs whose **names** contain any of the given keywords.
+
+Format:
+
+find /n panadol
+
+Example of usage:
+
+`find /n Panadol `
+
+- The search is case-insensitive, meaning that "aspirin" will match "Aspirin."
+
+- Only the drug name is searched.
+
+Expected outcome:
+
+```
+|| 1. Name: panadol, Expiry Date: 01/02/2024, Serial number: PAN1234, Quantity: 120
+
+|| Listed all drugs with the keyword in the inventory.
+```
+
+2. Finds drugs whose **expiry dates** contain any of the given keywords.
+
+Format:
+
+find /d DATE
+
+Example of usage:
+
+`find /d 01/02/2024`
+
+- Only the drug's expiry date is searched.
+
+Expected outcome:
+
+```
+|| 1. Name: panadol, Expiry Date: 01/02/2024, Serial number: PAN1234, Quantity: 120
+
+|| Listed all drugs with the keyword in the inventory.
+```
+
+3. Finds drugs whose **serial number** contain any of the given keywords.
+
+Format:
+
+find /s PAN1234
+
+Example of usage:
+
+`find /s KEYWORD`
+
+- Only the drug's serial number is searched.
+
+Expected outcome:
+
+```
+|| 1. Name: panadol, Expiry Date: 01/02/2024, Serial number: PAN1234, Quantity: 120
+
+|| Listed all drugs with the keyword in the inventory.
+```
+
+### `help` - List currently available commands in current version, their uses and how to format them in the command line
+
+List all currently available commands in current version,
+their uses and how to format them in the command line
+
+Format:
+
+help
+
+Example of usage:
+
+`help
+`
+
+### `register` - Register a new user into the system
+
+Asks for user input for a username and password field which
+will be used to create a new user for the system.
+
+Format:
+
+register
+
+Example of usage:
+
+`register`
+
+Expected outcome:
+
+```
+Registration Successful.
+New User Created.
+```
+
+### `login` - login an existing user into the system
+
+Asks for user input for a username and password field which
+will be used to check if such a user exists for the system
+and log the user in.
+
+Format:
+
+login
+
+Example of usage:
+
+`login`
+
+Expected outcome:
+
+```
+Login Sucessful
+Welcome Back!
+```
+
+### `saveDrugs` - save existing drugs onto hard drive of computer
+
+Saves existing drugs onto hard drive of computer. The txt file
+is then used as reference to update drug inventory when stocker
+is booted up.
+
+Format:
+
+saveDrugs
-## Features
+Example of usage:
-{Give detailed description of each feature}
+`saveDrugs`
-### Adding a todo: `todo`
-Adds a new item to the list of todo items.
+Expected outcome:
-Format: `todo n/TODO_NAME d/DEADLINE`
+```
+Drugs successfully saved.
+```
-* The `DEADLINE` can be in a natural language format.
-* The `TODO_NAME` cannot contain punctuation.
+### `saveSales` - Save the current sold items
-Example of usage:
+The saveSales command allows you to save the sales transactions onto your computer's hard drive. The saved file can serve as a historical record of sales transactions and can be used for reference in the future.
-`todo n/Write the rest of the User Guide d/next week`
+Example of usage:
-`todo n/Refactor the User Guide to remove passive voice d/13/04/2020`
+`saveSales`
+
+Expected outcome:
+
+```
+|| Sales data successfully saved.
+
+```
+
+**Note:** It is recommended to use `saveSales` and `saveDrugs` before you exit the program to keep a record of your sales transactions.
+
+Example of usage:
+
+`saveSales`
+
+Expected outcome:
+
+```
+|| Sales data successfully saved.
+
+```
+
+`saveDrugs`
+
+Expected outcome:
+
+```
+Drugs successfully saved.
+```
+
+### `addVendor` - adds a vendor into list of vendors being tracked by system
+
+- Adds a vendor to be tracked by the system. The entries are used to form a list of summarised vendors.
+- The vendor's name is not case-sensitive, meaning 'Pfizer' and 'pfizer' are treated as the same.
+
+Format:
+
+addVendor /v VENDOR_NAME
+
+Example of usage:
+
+`addVendor /v Moderna`
+
+Expected outcome:
+
+```
+|| New vendor added into the vendors list: Moderna
+```
+
+### `deleteVendor` - deletes a vendor from list of vendors tracked by the system
+
+- Deletes a vendor to be tracked by the system.
+- The vendor's name is not case-sensitive, meaning 'Pfizer' and 'pfizer' are treated as the same.
+
+Format:
+
+deleteVendor /v VENDOR_NAME
+
+Example of usage:
+
+`deleteVendor /v Moderna`
+
+Expected outcome:
+
+```
+|| Vendor deleted from the vendors list: Pfizer
+```
+
+### `listVendors` - list all vendors currently being tracked by the system
+
+Displays a list of all vendors currently being tracked by the system.
+
+Format:
+
+listVendors
+
+Example of usage:
+
+`listVendors`
+
+Expected outcome:
+
+```
+|| 1. Name : Moderna
+||
+|| Listed all vendors in the list.
+```
+
+### `addVendorSupply` - Adds a drug into a vendor's supply list to be tracked by the system.
+
+- Adds a drug into a vendor's supply list to be tracked by the system
+ - Vendor must already be added into the system.
+ - If the drug already exists in the vendor's supply list, system will inform user
+
+Format:
+
+addVendorSupply /v VENDOR_NAME /n DRUG_NAME
+
+Example of usage:
+
+`addVendorSupply /v Moderna /n Paracetamol`
+
+Expected outcome:
+
+```
+|| New drug added to moderna's supply list: paracetamol
+```
+
+Note : As this serves as a catalogue for information related to vendor supply lists, drugs not currently tracked by the
+inventory can be added into the supply list.
+
+### `listVendorSupply` - Displays the list of all drugs being supplied by a particular vendor.
+
+Displays the list of all drugs being supplied by a particular vendor.
+
+Format:
+
+listVendorSupply VENDOR_NAME
+
+Example of usage:
+
+`listVendorSupply /v Moderna`
+
+Expected outcome:
+
+```
+|| Drugs supplied by moderna: paracetamol, panadol
+```
+
+### `findVendorSupply` -Displays the list of all vendors that supply a particular drug.
+
+Displays the list of all vendors that supply a particular drug.
+
+Format:
+
+findVendorSupply /n DRUG_NAME
+
+Example of usage:
+
+`findVendorSupply /n paracetamol`
+
+Expected outcome:
+
+```
+|| Vendors supplying the drug paracetamol: moderna, apotheca
+```
+
+### `deleteVendorSupply` -Deletes a drug from a vendor's supply list.
+
+Removes a specified drug from a particular vendor's supply list. Not related to drug class.
+
+Format:
+
+deleteVendorSupply /v VENDOR_NAME /n DRUG_NAME
+
+Example of usage:
+
+`deleteVendorSupply /v moderna /n paracetamol`
+
+Expected outcome:
+
+```
+|| Drug 'paracetamol' removed from moderna's supply list
+```
+
+### `addToCart` - Adds drug into current cart
+
+Adds a drug in a specified quantity in the current cart. If the drug is past its expired date, it is unable to add to
+cart
+
+Format:
+
+addToCart /s SERIAL_NUMBER /q QUANTITY
+
+Example of usage:
+
+`addToCart /s PANA01 /q 3
+`
+
+Expected outcome:
+
+```
+|| New drug added in the cart : Panadol
+```
+
+Expected outcome with expired drug:
+
+```
+|| This drug is expired. Unable to add to cart
+```
+
+### `viewCart` - Lists all the entries in the cart
+
+Lists all the added drugs, quantity, and total cost in the cart.
+
+Format:
+
+viewCart
+
+Example of usage:
+
+`viewCart
+`
+
+Expected outcome:
+
+```
+|| Listed all the content of your cart.
+|| 1. Name: Histamine, Quantity: 1, Selling Price: 15.9, Cost: 15.9
+|| 2. Name: Doliprane, Quantity: 2, Selling Price: 12.9, Cost: 25.8
+||
+|| Total Cost: 41.7
+```
+
+### `checkout` - Checks out the current cart
+
+Empty the current cart and retrieve all the specified drugs and quantity from the inventory
+
+- Shows the total amount to be paid upon checkout
+- If after checkout, the quantity of a specific drug falls below the set threshold level, it triggers an
+ alert.
+
+Format:
+
+checkout
+
+Example of usage:
+
+`checkout
+`
+
+Expected outcome:
+
+```
+|| The current cart has been checked out.
+||
+|| Total Cost: 15.9
+```
+
+Expected outcome with alert:
+
+```
+|| ALERT! Panadol is below the threshold level
+|| The current cart has been checked out.
+```
+
+### `setThreshold` - Set the threshold quantity for a drug
+
+Set the threshold quantity for a specific drug in your inventory. The threshold quantity is the minimum quantity of the
+drug that you want to keep in stock.
+
+Format:
+
+setThreshold /s [Serial number] /tq [Threshold Quantity]
+
+Example of usage:
+
+`setThreshold /s DOL002 /tq 50
+`
+
+Expected outcome:
+
+```
+|| Threshold quantity set for Doliprane: 50
+```
+
+### `listSales` - List the description of sold items saved
+
+The listSales command is designed to provide you with a clear and organized list of all sales transactions that have been tracked by the system. It helps you review and manage sales data efficiently.
+
+Example of usage:
+
+`listSales`
+
+Expected outcome:
+
+```
+|| Listed all items in the sales list.
+|| 1. Name: Histamine, Serial Number: HIS526, Quantity: 2, Selling Price: 15.9, Cost: 31.8
+|| 2. Name: Doliprane, Serial Number: DOL123, Quantity: 2, Selling Price: 12.9, Cost: 25.8
+|| Total Cost: 57.6
+
+```
+
+Expected outcome if the list is empty:
+
+```
+|| The sales list is empty.
+
+```
+
+### `listThreshold` - List all drugs and their threshold levels
+
+Retrieve a list of all drugs in your inventory and their corresponding threshold levels. The threshold level is the
+minimum quantity of each drug that you want to keep in stock. By default, if the user hasn't specified individual
+threshold levels for each
+drug, the standard threshold level for all drugs is set at 100.
+
+Format:
+
+listThreshold
+
+Example of usage:
+
+`listThreshold
+`
+
+Expected outcome:
+
+```
+|| 1. Doliprane: 50
+||
+|| Listed all drugs by threshold level in the inventory.
+
+```
+
+### `addDescription` - Adds a drug's description into a list to be tracked by the system.
+
+Adds a drug's description into a list to be tracked by the system.
+
+Format:
+
+addDescription /n DRUG_NAME /desc DESCRIPTION
+
+Example of usage:
+
+`addDescription /n Panadol /desc Pain Relief
+`
+
+Expected outcome:
+
+```
+|| New drug description added for Panadol: Pain Relief
+```
+
+Note : As this serves as a catalogue for information related to drug usage and their respective descriptions,
+drugs not currently tracked by the inventory can be added with a description here. Both lists are separate.
+
+### `getDescription` - Retrieves the description of a particular drug.
+
+Retrieves the description of a particular drug.
+
+Format:
+
+getDescription /n DRUG_NAME
+
+Example of usage:
+
+`getDescription /n Panadol
+`
+
+Expected outcome:
+
+```
+|| Pain Relief
+```
+
+### `listDescriptions` - Displays a list of all the descriptions for all corresponding drugs
+
+Displays a list of all the descriptions for all corresponding drugs
+
+Format:
+
+listDescriptions
+
+Example of usage:
+
+`listDescriptions
+`
+
+Expected outcome:
+
+```
+|| List of Drug Descriptions:
+|| Panadol: Pain Relief
+|| Dolo: Stomache Discomfort
+```
## FAQ
-**Q**: How do I transfer my data to another computer?
+**Q**: Can i register with blank username and password
-**A**: {your answer here}
+**A**: No. Ensure your entries are not blank.
-## Command Summary
+**Q**: Why can i register and login again even after being logged in
-{Give a 'cheat sheet' of commands here}
+**A**: A user is able to login another user or can help to register a new user without rebooting the application
+
+**Q**: Why is my registration and login details not masked
+
+**A**: Masking of input is a security concern that will be developed on in future iterations
+
+## Command Summary
-* Add todo `todo n/TODO_NAME d/DEADLINE`
+- register : `register`
+- login : `login`
+- save : `saveDrugs`
+- help : `help`
+- add : `add /n DRUG_NAME /d EXPIRY_DATE /s SERIAL_NUMBER /q QUANTITY /p PRICE`
+- delete : `delete /s SERIAL_NUMBER`
+- list : `list`
+- find : `find /n KEYWORD` or `find /d KEYWORD`
+- add Vendor : `addVendor /v VENDOR_NAME`
+- list Vendor : `listVendors`
+- add Vendor Supply : `addVendorSupply /v VENDOR_NAME /n DRUG_NAME`
+- list Vendor Supply : `listVendorSupply /v VENDOR_NAME`
+- find Vendor Supply : `findVendorSupply /n DRUG_NAME`
+- delete Vendor Supply : `deleteVendorSupply /v VENDOR_NAME /n DRUG_NAME`
+- add description : `addDescription /n DRUG_NAME /desc DESCRIPTION`
+- get description : `getDescription /n DRUG_NAME`
+- list descriptions : `listDescriptions`
+- list stock level : `stockLevel`
+- add drug to cart : `addToCart /s SERIAL_NUMBER /q QUANTITY`
+- checks out current cart : `checkout`
+- view current cart items : `viewCart`
+- save current checked out items : `saveSales`
+- view all sold items : `listSales`
+- set threshold quantity for a drug : `setThreshold /s SERIAL_NUMBER /tq THRESHOLD_QUANTITY`
+- list all drugs and threshold levels : `listThreshold`
+- bye : `bye`
diff --git a/docs/_config.yml b/docs/_config.yml
new file mode 100644
index 0000000000..a35c22596b
--- /dev/null
+++ b/docs/_config.yml
@@ -0,0 +1 @@
+theme : jekyll-theme-Cayman
diff --git a/docs/team/Azfarul.JPG b/docs/team/Azfarul.JPG
new file mode 100644
index 0000000000..fc8fe4d789
Binary files /dev/null and b/docs/team/Azfarul.JPG differ
diff --git a/docs/team/Azfarul.md b/docs/team/Azfarul.md
new file mode 100644
index 0000000000..63718e33d8
--- /dev/null
+++ b/docs/team/Azfarul.md
@@ -0,0 +1,77 @@
+# Azfarul Matin - Project Portfolio Page
+
+## Project : Stocker
+
+Stocker is a Command Line Interface(CLI) app for drug inventory management purposes.
+If you can type fast, it can get your inventory management tasks done faster than traditional
+GUI apps.
+
+### Summary of Contributions
+
+-**Features implemented**
+
+1) **List**
+ * What it does: List all drug information that is being tracked by the system.
+
+
+2) **Find**
+ * What it does: Finds drug from drug list by serial number
+
+
+3) **Add**
+ * What it does: Adds the serial number and price property to the drugs
+
+
+4) **viewCart**
+ * What it does: Adds the total amount to be paid in the cart
+
+
+5) **Checkout**
+ * What it does: Calculates total price of drugs in cart
+
+
+6) **SaveSales**
+ * What it does: Saves the items that are checked out into soldItems.txt
+
+
+7) **ListSales**
+ * What it does: List the drugs sold that are saved
+
+-**Classes implemented**
+
+* `ListCommand`
+* `FindCommand`
+* `CheckoutCommand`
+* `SaveSalesCommand`
+* `ListSalesCommand`
+
+-**Contributions to the UG**
+
+Azfarul Matin added documentation for the following sections of
+the user guide:
+* [Add Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#find---finds-drugs-using-their-name-or-expiry-date:~:text=to%20the%20inventory.-,Note%3A,-The%20expiry%20date)
+* [Find Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#find---finds-drugs-using-their-name-or-expiry-date:~:text=Finds%20drugs%20whose%20serial%20number%20contain%20any%20of%20the%20given%20keywords.)
+* [saveSales Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#find---finds-drugs-using-their-name-or-expiry-date:~:text=saveSales%20%2D%20Save%20the%20current%20sold%20items)
+* [listSaLes Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#find---finds-drugs-using-their-name-or-expiry-date:~:text=listSales%20%2D%20List%20the%20description%20of%20sold%20items%20saved)
+
+-**Contributions to the DG**
+
+* Azfarul Matin added documentation for the following section of
+ the developer guide:
+ * [List Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide#:~:text=Command%20function%20works.-,2.%20ListCommand,-The%20ListCommand%20is)
+ * [Checkout Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide#:~:text=13.%20Checkout%20Command)
+ * [saveSales Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide#:~:text=15.%20SaveSales%20Command)
+ * [listSales Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide#:~:text=14.%20ListSales%20Command)
+* UML Diagrams
+ * [ListCommand Diagram](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/ListSalesCommand.png)
+ * [CheckoutCommand Diagram](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/CheckoutCommandDiagram.png)
+ * [SaveSalesCommand Diagram](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/SaveSalesCommand.png)
+ * [ListSalesCommand Diagram](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/ListSalesCommand.png)
+
+-**Contributions to team-based tasks**
+
+* Maintain issues and milestone tracker
+* Updated portions of user/developer docs not specific to a feature eg: user stories, target user profile,
+ value proposition
+* Kept up to date weekly deliverables during meetings
+* Record and edit for the demo
\ No newline at end of file
diff --git a/docs/team/Barbara_image.JPG b/docs/team/Barbara_image.JPG
new file mode 100644
index 0000000000..320ea67f5f
Binary files /dev/null and b/docs/team/Barbara_image.JPG differ
diff --git a/docs/team/HaoZhi.png b/docs/team/HaoZhi.png
new file mode 100644
index 0000000000..4b818fdabc
Binary files /dev/null and b/docs/team/HaoZhi.png differ
diff --git a/docs/team/Karishma.png b/docs/team/Karishma.png
new file mode 100644
index 0000000000..1218ae0960
Binary files /dev/null and b/docs/team/Karishma.png differ
diff --git a/docs/team/Martin.jpeg b/docs/team/Martin.jpeg
new file mode 100644
index 0000000000..1a16d8877f
Binary files /dev/null and b/docs/team/Martin.jpeg differ
diff --git a/docs/team/Martin.md b/docs/team/Martin.md
new file mode 100644
index 0000000000..ee5c655587
--- /dev/null
+++ b/docs/team/Martin.md
@@ -0,0 +1,46 @@
+# Martin Schneider - Project Portfolio Page
+
+## Project : Stocker
+
+Stocker is a Command Line Interface(CLI) app for drug inventory management purposes.
+If you can type fast, it can get your inventory management tasks done faster than traditional
+GUI apps.
+
+### Summary of Contributions
+
+-**Code contributed** [Link to reposense contribution graph](https://nus-cs2113-ay2324s1.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=martinschnder&tabRepo=AY2324S1-CS2113-T17-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)
+
+-**Features implemented**
+
+- Command result system
+ - What it does : Provide a basic command interface to display various messages and lists to the user.
+- Add command
+ - What it does : Adds a particular drugs with all parameters to the inventry
+- Cart handling
+ - What it does : Allow a user (a vendor for example) to add various drugs in a temporary cart before checking it out and process a sale.
+
+-**Classes implemented**
+
+- `Command`
+- `Parser`
+- `CommandResult`
+- `AddCommand`
+- `AddToCartCommad`
+- `ViewCartCommand`
+- `CheckoutCommand`
+
+-**Contributions to the UG**
+
+- [Add Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#add---adds-drug-into-inventory-list)
+- [Add to cart Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#addtocart---adds-drug-into-current-cart)
+
+-**Contributions to the DG**
+
+- [Main data structures](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#main-data-structures),[Login System Component](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#login-system-component),[Help Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#4-help-command), [Save Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#5-save-command), [addVendor Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#6-addvendor-command),
+
+-**Contributions to team-based tasks**
+
+**Mentoring**
+
+- Clarified misconceptions on workflow and application architecture in the initial few weeks
+- Provided some advices and reviews on other members implementation.
diff --git a/docs/team/barbaracwx.md b/docs/team/barbaracwx.md
new file mode 100644
index 0000000000..925680489d
--- /dev/null
+++ b/docs/team/barbaracwx.md
@@ -0,0 +1,86 @@
+# Barbara - Project Portfolio Page
+
+## Project : Stocker
+Stocker is a Command Line Interface(CLI) app for drug inventory management purposes.
+If you can type fast, it can get your inventory management tasks done faster than traditional
+GUI apps.
+
+### Summary of Contributions
+
+-**Code contributed** [Link to response contribution graph](https://nus-cs2113-ay2324s1.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=Barbaracwx&tabRepo=AY2324S1-CS2113-T17-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)
+
+- **Features implemented**
+
+1. **Find drug by name**
+ * What it does: Allows users to search for drugs by its name.
+
+2. **Find drug by date**
+ * What it does: Enables users to search for drugs by their expiration date.
+
+3. **List drugs by quantity level**
+ * What it does: Provides a list of drugs based on their current quantity, listed according to ascending order.
+
+4. **Set threshold level for each drug**
+ * What it does: Allows users to set a threshold quantity for each drug.
+
+5. **List threshold level for all drugs**
+ * What it does: Provides a list of threshold levels for all drugs.
+
+6. **Alert function when a drug is below the set threshold level**
+ * What it does: Sends alerts when a drug's quantity falls below the user-defined threshold.
+
+7. **Prevent Adding Expired Drugs to Cart**
+ * What it does: Displays an error alert when a user attempts to add an expired drug to their cart.
+
+8. **Indicate Expired Drugs in the List**
+ * What it does: Adds an (E) next to the entry of any drug with an expired expiration date.
+
+9. **Delete Vendor**
+ * What it does: Deletes a vendor from the vendors list.
+
+
+
+-**Classes implemented**
+* `FindCommand`
+* `ShowStockLevelCommand`
+* `SetThresholdCommand`
+* `ListThresholdCommand`
+* `DeleteVendorCommand`
+
+-**Contributions to the UG**
+* Barbara added documentation for the following sections of
+ the user guide:
+ * [Find Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#find---finds-drugs-using-their-name-or-expiry-date)
+ * [ShowStockLevel Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide#:~:text=stockLevel%20%2D%20List%20all%20drugs%20by%20quantity%20level%20in%20ascending%20order)
+ * [SetThreshold Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#setthreshold---set-the-threshold-quantity-for-a-drug)
+ * [ListThreshold Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#listthreshold---list-all-drugs-and-their-threshold-levels)
+ * [DeleteVendor Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide#:~:text=deleteVendor%20%2D%20deletes%20a%20vendor%20from%20list%20of%20vendors%20tracked%20by%20the%20system)
+
+
+-**Contributions to the DG**
+* Barbara added documentation for the following section of
+ the developer guide:
+ * [Command Class](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#command-class)
+ * [Parser Class](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#parser-component)
+ * [Find Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#1-find-function)
+ * [ShowStockLevel Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#3-showstocklevel-command)
+ * [SetThreshold Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#7-setthreshold-command)
+ * [ListThreshold Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#8-listthreshold-command)
+ * [DeleteVendor Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#10-deletevendor-command)
+* UML Diagrams
+ * [Sequence Diagram for Parser Class](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/ParserDiagram.png)
+ * [Sequence Diagram for Find Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/FindCommandDiagram.png)
+
+-**Contributions to team-based tasks**
+* Maintain issues and milestone tracker
+* Updated portions of user/developer docs not specific to a feature eg: user stories, target user profile,
+ value proposition
+* Kept up to date weekly deliverables during meetings
+
+**Providing Assistance**
+- Offered support by explaining concepts and providing help with code to group mates facing challenges.
+
+
+
+
+
diff --git a/docs/team/karishma-t.md b/docs/team/karishma-t.md
new file mode 100644
index 0000000000..b9f9b6136e
--- /dev/null
+++ b/docs/team/karishma-t.md
@@ -0,0 +1,87 @@
+# Karishma - Project Portfolio Page
+
+## Project : Stocker
+Stocker is a Command Line Interface(CLI) app for drug inventory management purposes.
+If you can type fast, it can get your inventory management tasks done faster than traditional
+GUI apps.
+
+### Summary of Contributions
+
+-**Code contributed** - [Link to reposense contribution graph](https://nus-cs2113-ay2324s1.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=karishma-t&tabRepo=AY2324S1-CS2113-T17-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)
+
+-**Features implemented**
+1) **Delete**
+ * What it does: Removes a drug from drug list by Serial Number
+
+
+2) **Add Vendor Supply**
+ * What it does: Adds a new vendor to q vendor's supply list.
+
+
+3) **Delete Vendor Supply**
+ * What it does: Deletes a drug from the vendor's supply list.
+
+
+4) **List Vendor Supply**
+ * What it does: Lists the drugs supplied by a specific vendor.
+
+
+5) **Find Vendor Supply**
+ * What it does: Lists all the vendors that supply a specific drug.
+
+
+6) **Add Description**
+ * What it does: Adds a new description for a specific drug.
+
+
+7) **Get Description**
+ * What it does: Retrieves the description of a specific drug.
+
+
+8) **List Descriptions**
+ * What it does: Lists all the descriptions for all drugs
+
+-**Classes implemented**
+* `DeleteCommand`
+* `AddVendorSupplyCommand`
+* `DeleteVendorSupplyCommand`
+* `ListVendorSupplyCommand`
+* `FindVendorSupplyCommand`
+* `AddDescriptionCommand`
+* `ListDescriptionsCommand`
+* `GetDescriptionCommand`
+
+-**Contributions to the UG**
+* Karishma added documentation for the following sections of
+ the user guide:
+ * [Delete Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#delete---Deletes-a-drug-being-tracked-by-the-system:~:text=the%20inventory%3A%20Panadol-,delete,-%2D%20Deletes%20a%20drug)
+ * [AddVendorSupplyCommand](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide#:~:text=addVendorSupply%20%2D%20Adds%20a%20drug%20into%20a%20vendor%E2%80%99s%20supply%20list%20to%20be%20tracked%20by%20the%20system.)
+ * [DeleteVendorSupplyCommand](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide#:~:text=deleteVendorSupply%20%2DDeletes%20a%20drug%20from%20a%20vendor%E2%80%99s%20supply%20list.)
+ * [ListVendorSupplyCommand](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide#:~:text=listVendorSupply%20%2D%20Displays%20the%20list%20of%20all%20drugs%20being%20supplied%20by%20a%20particular%20vendor.)
+ * [FindVendorSupplyCommand](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide#:~:text=findVendorSupply%20%2DDisplays%20the%20list%20of%20all%20vendors%20that%20supply%20a%20particular%20drug.)
+ * [AddDescriptionCommand](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide#:~:text=addDescription%20%2D%20Adds%20a%20drug%E2%80%99s%20description%20into%20a%20list%20to%20be%20tracked%20by%20the%20system.)
+ * [ListDescriptionsCommand](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide#:~:text=listDescriptions%20%2D%20Displays%20a%20list%20of%20all%20the%20descriptions%20for%20all%20corresponding%20drugs)
+ * [GetDescriptionCommand](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide#:~:text=getDescription%20%2D%20Retrieves%20the%20description%20of%20a%20particular%20drug.)
+
+-**Contributions to the DG**
+* Karishma added documentation for the following section of
+ the developer guide:
+ * [Delete Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide#:~:text=message%20indicating%20that.-,4.%20Delete%20Command,-The%20%E2%80%9CDelete%E2%80%9D%20function)
+ * [AddVendorSupplyCommand](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide#:~:text=12.%20addVendorSupply%20Command)
+ * [AddDescription Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide#:~:text=16.%20AddDescription%20Command)
+ * [User Stories](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide#:~:text=Priorities%3A%20High%20(must%20have)%20%2D%20*%20*%20_%2C%20Medium%20(nice%20to%20have)%20%2D%20_%20_%2C%20Low%20(unlikely%20to%20have)%20%2D%20)
+
+
+* UML Diagrams
+ * [AddDescription Diagram](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/AddDescriptionDiagram.png)
+ * [AddVendorSupply Diagram](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/AddVendorSupplyDiagram.png)
+
+-**Contributions to team-based tasks**
+* Maintain issues and milestone tracker
+* Updated portions of user/developer docs not specific to a feature eg: user stories, target user profile,
+ value proposition
+* Kept up to date weekly deliverables during meetings
+
+
+
+
diff --git a/docs/team/teohaozhi.md b/docs/team/teohaozhi.md
new file mode 100644
index 0000000000..0d6d11ba21
--- /dev/null
+++ b/docs/team/teohaozhi.md
@@ -0,0 +1,57 @@
+# Teo Hao Zhi - Project Portfolio Page
+
+## Project : Stocker
+Stocker is a Command Line Interface(CLI) app for drug inventory management purposes.
+If you can type fast, it can get your inventory management tasks done faster than traditional
+GUI apps.
+
+### Summary of Contributions
+
+-**Code contributed** [Link to reposense contribution graph](https://nus-cs2113-ay2324s1.github.io/tp-dashboard/?search=&sort=groupTitle&sortWithin=title&timeframe=commit&mergegroup=&groupSelect=groupByRepos&breakdown=true&checkedFileTypes=docs~functional-code~test-code&since=2023-09-22&tabOpen=true&tabType=authorship&tabAuthor=TeoHaoZhi&tabRepo=AY2324S1-CS2113-T17-3%2Ftp%5Bmaster%5D&authorshipIsMergeGroup=false&authorshipFileTypes=docs~functional-code~test-code&authorshipIsBinaryFileTypeChecked=false&authorshipIsIgnoredFilesChecked=false)
+
+-**Features implemented**
+* Login system
+ * What it does : Authenticates user and allow entry into the system
+* Help command
+ * What it does : Shows all available commands the application can run
+* Data backup and saving to txt file
+ * What it does : Saves and backup current list of drugs into a txt file that is loaded back into system upon booting
+ up the app
+
+-**Classes implemented**
+* `LoginSystem`
+* `HelpCommand`
+* `AddVendorCommand`
+* `ListVendorCommand`
+* `saveCommand`
+
+-**Contributions to the UG**
+ * Hao Zhi came up with the inital template for the user guide and added documentation for the following sections of
+ the user guide:
+ * [Login System](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#login-system--create-new-user-or-login-existing-user)
+ * [Help Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#help---list-currently-available-commands-in-current-version-their-uses-and-how-to-format-them-in-the-command-line)
+ * [SaveDrugs Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#savedrugs---save-existing-drugs-onto-hard-drive-of-computer)
+ * [addVendor Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#addvendor---adds-a-vendor-into-list-of-vendors-being-tracked-by-system)
+ * [listVendor Command](https://ay2324s1-cs2113-t17-3.github.io/tp/UserGuide.html#listvendors---list-all-vendors-currently-being-tracked-by-the-system)
+
+
+-**Contributions to the DG**
+ * Hao Zhi came up with the inital template of the developer guide and added documentation for the following section of
+ the developer guide:
+ * [Design & implementation](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#design--implementation),[Login System Component](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#login-system-component),[Help Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#5-help-command), [SaveDrugs Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#6-savedrugs-command), [addVendor Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#9-addvendor-command),
+ [listVendors Command](https://ay2324s1-cs2113-t17-3.github.io/tp/DeveloperGuide.html#11-listvendors-command)
+ * UML Diagrams
+ * [Architecture Diagram under Design & Implementation](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/Architecture_Diagram.png),[Login System Sequence Diagram](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/StockerToLoginSystem.png),
+ [SaveDrugs Command Sequence Diagram](https://ay2324s1-cs2113-t17-3.github.io/tp/UML%20Diagrams/SaveDrugsCommandDiagram.png)
+
+-**Contributions to team-based tasks**
+ * Set up GitHub team org/repo
+ * Maintain issues and milestone tracker
+ * Updated portions of user/developer docs not specific to a feature eg: FAQ of user guide, acknowledgements of
+ developer guide
+ * Kept up to date weekly deliverables during meetings
+
+**Mentoring**
+ * Clarified misconceptions on workflow and application architecture in the initial few weeks
+
+
diff --git a/src/main/java/seedu/duke/Duke.java b/src/main/java/seedu/duke/Duke.java
deleted file mode 100644
index 5c74e68d59..0000000000
--- a/src/main/java/seedu/duke/Duke.java
+++ /dev/null
@@ -1,21 +0,0 @@
-package seedu.duke;
-
-import java.util.Scanner;
-
-public class Duke {
- /**
- * Main entry-point for the java.duke.Duke application.
- */
- public static void main(String[] args) {
- String logo = " ____ _ \n"
- + "| _ \\ _ _| | _____ \n"
- + "| | | | | | | |/ / _ \\\n"
- + "| |_| | |_| | < __/\n"
- + "|____/ \\__,_|_|\\_\\___|\n";
- System.out.println("Hello from\n" + logo);
- System.out.println("What is your name?");
-
- Scanner in = new Scanner(System.in);
- System.out.println("Hello " + in.nextLine());
- }
-}
diff --git a/src/main/java/seedu/stocker/Stocker.java b/src/main/java/seedu/stocker/Stocker.java
new file mode 100644
index 0000000000..32a89a15cb
--- /dev/null
+++ b/src/main/java/seedu/stocker/Stocker.java
@@ -0,0 +1,109 @@
+package seedu.stocker;
+
+import seedu.stocker.authentication.LoginSystem;
+import seedu.stocker.storage.Storage;
+import seedu.stocker.ui.Ui;
+import seedu.stocker.parser.Parser;
+import seedu.stocker.commands.Command;
+import seedu.stocker.commands.CommandResult;
+import seedu.stocker.commands.ExitCommand;
+import seedu.stocker.drugs.Inventory;
+import seedu.stocker.drugs.SalesList;
+import seedu.stocker.drugs.Cart;
+import seedu.stocker.vendors.VendorsList;
+
+import java.io.IOException;
+
+import static seedu.stocker.common.Messages.MESSAGE_EXECUTION_FAILED;
+
+public class Stocker {
+
+ private Ui ui;
+ private Inventory inventory;
+ private SalesList salesList;
+ private Cart currentCart;
+ private VendorsList vendorsList;
+
+ public static void main(String[] launchArgs) {
+ new Stocker().run();
+ }
+
+ /**
+ * Runs Login System.
+ */
+ public boolean startLogin() throws IOException {
+ LoginSystem system = new LoginSystem();
+ system.run();
+
+ return system.loginStatus;
+ }
+
+
+ /**
+ * Runs the program until termination.
+ */
+ public void run() {
+ start();
+ runCommandLoopUntilExitCommand();
+ exit();
+ }
+
+ /**
+ * Sets up the required objects, and prints the welcome message.
+ */
+ private void start() {
+ try {
+ this.ui = new Ui();
+ this.inventory = new Inventory();
+ this.salesList = new SalesList();
+ this.currentCart = new Cart();
+ this.vendorsList = new VendorsList();
+ Storage storage = new Storage(inventory);
+ storage.loadFileContents("drugs.txt");
+ storage.loadSoldItems("soldItems.txt", salesList);
+ boolean checker = startLogin();
+ assert checker;
+ ui.showWelcomeMessage();
+ } catch (Exception e) {
+ ui.showInitFailedMessage();
+ System.exit(0);
+ }
+
+ }
+
+ /**
+ * Prints the Goodbye message and exits.
+ */
+ private void exit() {
+ ui.showGoodbyeMessage();
+ System.exit(0);
+ }
+
+ /**
+ * Reads the user command and executes it, until the user issues the exit command.
+ */
+ private void runCommandLoopUntilExitCommand() {
+ Command command;
+ do {
+ String userCommandText = ui.getUserCommand();
+ command = new Parser().parseCommand(userCommandText);
+ ui.showResultToUser(executeCommand(command));
+ } while (!ExitCommand.isExit(command));
+ }
+
+
+ /**
+ * Executes the command and returns the result.
+ *
+ * @param command user command
+ * @return result of the command
+ */
+ private CommandResult