diff --git a/.gitignore b/.gitignore
index 71c9194e8bd..ea7f77f4909 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,6 +3,9 @@
/build/
src/main/resources/docs/
+# Settings files
+/.settings/
+
# IDEA files
/.idea/
/out/
@@ -20,3 +23,5 @@ src/test/data/sandbox/
# MacOS custom attributes files created by Finder
.DS_Store
docs/_site/
+.project
+./docs/*.md.orig
diff --git a/README.md b/README.md
index 13f5c77403f..efda5998978 100644
--- a/README.md
+++ b/README.md
@@ -1,14 +1,49 @@
-[](https://github.com/se-edu/addressbook-level3/actions)
+# UNIon
+
+UNIon is a desktop application **tailored for Computing Students**,
+helping to **organise** and **navigate** the sea of
+communication-based **data** in school so that users
+can better achieve higher levels of **productivity**.
+
+### Motivation
+
+UNIon was created as a productivity application, aiming to organise school contacts for students.
+The name `UNIon` came from the function of the application to
+be a collection of a groups of people designed for university students.
+
+### Build Status
+
+[](https://github.com/AY2122S1-CS2103-T16-1/tp/actions)
+
+### Screenshots

-* This is **a sample project for Software Engineering (SE) students**.
- Example usages:
- * as a starting point of a course project (as opposed to writing everything from scratch)
- * as a case study
-* The project simulates an ongoing software project for a desktop application (called _AddressBook_) used for managing contact details.
- * It is **written in OOP fashion**. It provides a **reasonably well-written** code base **bigger** (around 6 KLoC) than what students usually write in beginner-level SE modules, without being overwhelmingly big.
- * It comes with a **reasonable level of user and developer documentation**.
-* It is named `AddressBook Level 3` (`AB3` for short) because it was initially created as a part of a series of `AddressBook` projects (`Level 1`, `Level 2`, `Level 3` ...).
-* For the detailed documentation of this project, see the **[Address Book Product Website](https://se-education.org/addressbook-level3)**.
-* This project is a **part of the se-education.org** initiative. If you would like to contribute code to this project, see [se-education.org](https://se-education.org#https://se-education.org/#contributing) for more info.
+### Features
+
+* Add contacts to UNIon
+* Search for a mobile number of a contact
+* Update contact details
+* Delete contacts
+* Create folders for your contacts
+* Add contacts to folders
+* List all folders
+* Delete folders
+* Use Unix commands to navigate UNIon
+
+**Coming Soon...**
+* GUI window update
+* Folders saved locally
+* Find specific folders
+* Add multiple contacts at once
+* Rename folder
+
+### Built With
+
+* Java
+* JavaFX
+
+### Acknowledgement
+
+This project is based on the AddressBook-Level3 project created by the [SE-EDU initiative](https://se-education.org).
+
diff --git a/build.gradle b/build.gradle
index be2d2905dde..1761321f2f6 100644
--- a/build.gradle
+++ b/build.gradle
@@ -65,8 +65,13 @@ dependencies {
testRuntimeOnly group: 'org.junit.jupiter', name: 'junit-jupiter-engine', version: jUnitVersion
}
+
shadowJar {
- archiveName = 'addressbook.jar'
+ archiveName = 'UNIon.jar'
}
defaultTasks 'clean', 'test'
+
+run {
+ enableAssertions = true
+}
diff --git a/docs/AboutUs.md b/docs/AboutUs.md
index 1c9514e966a..6c8579efff5 100644
--- a/docs/AboutUs.md
+++ b/docs/AboutUs.md
@@ -3,57 +3,66 @@ layout: page
title: About Us
---
-We are a team based in the [School of Computing, National University of Singapore](http://www.comp.nus.edu.sg).
+We believe in providing **simplicity** in everything we do here. If you're the kind of person who likes to organize your
+communication-based data easily with just a keyboard, you will enjoy UNIon. By re-purposing Unix commands, we ensure
+that you can get up to speed quickly and be productive with your data.
-You can reach us at the email `seer[at]comp.nus.edu.sg`
+# Our Team
-## Project team
+## Lee Hur Sebastian
-### John Doe
+**Role: Team Lead**
-
+
-[[homepage](http://www.comp.nus.edu.sg/~damithch)]
-[[github](https://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+[](https://ay2122s1-cs2103-t16-1.github.io/tp/team/sebbycake.html)
+[](https://www.linkedin.com/in/sebastian-lee-329b45198/)
+[](https://github.com/sebbycake)
-* Role: Project Advisor
+
-### Jane Doe
+## Lye Wen Jun
-
+**Role: Code Quality**
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+
-* Role: Team Lead
-* Responsibilities: UI
+[](https://ay2122s1-cs2103-t16-1.github.io/tp/team/xlzior.html)
+[](https://www.linkedin.com/in/wen-jun-lye/)
+[](https://github.com/xlzior/)
-### Johnny Doe
+
-
+## Lee Wei, David
-[[github](http://github.com/johndoe)] [[portfolio](team/johndoe.md)]
+**Role: Documentation**
-* Role: Developer
-* Responsibilities: Data
+
-### Jean Doe
+[](https://ay2122s1-cs2103-t16-1.github.io/tp/team/itsyme.html)
+[](https://www.linkedin.com/in/david-lee-4a147a1b1/)
+[](https://github.com/itsyme)
-
+
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+## Rehman Sajid
-* Role: Developer
-* Responsibilities: Dev Ops + Threading
+**Role: Integration**
-### James Doe
+
-
+[](https://ay2122s1-cs2103-t16-1.github.io/tp/team/rehmmann.html)
+[](https://www.linkedin.com/in/rehman-sajid/)
+[](https://github.com/rehmmann/)
-[[github](http://github.com/johndoe)]
-[[portfolio](team/johndoe.md)]
+
-* Role: Developer
-* Responsibilities: UI
+## Ching Jia Rong
+
+**Role: Testing**
+
+
+
+[](https://ay2122s1-cs2103-t16-1.github.io/tp/team/jiarong15.html)
+[](https://www.linkedin.com/in/jiarong15//)
+[](https://github.com/jiarong15)
diff --git a/docs/DeveloperGuide.md b/docs/DeveloperGuide.md
index 46eae8ee565..94d28eded2e 100644
--- a/docs/DeveloperGuide.md
+++ b/docs/DeveloperGuide.md
@@ -9,7 +9,7 @@ title: Developer Guide
## **Acknowledgements**
-* {list here sources of all reused/adapted ideas, code, documentation, and third-party libraries -- include links to the original source as well}
+* Apart from AB3, we did not reference any other sources
--------------------------------------------------------------------------------------------------------------------
@@ -19,6 +19,8 @@ Refer to the guide [_Setting up and getting started_](SettingUp.md).
--------------------------------------------------------------------------------------------------------------------
+
+
## **Design**
@@ -42,6 +44,8 @@ Given below is a quick overview of main components and how they interact with ea
[**`Commons`**](#common-classes) represents a collection of classes used by multiple other components.
+
+
The rest of the App consists of four components.
* [**`UI`**](#ui-component): The UI of the App.
@@ -61,12 +65,16 @@ Each of the four main components (also shown in the diagram above),
* defines its *API* in an `interface` with the same name as the Component.
* implements its functionality using a concrete `{Component Name}Manager` class (which follows the corresponding API `interface` mentioned in the previous point.
+
+
For example, the `Logic` component defines its API in the `Logic.java` interface and implements its functionality using the `LogicManager.java` class which follows the `Logic` interface. Other components interact with a given component through its interface rather than the concrete class (reason: to prevent outside component's being coupled to the implementation of a component), as illustrated in the (partial) class diagram below.
The sections below give more details of each component.
+
+
### UI component
The **API** of this component is specified in [`Ui.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/ui/Ui.java)
@@ -84,6 +92,8 @@ The `UI` component,
* keeps a reference to the `Logic` component, because the `UI` relies on the `Logic` to execute commands.
* depends on some classes in the `Model` component, as it displays `Person` object residing in the `Model`.
+
+
### Logic component
**API** : [`Logic.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/logic/Logic.java)
@@ -95,9 +105,11 @@ Here's a (partial) class diagram of the `Logic` component:
How the `Logic` component works:
1. When `Logic` is called upon to execute a command, it uses the `AddressBookParser` class to parse the user command.
1. This results in a `Command` object (more precisely, an object of one of its subclasses e.g., `AddCommand`) which is executed by the `LogicManager`.
-1. The command can communicate with the `Model` when it is executed (e.g. to add a person).
+1. The command can communicate with the `Model` when it is executed (e.g. to add a contact).
1. The result of the command execution is encapsulated as a `CommandResult` object which is returned back from `Logic`.
+
+
The Sequence Diagram below illustrates the interactions within the `Logic` component for the `execute("delete 1")` API call.

@@ -105,6 +117,8 @@ The Sequence Diagram below illustrates the interactions within the `Logic` compo
:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
+
+
Here are the other classes in `Logic` (omitted from the class diagram above) that are used for parsing a user command:
@@ -113,25 +127,30 @@ How the parsing works:
* When called upon to parse a user command, the `AddressBookParser` class creates an `XYZCommandParser` (`XYZ` is a placeholder for the specific command name e.g., `AddCommandParser`) which uses the other classes shown above to parse the user command and create a `XYZCommand` object (e.g., `AddCommand`) which the `AddressBookParser` returns back as a `Command` object.
* All `XYZCommandParser` classes (e.g., `AddCommandParser`, `DeleteCommandParser`, ...) inherit from the `Parser` interface so that they can be treated similarly where possible e.g, during testing.
+
+
### Model component
**API** : [`Model.java`](https://github.com/se-edu/addressbook-level3/tree/master/src/main/java/seedu/address/model/Model.java)
-
The `Model` component,
-* stores the address book data i.e., all `Person` objects (which are contained in a `UniquePersonList` object).
+* stores the address book data i.e., all `Person` objects (which are contained in a `UniquePersonList` object) and `Folder` objects (which are contained in a `UniqueFolderList` object).
* stores the currently 'selected' `Person` objects (e.g., results of a search query) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
+* stores the currently 'selected' `Folder` objects (e.g., results of a search query)) as a separate _filtered_ list which is exposed to outsiders as an unmodifiable `ObservableList` that can be 'observed' e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change.
* stores a `UserPref` object that represents the user’s preferences. This is exposed to the outside as a `ReadOnlyUserPref` objects.
* does not depend on any of the other three components (as the `Model` represents data entities of the domain, they should make sense on their own without depending on other components)
+
+
:information_source: **Note:** An alternative (arguably, a more OOP) model is given below. It has a `Tag` list in the `AddressBook`, which `Person` references. This allows `AddressBook` to only require one `Tag` object per unique tag, instead of each `Person` needing their own `Tag` objects.
+
### Storage component
@@ -150,96 +169,138 @@ Classes used by multiple components are in the `seedu.addressbook.commons` packa
--------------------------------------------------------------------------------------------------------------------
+
+
## **Implementation**
This section describes some noteworthy details on how certain features are implemented.
-### \[Proposed\] Undo/redo feature
+### Create a folder: `mkdir`
-#### Proposed Implementation
+#### Implementation
-The proposed undo/redo mechanism is facilitated by `VersionedAddressBook`. It extends `AddressBook` with an undo/redo history, stored internally as an `addressBookStateList` and `currentStatePointer`. Additionally, it implements the following operations:
+Folders are saved in a `UniqueFolderList` in `AddressBook`.
-* `VersionedAddressBook#commit()` — Saves the current address book state in its history.
-* `VersionedAddressBook#undo()` — Restores the previous address book state from its history.
-* `VersionedAddressBook#redo()` — Restores a previously undone address book state from its history.
+The following diagram shows how `mkdir` works:
-These operations are exposed in the `Model` interface as `Model#commitAddressBook()`, `Model#undoAddressBook()` and `Model#redoAddressBook()` respectively.
+
-Given below is an example usage scenario and how the undo/redo mechanism behaves at each step.
+#### Design considerations
-Step 1. The user launches the application for the first time. The `VersionedAddressBook` will be initialized with the initial address book state, and the `currentStatePointer` pointing to that single address book state.
+* **Alternative 1 (current choice)**: Folders hold references to contacts
+ * Pros: Easier management of folders
+ * Cons: More difficult to implement
-
+Diagram:
-Step 2. The user executes `delete 5` command to delete the 5th person in the address book. The `delete` command calls `Model#commitAddressBook()`, causing the modified state of the address book after the `delete 5` command executes to be saved in the `addressBookStateList`, and the `currentStatePointer` is shifted to the newly inserted address book state.
+
-
+* **Alternative 2**: Contacts hold references to folders
+ * Pros: Easy to implement
+ * Cons: More complex management of folders, Similar to tags which is already implemented
-Step 3. The user executes `add n/David …` to add a new person. The `add` command also calls `Model#commitAddressBook()`, causing another modified address book state to be saved into the `addressBookStateList`.
+Diagram:
-
+
-
:information_source: **Note:** If a command fails its execution, it will not call `Model#commitAddressBook()`, so the address book state will not be saved into the `addressBookStateList`.
+--------------------------------------------------------------------------------------------------------------------
-
+### View list of folders: `ls -folders`
-Step 4. The user now decides that adding the person was a mistake, and decides to undo that action by executing the `undo` command. The `undo` command will call `Model#undoAddressBook()`, which will shift the `currentStatePointer` once to the left, pointing it to the previous address book state, and restores the address book to that state.
+#### Implementation
-
+In our GUI, we would like to display the list of folders that users can create to organize
+their contacts into different classes. The implementation is very similar to `PersonListCard` and
+`PersonListPanel` for viewing list of contacts.
-
:information_source: **Note:** If the `currentStatePointer` is at index 0, pointing to the initial AddressBook state, then there are no previous AddressBook states to restore. The `undo` command uses `Model#canUndoAddressBook()` to check if this is the case. If so, it will return an error to the user rather
-than attempting to perform the undo.
+#### Design considerations
-
+* Alternative 1: 2-row layout
+ * Pros: Ability to see additional details of folders and contacts with a small-sized GUI.
+ * Cons: Extra effort to scroll down the GUI to look into the details of contacts.
+* Alternative 2: 2-column layout
+ * Pros: Ability to see both folders and contacts data at a glance without initial scrolling needed
+ * Cons: Truncated details of folders and contacts will be displayed due to the small-sized GUI.
-The following sequence diagram shows how the undo operation works:
+Alternative 1 is selected, implemented using additional`StackPane` on top of the existing `StackPane`
+for the list of contacts placed vertically. This additional `StackPane` is placed under a `VBox`
+component in `MainWindow`.
-
+--------------------------------------------------------------------------------------------------------------------
-
:information_source: **Note:** The lifeline for `UndoCommand` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline reaches the end of diagram.
+
-
+### Add contacts to folder: `echo INDEX_1 ... INDEX_N >> Folder`
-The `redo` command does the opposite — it calls `Model#redoAddressBook()`, which shifts the `currentStatePointer` once to the right, pointing to the previously undone state, and restores the address book to that state.
+#### Implementation
+Contacts are added by updating the `ObservableList` in `UniqueFolderList`.
+A new `Folder` object is created containing the new `Person` and replaces the old folder in the `UniqueFolderList`.
-
:information_source: **Note:** If the `currentStatePointer` is at index `addressBookStateList.size() - 1`, pointing to the latest address book state, then there are no undone AddressBook states to restore. The `redo` command uses `Model#canRedoAddressBook()` to check if this is the case. If so, it will return an error to the user rather than attempting to perform the redo.
+#### Design considerations
-
+* Alternative 1: If there is an invalid index, allow adding of contact for the remaining valid index
+ * Pros: Easier to implement.
+ * Cons: Difficult for user to know which contacts have been added into the folder
+* Alternative 2: Only allow adding of contacts when all indexes are valid
+ * Pros: Easier for user to know which contacts have been added into the folder
+ * Cons: Requires more code and effort to ensure all indexes are valid before adding them to folder
-Step 5. The user then decides to execute the command `list`. Commands that do not modify the address book, such as `list`, will usually not call `Model#commitAddressBook()`, `Model#undoAddressBook()` or `Model#redoAddressBook()`. Thus, the `addressBookStateList` remains unchanged.
+Alternative 2 is selected, as it is more user-friendly and intuitive.
-
+--------------------------------------------------------------------------------------------------------------------
-Step 6. The user executes `clear`, which calls `Model#commitAddressBook()`. Since the `currentStatePointer` is not pointing at the end of the `addressBookStateList`, all address book states after the `currentStatePointer` will be purged. Reason: It no longer makes sense to redo the `add n/David …` command. This is the behavior that most modern desktop applications follow.
+
-
+### Locate folders by name: `find -folders`
-The following activity diagram summarizes what happens when a user executes a new command:
+#### Implementation
-
+The Sequence Diagram below illustrates the interactions within the Logic component for the `execute("find -folders CS")` API call.
-#### Design considerations:
+
-**Aspect: How undo & redo executes:**
+#### Design considerations
-* **Alternative 1 (current choice):** Saves the entire address book.
- * Pros: Easy to implement.
- * Cons: May have performance issues in terms of memory usage.
+When deciding on the design for `find -folders`, we considered the existing `find` command to search for contacts by name. This `find` command uses `StringUtil.containsWordIgnoreCase` which only matches full words.
-* **Alternative 2:** Individual command knows how to undo/redo by
- itself.
- * Pros: Will use less memory (e.g. for `delete`, just save the person being deleted).
- * Cons: We must ensure that the implementation of each individual command are correct.
+However, one use case we wanted to cater to was students who group their contacts by shared modules. For example, students take CS2103T and CS2101 concurrently, and may wish to search for these two folders (and other CS modules) by using the keyword `CS`. If we only matched full words, `find -folders CS` would not contain *either* of the modules `CS2103T` or `CS2101`, which is undesirable.
-_{more aspects and alternatives to be added}_
+* **Alternative 1 (current choice)**: Match partial words
+ * Pros: More intuitive behaviour for the above use case
+ * Cons: Requires a new method to be implemented
+* **Alternative 2**: Match full words only
+ * Pros: Easy to implement as this uses the same logic as finding contacts by name
+ * Cons: May lead to unexpected behaviour for the above use case
-### \[Proposed\] Data archiving
+Alternative 1 was chosen, and the new method is under `StringUtil.containsTextIgnoreCase`.
-_{Explain here how the data archiving feature will be implemented}_
+--------------------------------------------------------------------------------------------------------------------
+
---------------------------------------------------------------------------------------------------------------------
+### Edit folder name: `mv OLD_FOLDER_NAME | NEW_FOLDER_NAME`
+
+#### Implementation
+
+Folders are removed by first specifying the old folder's name and followed
+by the new folder's name.
+
+The underlying implementation essentially creates a new folder with the
+newly specified name and copies all the contacts from the old to the new
+folder. The new folder is saved in the `UniqueFolderList` in `AddressBook`
+just like the old folder.
+
+The following diagram shows how `mv` works:
+
+
+
+#### Design considerations
+
+* **Alternative 1 (current choice)**: Old folder and new folder name are separated by the pipe operator `|`.
+ * Pros: Easy to distinguish between the folder to be replaced and the new incoming folder name considering how folder name can have blank spaces in between
+ * Cons: More difficult to implement
+
+
## **Documentation, logging, testing, configuration, dev-ops**
@@ -251,6 +312,8 @@ _{Explain here how the data archiving feature will be implemented}_
--------------------------------------------------------------------------------------------------------------------
+
+
## **Appendix: Requirements**
### Product scope
@@ -262,69 +325,213 @@ _{Explain here how the data archiving feature will be implemented}_
* can type fast
* prefers typing to mouse interactions
* is reasonably comfortable using CLI apps
+* computing student with prior experience in using Unix-commands
-**Value proposition**: manage contacts faster than a typical mouse/GUI driven app
+### Value Proposition
+- manage contacts faster and more conveniently than a typical mouse/GUI driven app
+- use a set of Unix-like commands that CS students are already familiar with so that they don't have to re-learn, thus helping ease of adoption
+- skills learned while using this app are transferable to other tools
### User stories
Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*`
-| Priority | As a … | I want to … | So that I can… |
-| -------- | ------------------------------------------ | ------------------------------ | ---------------------------------------------------------------------- |
-| `* * *` | new user | see usage instructions | refer to instructions when I forget how to use the App |
-| `* * *` | user | add a new person | |
-| `* * *` | user | delete a person | remove entries that I no longer need |
-| `* * *` | user | find a person by name | locate details of persons without having to go through the entire list |
-| `* *` | user | hide private contact details | minimize chance of someone else seeing them by accident |
-| `*` | user with many persons in the address book | sort persons by name | locate a person easily |
-
-*{More to be added}*
+| Priority | As a … | I want to … | So that I can… |
+| -------- | ------------------------------------------ | ----------------------------------------------------- | ---------------------------------------------------------- |
+| `* * *` | student | create a folder | classify related contacts together |
+| `* * *` | student | view all the folders that I created | |
+| `* * *` | student | delete a folder | remove folders when they become irrelevant |
+| `* * *` | student | add a user to a folder | classify related contacts together and find them efficiently |
+| `* * *` | experienced computing student | use my knowledge of Unix commands to navigate the app | use the app without learning a new set of commands |
+| `* * *` | student | save to a JSON file automatically | achieve data persistence between the application and local storage |
+| `* *` | student | remove a contact from a folder | update contacts in folders easily |
+| `* *` | student | clear all folders | reset my folders easily |
+| `* *` | student | add several contacts into a folder at one go | reduce time wastage adding them 1 by 1 |
+| `* *` | student | update my folder name | efficiently manage outdated folders |
+| `* *` | student | find a specific folder | minimize time spent on looking for my folder |
### Use cases
-(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise)
+(For all use cases below, the **System** is the `UNIon` and the **Actor** is the `student`, unless specified otherwise)
+
+**Use case: UC01 - Add a new folder**
+
+**Guarantees:**
+ * A new folder with the specified name is created only if the input format is valid.
+ * The newly-created folder is empty.
+
+**MSS:**
+ 1. User requests to add a new folder.
+ 2. UNIon accepts input, and a new folder is created.
+
+ Use case ends.
+
+**Extensions:**
+* 1a. The folder name specified contains non-alphanumeric characters or wrong command format is used.
+ * 1a1. No new folder is created.
+ * 1a2. User requests to add a new folder.
+ * Steps 1a1-1a2 are repeated until the data entered are correct.
+
+**Use case: UC02 - Add a new contact to UNIon**
+
+**Guarantees:**
+ * A new contact with the specified details is added to the contact list only if the input format is valid.
+
+**MSS:**
+ 1. User requests to add new contact.
+ 2. UNIon accepts input and adds contact to the pool of contacts.
+
+ Use case ends.
-**Use case: Delete a person**
+**Extensions:**
+* 1a. The given input has missing fields.
+ * 1a1. No new contact is created by UNIon.
+ * 1a2. User requests to add new contact.
+ * Steps 1a1-1a2 are repeated until the data format entered are correct.
-**MSS**
+* 1b. Name supplied exceeds character limit.
+ * 1b1. No new contact is created by UNIon
+ * 1b2. User requests to add new contact.
+ * Steps 1b1-1b2 are repeated until the data format entered are correct.
-1. User requests to list persons
-2. AddressBook shows a list of persons
-3. User requests to delete a specific person in the list
-4. AddressBook deletes the person
+* 1c. Name supplied already exists in UNIon.
+ * 1c1. No new contact is created by UNIon
+ * 1c2. User requests to add new contact.
+ * Steps 1c1-1c2 are repeated until the data format entered are correct.
+
+**Use case: UC03 - Add existing contact to an existing folder**
- Use case ends.
+**Preconditions:** Folder and contact already exists in UNIon
+
+**MSS:**
+
+ 1. User adds a new folder named A (UC01)
+ 2. User adds a new contact named Clarence (UC02)
+ 3. User requests to add contact(s) to a named folder.
+ 4. UNIon adds the contact specified into the respective folder.
+
+ Use case ends.
+
+**Extensions:**
+* 3a. User inputs an invalid index.
+ * 3a1. Contact not added to folder.
+ * 3a2. User request contacts to be added to the named folder.
+ * Steps 3a1-3a2 are repeated until the data format entered are correct.
+
+
+* 3b. User specifies a folder name that does not exist.
+ * 3b1. Contact not added to any folder.
+ * 3b2. User request contacts to be added to the named folder.
+ * Steps 3b1-3b2 are repeated until the data format entered are correct.
+
+**Use case: UC04 - Delete specified folder**
+
+**Guarantees:**
+ * Folder specified is deleted from UNIon only if the input format is valid.
+ * Contacts in the specified folder is removed as well.
+
+**Preconditions:** Folder must already exist in UNIon
+
+**MSS:**
+ 1. User requests to delete folder.
+ 2. UNIon removes the specified folder from its system.
+
+Use case ends.
**Extensions**
+* 1a. Folder specified does not exist in UNIon.
+ * 1a1. UNIon rejects command and nothing is executed.
+ * 1a2. User requests to delete folder.
+ * Steps 1a1 - 1a2 are repeated until data format is correct.
-* 2a. The list is empty.
+* 1b. Command format is erroneous.
+ * 1b1. UNIon rejects command and nothing is executed.
+ * 1b2. User requests to delete folder.
+ * Steps 1b1 - 1b2 are repeated until data format is correct.
+
+**Use case: UC05 - Remove all contacts**
- Use case ends.
+**Guarantees:** All contacts are removed from UNIon only if the input format is valid.
-* 3a. The given index is invalid.
+**MSS:**
+ 1. User requests to remove all contacts.
+ 2. UNIon clears all the contacts it has stored thus far.
- * 3a1. AddressBook shows an error message.
+ Use case ends.
- Use case resumes at step 2.
+**Extensions**
+* 1a. UNIon detects error in input of command supplied by user.
+ * 1a1. All contacts remain in UNIon.
+ * 1a2. User re-inputs command.
+ * Steps 1a1 - 1a2 are repeated until data format is correct.
-*{More to be added}*
+
+**Use case: UC06 - Remove specified contact from folder**
+
+**Guarantees:** Contact specified is removed from folder
+
+**Preconditions:**
+ * Contact must already exist in contact list and within the specified folder.
+ * Folder must already exist in folder list.
+
+**MSS:**
+1. User requests the index of contact from contact list to be removed.
+2. UNIon removes the specified contact from the folder.
+
+Use case ends.
+
+**Extensions**
+* 1a. Contact does not exist in the folder.
+ * 1a1. Folder remains unchanged.
+ * 1a2. User requests the index of contact from contact list to be removed.
+ * Steps 1a1 - 1a2 are repeated until data format is correct.
+
+* 1b. Folder does not exist in UNIon.
+ * 1b1. Contact not removed from folder.
+ * 1b2. User requests the index of contact from contact list to be removed.
+ * Steps 1b1 - 1b2 are repeated until data format is correct.
+
+**Use case: UC07 - Remove all folders**
+
+**Guarantees:** All folders are deleted from UNIon
+
+**MSS:**
+1. User requests to remove all folders.
+2. UNIon clears all the folders it has stored thus far.
+
+Use case ends.
+
+**Extensions**
+* 1a. UNIon detects error of input command supplied by user.
+ * 1a1. All folders remain in UNIon.
+ * 1a2. User requests to remove all folders.
+ * Steps 1a1 - 1a2 are repeated until data format is correct.
+
+
### Non-Functional Requirements
1. Should work on any _mainstream OS_ as long as it has Java `11` or above installed.
-2. Should be able to hold up to 1000 persons without a noticeable sluggishness in performance for typical usage.
+2. Should be able to hold up to 1000 contacts without a noticeable sluggishness in performance for typical usage.
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.
+4. Should work well for standard screen resolutions 1920x1080 and higher, and, for screen scales 100% and 125%.
+5. Should handle invalid user input gracefully and not crash.
+6. On invalid user input, should prompt the user with information on the correct input format expected so that the user can learn how to use the commands.
-*{More to be added}*
+Project scope
+- The app is not required to handle communication with people, only keeping track of metadata associated with contacts
+- The app is not required to handle integration with messaging apps like Telegram and WhatsApp
### Glossary
* **Mainstream OS**: Windows, Linux, Unix, OS-X
-* **Private contact detail**: A contact detail that is not meant to be shared with others
+* **Experienced Computing Student**: A student that has already completed introductory modules in their respective universities.
--------------------------------------------------------------------------------------------------------------------
+
+
## **Appendix: Instructions for manual testing**
Given below are instructions to test the app manually.
@@ -337,41 +544,204 @@ testers are expected to do more *exploratory* testing.
### Launch and shutdown
1. Initial launch
-
1. Download the jar file and copy into an empty folder
-
- 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
+ 1. Run the jar file using the command `java -jar UNIon.jar` Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
1. Saving window preferences
-
1. Resize the window to an optimum size. Move the window to a different location. Close the window.
-
1. Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
-
-1. _{ more test cases … }_
-
-### Deleting a person
-
-1. Deleting a person while all persons are being shown
-
- 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
-
- 1. Test case: `delete 1`
- Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.
-
- 1. Test case: `delete 0`
- Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
-
- 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
- Expected: Similar to previous.
-
-1. _{ more test cases … }_
-
-### Saving data
-
-1. Dealing with missing/corrupted data files
-
- 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_
-
-1. _{ more test cases … }_
+
+### Managing contacts
+
+#### Adding a contact: `touch`
+
+1. Creating a contact
+ 1. Test case: `touch -n John Doe -p 98765432 -e johnd@example.com -a John street, block 123, #01-01`
+ Expected: John Doe is added
+ 1. Test case: `touch -n John Doe -p 98765432 -e johnd@example.com -a John street, block 123, #01-01`
+ Expected: John Doe is not added as he is already in the list. Error message is shown.
+ 1. Test case: `touch -nBetsy Doe -p 98765432 -e johnd@example.com -a John street, block 123, #01-01`
+ Expected: Betsy Doe is not added as the command is invalid (due to the lack of a space after the `-n` flag). Error message is shown.
+ 1. Test case: `touch -n Betsy Doe -p 98765432 -e johnd@example.com`
+ Expected: Betsy Doe is not added as the command is invalid (due to missing compulsory address parameter). Error message is shown.
+
+#### Listing all contacts: `ls -contacts`
+
+1. Listing all contacts
+ 1. Prerequisite: List is populated with contacts (see above)
+ 1. Test case: `ls -contacts`
+ Expected: Full list of contacts is shown
+2. Listing all contacts after filtering with `find -contacts`
+ 1. Prerequisite: List has been filtered by running a `find -contacts` command
+ 1. Test case: `ls -contacts`
+ Expected: Full list of contacts is shown
+
+#### Editing a contact: `vim`
+
+1. Editing a contact while all contacts are being shown
+ 1. Prerequisite: There is an existing contact in the contact list
+ 1. Test case: `vim 1 -n Jane Doe`
+ Expected: Contact at first position is renamed to Jane Doe
+ 1. Incorrect edit commands to try: `vim`, `vim 0 -n Jane Doe`, `vim x -n Jane Doe` (where x is larger than the list size)
+2. Editing a contact while a filter is in place
+ 1. Prerequisite: Run a search using the `find -contacts` command. Multiple contacts in the filtered list.
+ 1. Similar to previous, but index number is with reference to the filtered list.
+
+#### Locating contacts by name: `find -contacts`
+
+1. Finding contacts
+ 1. Prerequisite: There are multiple existing contacts, including someone named Janet Doe
+ 1. Test case: `find -contacts Janet`
+ Expected: List of contacts is filtered to show Janet Doe
+ 1. Test case: `find -contacts Jane`
+ Expected: No contacts found as only full words are matched.
+
+#### Deleting a contact: `rm`
+
+1. Deleting a contact while all contacts are being shown
+
+ 1. Prerequisites: List all contacts using the `ls -contacts` command. Multiple contacts in the list.
+ 1. Test case: `rm 1`
+ Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message. Timestamp in the status bar is updated.
+ 1. Test case: `rm 0`
+ Expected: No contact is deleted. Error details shown in the status message. Status bar remains the same.
+ 1. Other incorrect delete commands to try: `rm`, `rm x`, `...` (where x is larger than the list size)
+ Expected: Similar to previous.
+
+2. Deleting a contact while a filter is in place
+ 1. Prerequisite: Run a search using the `find -contacts` command. Multiple contacts in the filtered list.
+ 1. Similar to previous, but index number is with reference to the filtered list.
+
+#### Clearing all contacts: `rm -contacts`
+
+1. Clearing all contacts
+ 1. Prerequisites: Multiple contacts in the list.
+ 1. Test case: `rm -contacts`
+ Expected: all contacts are removed.
+
+### Managing folders
+
+#### Adding a folder: `mkdir`
+
+1. Creating a folder
+ 1. Test case: `mkdir CS2103`
+ Expected: A new folder called `CS2103` is created
+ 1. Test case: `mkdir CS2103`
+ Expected: A new folder is not created as folders must have unique names
+ 1. Test case: `mkdir ---`
+ Expected: a new folder is not created as folder names cannot contain special characters
+
+#### Adding contacts to a folder: `echo`
+
+1. Adding contacts to a folder while all contacts and all folders are being shown
+ 1. Prerequisites: There are existing contacts and existing folders
+ 1. Test case: `echo 1 >> CS2103`
+ Expected: Adds the first contact in the list to the folder `CS2103`
+ 1. Test case: `echo 1 2 >> CS2103`
+ Expected: Adds the first two contacts in the list to the folder `CS2103`
+
+1. Adding contacts to a folder while there is a filter in place for contacts
+ 1. Prerequisites: Run a search using the `find -contacts` command. Multiple contacts in the filtered list.
+ 1. Similar to point 1 but index is with reference to the filtered list.
+
+1. Adding contacts to a folder while there is a filter in place for folders
+ 1. Prerequisites: Run a search using the `find -folders` command. Multiple folders in the filtered list.
+ 1. Similar to point 1 but folder that is being added to must be present in the filtered list
+
+
+
+#### Deleting a contact from folder: `rm`
+
+1. Removing contacts from a folder while all contacts and all folders are being shown
+ 1. Prerequisites: There are existing contacts and existing folders
+ 1. Test case: `rm 1 >> CS2103`
+ Expected: Removes the first contact in the list from the folder `CS2103`
+
+1. Removing contacts from a folder while there is a filter in place for contacts
+ 1. Prerequisites: Run a search using the `find -contacts` command. Multiple contacts in the filtered list.
+ 1. Similar to point 1 but index is with reference to the filtered list.
+
+1. Removing contacts from a folder while there is a filter in place for folders
+ 1. Prerequisites: Run a search using the `find -folders` command. Multiple folders in the filtered list.
+ 1. Similar to point 1 but folder that is being removed from must be present in the filtered list
+
+#### Listing all folders: `ls -folders`
+
+1. Listing all folders
+ 1. Prerequisite: List is populated with folders
+ 1. Test case: `ls -folders`
+ Expected: Full list of folders is shown
+2. Listing all folders after filtering with `find -folders`
+ 1. Prerequisite: List has been filtered by running a `find -folders` command
+ 1. Test case: `ls -folders`
+ Expected: Full list of folders is shown
+
+#### Editing a folder name: `mv`
+
+1. Editing a folder while all folders are being shown
+ 1. Prerequisite: There is an existing folder in the contact list
+ 1. Test case: `mv CS2103 | CS2103T`
+ Expected: The folder `CS2103` is renamed to `CS2103T`
+ 1. Incorrect edit commands to try: `mv`, `mv CS2103 CS2103T`
+2. Editing a folder while a filter is in place
+ 1. Prerequisite: Run a search using the `find -folders` command. Multiple folders in the filtered list.
+ 1. Similar to previous, but folder to be edited must be in the filtered list.
+
+
+
+#### Locating folders by name: `find -folders`
+
+1. Finding folders
+ 1. Prerequisite: There are multiple existing folders, including someone named Janet Doe
+ 1. Test case: `find -folders CS`
+ Expected: List of folders is filtered to show folders whose names contain `CS`, including `CS2103` and `CS2101`
+
+#### Deleting a folder: `rmdir`
+
+1. Deleting a folder
+ 1. Test case: `rmdir CS2103`
+ Expected: The folder CS2103 is removed
+ 1. Incorrect delete commands to try: `rmdir`, `rmdir X` where the folder `X` does not exist
+ Expected: Similar to previous.
+
+1. Deleting a folder while there is a filter in place for folders
+ 1. Prerequisites: Run a search using the `find -folders` command. Multiple folders in the filtered list.
+ 1. Similar to point 1 but folder that is being deleted must be present in the filtered list
+
+#### Clearing all folders: `rm -folders`
+
+1. Clearing all folders
+ 1. Prerequisites: Multiple folders in the list.
+ 1. Test case: `rm -folders`
+ Expected: all folders are removed.
+
+
+
+## **Appendix: Effort**
+
+The effort we put into UNIon was more than that of the individual project.
+While we did not have to start from scratch, since it is a brown-field project, there were more things that
+we had to do. One of the additional challenges were creating our scope, generating user
+stories and coming up with what our product would look like. Creating readable, succinct
+documentation was also challenging. Weekly meetings also took up more of our time, compared
+to the individual project. Moreover, we had internal deadlines to meet, putting
+our time management to the test. Our team did a good job of delegating work and
+each person had their role to play. Each member took responsibility for one part of UNIon
+and had secondary responsibilities as well.
+
+UNIon does reuse some code from AB3 when implementing folders. However, it was not
+just a simple copy and paste. Because of the differing behaviours of folders and
+contacts, the code had to be adapted to quite a large extent to suit our purposes.
+For folders, only about 5% of the effort was saved by reusing the code from AB3.
+This mostly came in the form of saving time and effort from typing out the code and
+understanding how the different components interact with models like `Person`. Since
+`Folder` is a model as well, the `Person` served as an example to help us understand
+how the models interacted with other components. However, the code from `Person` merely
+served as the base. The difference in behaviour of folders and contacts meant that we had
+to come up with the rest of the code involving the behaviour of folders ourselves.
+
+UNIon deals with more entities than AB3, with both contacts and folders. Not only does
+this make coding more difficult, testing is more difficult as well. The GUI of UNIon
+includes the display of folders as well. It was more difficult to ensure that UNIon
+runs smoothly with more entities present, creating more chances for bugs to sneak in.
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index 3716f3ca8a4..d88c9d35efd 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -3,190 +3,316 @@ layout: page
title: User Guide
---
-AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized for use via a Command Line Interface** (CLI) while still having the benefits of a Graphical User Interface (GUI). If you can type fast, AB3 can get your contact management tasks done faster than traditional GUI apps.
+UNIon is a desktop app for organizing various types of contacts, optimized for use for the vast majority of computing students.
+If you are already familiar with Unix commands, then UNIon will be easy for you to use.
* Table of Contents
{:toc}
--------------------------------------------------------------------------------------------------------------------
-## Quick start
-
-1. Ensure you have Java `11` or above installed in your Computer.
-
-1. Download the latest `addressbook.jar` from [here](https://github.com/se-edu/addressbook-level3/releases).
+
-1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook.
+## Quick start
-1. Double-click the file to start the app. The GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
- 
+1. Ensure you have Java `11` or above installed in your Computer
+1. Download the latest JAR file from [here](https://github.com/AY2122S1-CS2103-T16-1/tp/releases)
+1. Copy the file to the folder you want to use as the _home folder_ for your UNIon
+1. Double-click the file to start the app. The GUI should appear in a few seconds, and it should look similar to this image below. Note how the app contains some sample contacts
+
+
-1. Type the command in the command box and press Enter to execute it. e.g. typing **`help`** and pressing Enter will open the help window.
+5. Type the command in the command box and press Enter to execute it. e.g. typing `help` and pressing Enter will open the help window.
Some example commands you can try:
-
- * **`list`** : Lists all contacts.
-
- * **`add`**`n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01` : Adds a contact named `John Doe` to the Address Book.
-
- * **`delete`**`3` : Deletes the 3rd contact shown in the current list.
-
- * **`clear`** : Deletes all contacts.
-
- * **`exit`** : Exits the app.
-
-1. Refer to the [Features](#features) below for details of each command.
+ * `ls -contacts`: Lists all contacts
+ * `touch -n John Doe -p 98765432 -e johnd@example.com -a John street, block 123, #01-01`: Adds a contact named `John Doe` to UNIon
+ * `rm 3`: Deletes the 3rd contact shown in the current list
+ * `rm -contacts`: Deletes all contacts
+ * `exit`: Exits the app
+6. Refer to the [Features](#features) below for details of each command.
--------------------------------------------------------------------------------------------------------------------
+
+
## Features
**:information_source: Notes about the command format:**
-* Words in `UPPER_CASE` are the parameters to be supplied by the user.
- e.g. in `add n/NAME`, `NAME` is a parameter which can be used as `add n/John Doe`.
+* Words in `UPPER_CASE` are the parameters to be supplied by the user
+ e.g. in `touch -n NAME`, `NAME` is a parameter which can be used as `touch -n John Doe`
+
+* Items in square brackets are optional
+ e.g. `-n NAME [-t TAG]` can be used as `-n John Doe -t friend` or as `-n John Doe`
-* Items in square brackets are optional.
- e.g `n/NAME [t/TAG]` can be used as `n/John Doe t/friend` or as `n/John Doe`.
+* Items with `…` after them can be used multiple times including zero times
+ e.g. `[-t TAG]…` can be used as ` ` (i.e. 0 times), `-t friend`, `-t friend -t family` etc
-* Items with `…` after them can be used multiple times including zero times.
- e.g. `[t/TAG]…` can be used as ` ` (i.e. 0 times), `t/friend`, `t/friend t/family` etc.
+* Parameters can be in any order
+ e.g. if the command specifies `-n NAME -p PHONE`, `-p PHONE -n NAME` is also acceptable
-* Parameters can be in any order.
- e.g. if the command specifies `n/NAME p/PHONE_NUMBER`, `p/PHONE_NUMBER n/NAME` is also acceptable.
+* If a parameter is expected only once in the command but you specified it multiple times, only the last occurrence of the parameter will be taken
+ e.g. if you specify `-p 12341234 -p 56785678`, only `-p 56785678` will be taken
-* If a parameter is expected only once in the command but you specified it multiple times, only the last occurrence of the parameter will be taken.
- e.g. if you specify `p/12341234 p/56785678`, only `p/56785678` will be taken.
+* For commands that do not take in parameters (such as `help` and `exit`) , extraneous parameters will be ignored
+ e.g. if the command specifies `help 123`, it will be interpreted as `help`
-* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
- e.g. if the command specifies `help 123`, it will be interpreted as `help`.
+* Flags such as `-contacts` and `-folders` are part of the command word and must be placed immediately after the main command word
+ e.g. (`ls -contacts` not `ls -invalid_flag -contacts`)
-### Viewing help : `help`
+
-Shows a message explaning how to access the help page.
+### Viewing help: `help`
+
+Shows a message explaining how to access the help page.

Format: `help`
+### Managing contacts
+
+#### Adding a contact: `touch`
-### Adding a person: `add`
+Adds a contact to UNIon.
-Adds a person to the address book.
+Format: `touch -n NAME -p PHONE -e EMAIL -a ADDRESS [-t TAG]…`
-Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…`
+* `NAME` has a character limit of 70 characters
+* `NAME` is case-sensitive as John Doe and john doe will be treated as different contacts
+* `PHONE` accepts any length to allow for phone formats from different countries
+* `ADDRESS` is truncated by an ellipsis if the contents cannot fit in one line
+* Duplicate `TAG`s are ignored
+* We recommend that `TAG`s are kept to a maximum of 50 characters. If a tag has more than 50 characters, you may not be able to view the entire tag (depending on the size of the window)
:bulb: **Tip:**
-A person can have any number of tags (including 0)
+A contact can have any number of tags (including 0)
Examples:
-* `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01`
-* `add n/Betsy Crowe t/friend e/betsycrowe@example.com a/Newgate Prison p/1234567 t/criminal`
+* `touch -n John Doe -p 98765432 -e johnd@example.com -a John street, block 123, #01-01`
+* `touch -n Betsy Crowe -t friend -e betsycrowe@example.com -a Newgate Prison -p 1234567 -t criminal`
-### Listing all persons : `list`
+#### Listing all contacts: `ls -contacts`
-Shows a list of all persons in the address book.
+Shows a list of all contacts in UNIon.
-Format: `list`
+Format: `ls -contacts`
-### Editing a person : `edit`
+
-Edits an existing person in the address book.
+#### Editing a contact: `vim`
-Format: `edit INDEX [n/NAME] [p/PHONE] [e/EMAIL] [a/ADDRESS] [t/TAG]…`
+Edits an existing contact in the UNIon.
-* Edits the person at the specified `INDEX`. The index refers to the index number shown in the displayed person list. The index **must be a positive integer** 1, 2, 3, …
-* At least one of the optional fields must be provided.
-* Existing values will be updated to the input values.
-* When editing tags, the existing tags of the person will be removed i.e adding of tags is not cumulative.
-* You can remove all the person’s tags by typing `t/` without
- specifying any tags after it.
+Format: `vim INDEX [-n NAME] [-p PHONE] [-e EMAIL] [-a ADDRESS] [-t TAG]…`
+
+* Edits the contact at the specified `INDEX`. The index refers to the index number shown in the displayed contact list. The index **must be a positive integer** 1, 2, 3, …
+* At least one of the optional fields must be provided
+* `NAME` has a character limit of 70 characters
+* `PHONE` accepts any length to allow for phone formats from different countries
+* `ADDRESS` is truncated by an ellipsis if the contents cannot fit in one line
+* Duplicate `TAG`s are ignored
+* We recommend that `TAG`s are kept to a maximum of 50 characters. If a tag has more than 50 characters, you may not be able to view the entire tag (depending on the size of the window)
+* Existing values will be updated to the input values
+* When editing tags, the existing tags of the contact will be removed i.e. adding of tags is not cumulative
+* You can remove all the contact’s tags by typing `-t` without specifying any tags after it
Examples:
-* `edit 1 p/91234567 e/johndoe@example.com` Edits the phone number and email address of the 1st person to be `91234567` and `johndoe@example.com` respectively.
-* `edit 2 n/Betsy Crower t/` Edits the name of the 2nd person to be `Betsy Crower` and clears all existing tags.
+* `vim 1 -p 91234567 -e johndoe@example.com` Edits the phone number and email address of the 1st contact to be `91234567` and `johndoe@example.com` respectively
+* `vim 2 -n Betsy Crower -t` Edits the name of the 2nd contact to be `Betsy Crower` and clears all existing tags
-### Locating persons by name: `find`
+#### Locating contacts by name: `find -contacts`
-Finds persons whose names contain any of the given keywords.
+Finds contacts whose names contain any of the given keywords.
-Format: `find KEYWORD [MORE_KEYWORDS]`
+Format: `find -contacts KEYWORD [MORE_KEYWORDS]`
-* The search is case-insensitive. e.g `hans` will match `Hans`
+* The search is case-insensitive. e.g. `hans` will match `Hans`
* The order of the keywords does not matter. e.g. `Hans Bo` will match `Bo Hans`
-* Only the name is searched.
+* Only the name is searched
* Only full words will be matched e.g. `Han` will not match `Hans`
-* Persons matching at least one keyword will be returned (i.e. `OR` search).
+* Contacts matching at least one keyword will be returned (i.e. `OR` search)
e.g. `Hans Bo` will return `Hans Gruber`, `Bo Yang`
+* All flags after `-contacts` will be ignored e.g. `find -contacts -invalid_flag Hans` is equivalent to `find -contacts Hans`
+
+
Examples:
-* `find John` returns `john` and `John Doe`
-* `find alex david` returns `Alex Yeoh`, `David Li`
- 
+* `find -contacts John` returns `john` and `John Doe`
+* `find -contacts alex david` returns `Alex Yeoh`, `David Li`
-### Deleting a person : `delete`
+
-Deletes the specified person from the address book.
+#### Deleting a contact: `rm`
-Format: `delete INDEX`
+Deletes the specified contact from UNIon.
-* Deletes the person at the specified `INDEX`.
-* The index refers to the index number shown in the displayed person list.
+Format: `rm INDEX`
+
+* Deletes the contact at the specified `INDEX`
+* The index refers to the index number shown in the displayed contact list
* The index **must be a positive integer** 1, 2, 3, …
Examples:
-* `list` followed by `delete 2` deletes the 2nd person in the address book.
-* `find Betsy` followed by `delete 1` deletes the 1st person in the results of the `find` command.
+* `ls -contacts` followed by `rm 2` deletes the 2nd contact in UNIon
+* `find -contacts Betsy` followed by `rm 1` deletes the 1st contact in the results of the `find -contacts` command
+
+#### Clearing all contacts: `rm -contacts`
+
+Clears all contacts from UNIon.
+
+Format: `rm -contacts`
+
+
+
+### Managing folders
+
+#### Adding a folder: `mkdir`
+
+Creates a folder for contacts to be added into.
+
+Format: `mkdir FOLDER_NAME`
+
+* Creates a folder with the name `FOLDER_NAME`
+* `FOLDER_NAME` has a maximum character limit of 30
+* Duplicate folder names are not allowed
+
+Examples:
+
+* `mkdir CS2103` creates a folder with the name `CS2103`
+
+#### Adding contacts to a folder: `echo`
+
+Adds existing contacts into a folder.
+
+Format: `echo INDEX [INDEX]... >> FOLDER_NAME`
+
+* Adds the contacts at the specified indices into the given folder. The index refers to the index number shown in the displayed contact list. The index **must be a positive integer** 1, 2, 3, ...
+* `INDEX` must be a valid index referring to an existing contact in the current list of contacts shown
+* `INDEX` must not already be in the folder
+* If multiple `INDEX` are passed, they must be unique and cannot contain duplicates
+* `FOLDER_NAME` must be an existing folder
+
+Examples:
+* `echo 3 >> CS2103` Adds contact 3 to CS2103 folder
+* `echo 3 4 1 9 10 >> CS2103` Add contacts 3, 4, 1, 9, 10 to CS2103 folder
+
+
-### Clearing all entries : `clear`
+#### Deleting a contact from folder: `rm`
-Clears all entries from the address book.
+Deletes the specified contact from the list of contacts from the folder.
-Format: `clear`
+Format: `rm INDEX >> FOLDER_NAME`
-### Exiting the program : `exit`
+* Deletes contact at `INDEX` as seen on the contact list from the folder named `FOLDER_NAME`
+
+Examples:
+
+* `rm 1 >> CS1010` deletes a contact that corresponds to index 1 in the contact list from the folder `CS1010`
+
+#### Listing all folders: `ls -folders`
+
+Retrieves list of all folders created.
+
+Format: `ls -folders`
+
+#### Editing a folder name: `mv`
+
+Replaces the old folder name with the new folder name.
+
+Format: `mv OLD_FOLDER_NAME | NEW_FOLDER_NAME`
+
+* `NEW_FOLDER_NAME` has a maximum character limit of 30
+
+#### Locating folders by name: `find -folders`
+
+Finds folders whose name contains any of the given keywords.
+
+Format: `find -folders KEYWORD [MORE_KEYWORDS]`
+
+* The search is case-insensitive. e.g. `cs2103` will match `CS2103`
+* The order of the keywords does not matter. e.g. `Team Project CS2103` will match `CS2103 Team Project`
+* Partial words will be matched e.g. `CS` will match `CS2103` and `CS2101`
+* Folders matching at least one keyword will be returned (i.e. `OR` search).
+ e.g. `CS2103 Team Project` will return `CS2103`, `Team Project`
+* All flags after `-folders` will be ignored e.g. `find -folders -invalid_flag CS2103` is equivalent to `find -contacts CS2103`
+
+Examples:
+* `find -folders CS` returns `CS2103` and `CS2101`
+* `find -folders CS2103 Team Project` returns `CS2103`, `Team Project`
+
+
+
+#### Deleting a folder: `rmdir`
+
+Deletes a specified folder
+
+Format: `rmdir FOLDER_NAME`
+
+* Deletes folder with the name `FOLDER_NAME`
+
+Examples:
+
+* `rmdir CS1010` deletes a folder with the name `CS1010`
+
+#### Clearing all folders: `rm -folders`
+
+Clears all folders from UNIon.
+
+Format: `rm -folders`
+
+### Exiting the program: `exit`
Exits the program.
Format: `exit`
+--------------------------------------------------------------------------------------------------------------------
+
### Saving the data
-AddressBook data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
+UNIon data are saved in the hard disk automatically after any command that changes the data. There is no need to save manually.
### Editing the data file
-AddressBook data are saved as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file.
+UNIon data are saved as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file.
:exclamation: **Caution:**
-If your changes to the data file makes its format invalid, AddressBook will discard all data and start with an empty data file at the next run.
+If your changes to the data file makes its format invalid, UNIon will discard all data and start with an empty data file at the next run.
-### Archiving data files `[coming in v2.0]`
-
-_Details coming soon ..._
-
---------------------------------------------------------------------------------------------------------------------
-
## FAQ
**Q**: How do I transfer my data to another Computer?
-**A**: Install the app in the other computer and overwrite the empty data file it creates with the file that contains the data of your previous AddressBook home folder.
+**A**: Install the app on the other computer and overwrite the empty data file it creates with the file that contains the data of your previous UNIon home folder.
--------------------------------------------------------------------------------------------------------------------
+
+
## Command summary
Action | Format, Examples
--------|------------------
-**Add** | `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…` e.g., `add n/James Ho p/22224444 e/jamesho@example.com a/123, Clementi Rd, 1234665 t/friend t/colleague`
-**Clear** | `clear`
-**Delete** | `delete INDEX` e.g., `delete 3`
-**Edit** | `edit INDEX [n/NAME] [p/PHONE_NUMBER] [e/EMAIL] [a/ADDRESS] [t/TAG]…` e.g.,`edit 2 n/James Lee e/jameslee@example.com`
-**Find** | `find KEYWORD [MORE_KEYWORDS]` e.g., `find James Jake`
-**List** | `list`
**Help** | `help`
+**Add new contact** | `touch -n NAME -p PHONE -e EMAIL -a ADDRESS [-t TAG]` e.g., `touch -n James Ho -p 22224444 -e jamesho@example.com -a 123, Clementi Rd, 1234665 -t friend -t colleague`
+**List contacts** | `ls -contacts`
+**Edit contact** | `vim INDEX [-n NAME] [-p PHONE] [-e EMAIL] [-a ADDRESS] [-t TAG]` e.g., `vim 2 -n James Lee -e jameslee@example.com`
+**Find contact** | `find -contacts KEYWORD [MORE_KEYWORDS]` e.g., `find -contacts James Jake`
+**Delete contact** | `rm INDEX` e.g., `rm 3`
+**Clear contacts** | `rm -contacts`
+**Add new folder** | `mkdir FOLDER_NAME` e.g. `mkdir CS2103`
+**Add contact to folder** | `echo INDEX >> FOLDER_NAME` e.g., `echo 3 >> CS2103`
+**Add multiple contacts to folder** | `echo INDEX [INDEX]... >> FOLDER_NAME` e.g. `echo 3 4 1 9 10 >> CS2103`
+**Delete contact from folder** | `rm INDEX >> FOLDER_NAME` e.g., `rm 1 >> CS2102`
+**List folders** | `ls -folders`
+**Edit folder name** | `mv OLD_FOLDER_NAME | NEW_FOLDER_NAME` e.g., `mv CS2103 | CS2102`
+**Find folders** | `find -folders KEYWORD [MORE_KEYWORDS]` e.g., `find -folders CS2103`
+**Delete folder** | `rmdir FOLDER_NAME` e.g., `rmdir CS1010`
+**Clear folders** | `rm -folders`
diff --git a/docs/_config.yml b/docs/_config.yml
index 6bd245d8f4e..ebe3cf713fd 100644
--- a/docs/_config.yml
+++ b/docs/_config.yml
@@ -1,4 +1,4 @@
-title: "AB-3"
+title: "UNIon"
theme: minima
header_pages:
@@ -8,7 +8,7 @@ header_pages:
markdown: kramdown
-repository: "se-edu/addressbook-level3"
+repository: "AY2122S1-CS2103-T16-1/tp"
github_icon: "images/github-icon.png"
plugins:
diff --git a/docs/_sass/minima/_base.scss b/docs/_sass/minima/_base.scss
index 0d3f6e80ced..0c92f667458 100644
--- a/docs/_sass/minima/_base.scss
+++ b/docs/_sass/minima/_base.scss
@@ -288,7 +288,7 @@ table {
text-align: center;
}
.site-header:before {
- content: "AB-3";
+ content: "UNIon";
font-size: 32px;
}
}
diff --git a/docs/assets/css/style.scss b/docs/assets/css/style.scss
index b5ec6976efa..990fc7007de 100644
--- a/docs/assets/css/style.scss
+++ b/docs/assets/css/style.scss
@@ -10,3 +10,6 @@
height: 21px;
width: 21px
}
+
+.post-content h1, .post-content h2, .post-content h3 { margin-top: 10px; }
+.post-content h4, .post-content h5, .post-content h6 { margin-top: 10px; }
diff --git a/docs/diagrams/AddToFolderSequenceDiagram.puml b/docs/diagrams/AddToFolderSequenceDiagram.puml
new file mode 100644
index 00000000000..ddd1f517bce
--- /dev/null
+++ b/docs/diagrams/AddToFolderSequenceDiagram.puml
@@ -0,0 +1,50 @@
+@startuml
+'https://plantuml.com/sequence-diagram
+!include style.puml
+
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
+participant "f:AddToFolderCommand" as AddToFolderCommand LOGIC_COLOR
+end box
+
+box Model MODEL_COLOR_T1
+participant "m:Model" as Model MODEL_COLOR
+end box
+[-> LogicManager : execute(echo)
+activate LogicManager
+
+LogicManager -> AddressBookParser : parseCommand(echo)
+activate AddressBookParser
+
+create AddToFolderCommand
+AddressBookParser -> AddToFolderCommand
+activate AddToFolderCommand
+
+AddToFolderCommand --> AddressBookParser
+deactivate AddToFolderCommand
+
+AddressBookParser --> LogicManager : f
+deactivate AddressBookParser
+
+LogicManager -> AddToFolderCommand : execute(m)
+activate AddToFolderCommand
+
+AddToFolderCommand -> Model : addContactToFolder(f.person,f.folderName)
+activate Model
+
+Model --> AddToFolderCommand
+deactivate Model
+
+AddToFolderCommand --> LogicManager : result
+deactivate AddToFolderCommand
+
+AddToFolderCommand -[hidden]-> LogicManager : result
+destroy AddToFolderCommand
+
+[<--LogicManager
+deactivate LogicManager
+
+@enduml
diff --git a/docs/diagrams/BetterModelClassDiagram.puml b/docs/diagrams/BetterModelClassDiagram.puml
index 5731f9cbaa1..ee654c3b652 100644
--- a/docs/diagrams/BetterModelClassDiagram.puml
+++ b/docs/diagrams/BetterModelClassDiagram.puml
@@ -6,12 +6,15 @@ skinparam classBackgroundColor MODEL_COLOR
AddressBook *-right-> "1" UniquePersonList
AddressBook *-right-> "1" UniqueTagList
+AddressBook *--> "1" UniqueFolderList
UniqueTagList -[hidden]down- UniquePersonList
UniqueTagList -[hidden]down- UniquePersonList
UniqueTagList *-right-> "*" Tag
UniquePersonList -right-> Person
-
+UniqueFolderList --> "*" Folder
+Folder --> "*" Person
+Folder --> FolderName
Person -up-> "*" Tag
Person *--> Name
diff --git a/docs/diagrams/CreateFolderAlternative1.puml b/docs/diagrams/CreateFolderAlternative1.puml
new file mode 100644
index 00000000000..f617c1edb55
--- /dev/null
+++ b/docs/diagrams/CreateFolderAlternative1.puml
@@ -0,0 +1,26 @@
+@startuml
+!include style.puml
+'https://plantuml.com/class-diagram
+
+skinparam arrowThickness 1.1
+skinparam arrowColor MODEL_COLOR
+skinparam classBackgroundColor MODEL_COLOR
+
+class Folder
+class FolderName
+class Person
+class Name
+class Phone
+class Tag
+class Address
+class Email
+
+
+Folder --> "*" Person
+Folder --> FolderName
+Person --> Name
+Person --> Phone
+Person --> Address
+Person --> Email
+Person --> "*" Tag
+@enduml
diff --git a/docs/diagrams/CreateFolderAlternative2.puml b/docs/diagrams/CreateFolderAlternative2.puml
new file mode 100644
index 00000000000..f5120b80bce
--- /dev/null
+++ b/docs/diagrams/CreateFolderAlternative2.puml
@@ -0,0 +1,25 @@
+@startuml
+!include style.puml
+'https://plantuml.com/class-diagram
+
+skinparam arrowThickness 1.1
+skinparam arrowColor MODEL_COLOR
+skinparam classBackgroundColor MODEL_COLOR
+
+class Folder
+class Person
+class FolderName
+class Name
+class Phone
+class Tag
+class Address
+class Email
+
+Person --> Name
+Person --> Phone
+Person --> Address
+Person --> Email
+Person --> "*" Tag
+Person --> "*" Folder
+Folder --> FolderName
+@enduml
diff --git a/docs/diagrams/CreateFolderSequenceDiagram.puml b/docs/diagrams/CreateFolderSequenceDiagram.puml
new file mode 100644
index 00000000000..51cc8cc8f2d
--- /dev/null
+++ b/docs/diagrams/CreateFolderSequenceDiagram.puml
@@ -0,0 +1,50 @@
+@startuml
+'https://plantuml.com/sequence-diagram
+!include style.puml
+
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
+participant "f:CreateFolderCommand" as CreateFolderCommand LOGIC_COLOR
+end box
+
+box Model MODEL_COLOR_T1
+participant "m:Model" as Model MODEL_COLOR
+end box
+[-> LogicManager : execute(mkdir)
+activate LogicManager
+
+LogicManager -> AddressBookParser : parseCommand(mkdir)
+activate AddressBookParser
+
+create CreateFolderCommand
+AddressBookParser -> CreateFolderCommand
+activate CreateFolderCommand
+
+CreateFolderCommand --> AddressBookParser
+deactivate CreateFolderCommand
+
+AddressBookParser --> LogicManager : f
+deactivate AddressBookParser
+
+LogicManager -> CreateFolderCommand : execute(m)
+activate CreateFolderCommand
+
+CreateFolderCommand -> Model : addFolder(f.folderToAdd)
+activate Model
+
+Model --> CreateFolderCommand
+deactivate Model
+
+CreateFolderCommand --> LogicManager : result
+deactivate CreateFolderCommand
+
+CreateFolderCommand -[hidden]-> LogicManager : result
+destroy CreateFolderCommand
+
+[<--LogicManager
+deactivate LogicManager
+
+@enduml
diff --git a/docs/diagrams/DeleteFolderSequenceDiagram.puml b/docs/diagrams/DeleteFolderSequenceDiagram.puml
new file mode 100644
index 00000000000..d275a91c6b6
--- /dev/null
+++ b/docs/diagrams/DeleteFolderSequenceDiagram.puml
@@ -0,0 +1,69 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
+participant ":DeleteFolderCommandParser" as DeleteFolderCommandParser LOGIC_COLOR
+participant "d:DeleteFolderCommand" as DeleteFolderCommand LOGIC_COLOR
+participant ":CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("rmdir CS2103")
+activate LogicManager
+
+LogicManager -> AddressBookParser : parseCommand("rmdir CS2103")
+activate AddressBookParser
+
+create DeleteFolderCommandParser
+AddressBookParser -> DeleteFolderCommandParser
+activate DeleteFolderCommandParser
+
+DeleteFolderCommandParser --> AddressBookParser
+deactivate DeleteFolderCommandParser
+
+AddressBookParser -> DeleteFolderCommandParser : parse("CS2103")
+activate DeleteFolderCommandParser
+
+create DeleteFolderCommand
+DeleteFolderCommandParser -> DeleteFolderCommand
+activate DeleteFolderCommand
+
+DeleteFolderCommand --> DeleteFolderCommandParser : d
+deactivate DeleteFolderCommand
+
+DeleteFolderCommandParser --> AddressBookParser : d
+deactivate DeleteFolderCommandParser
+'Hidden arrow to position the destroy marker below the end of the activation bar.
+DeleteFolderCommandParser -[hidden]-> AddressBookParser
+destroy DeleteFolderCommandParser
+
+AddressBookParser --> LogicManager : d
+deactivate AddressBookParser
+
+LogicManager -> DeleteFolderCommand : execute()
+activate DeleteFolderCommand
+
+DeleteFolderCommand -> Model : deleteFolder(folderToRemove)
+activate Model
+
+Model --> DeleteFolderCommand
+deactivate Model
+
+create CommandResult
+DeleteFolderCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> DeleteFolderCommand
+deactivate CommandResult
+
+DeleteFolderCommand --> LogicManager : result
+deactivate DeleteFolderCommand
+
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/EditFolderNameSequenceDiagram.puml b/docs/diagrams/EditFolderNameSequenceDiagram.puml
new file mode 100644
index 00000000000..2577a2867cd
--- /dev/null
+++ b/docs/diagrams/EditFolderNameSequenceDiagram.puml
@@ -0,0 +1,69 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
+participant ":EditFolderNameCommandParser" as EditFolderNameCommandParser LOGIC_COLOR
+participant "d:EditFolderNameCommand" as EditFolderNameCommand LOGIC_COLOR
+participant ":CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("mv CS2103 | CS2100")
+activate LogicManager
+
+LogicManager -> AddressBookParser : parseCommand("mv CS2103 | CS2100")
+activate AddressBookParser
+
+create EditFolderNameCommandParser
+AddressBookParser -> EditFolderNameCommandParser
+activate EditFolderNameCommandParser
+
+EditFolderNameCommandParser --> AddressBookParser
+deactivate EditFolderNameCommandParser
+
+AddressBookParser -> EditFolderNameCommandParser : parse("CS2103 | CS2100")
+activate EditFolderNameCommandParser
+
+create EditFolderNameCommand
+EditFolderNameCommandParser -> EditFolderNameCommand
+activate EditFolderNameCommand
+
+EditFolderNameCommand --> EditFolderNameCommandParser : d
+deactivate EditFolderNameCommand
+
+EditFolderNameCommandParser --> AddressBookParser : d
+deactivate EditFolderNameCommandParser
+'Hidden arrow to position the destroy marker below the end of the activation bar.
+EditFolderNameCommandParser -[hidden]-> AddressBookParser
+destroy EditFolderNameCommandParser
+
+AddressBookParser --> LogicManager : d
+deactivate AddressBookParser
+
+LogicManager -> EditFolderNameCommand : execute()
+activate EditFolderNameCommand
+
+EditFolderNameCommand -> Model : setNewFolder(oldFolder, newFolder)
+activate Model
+
+Model --> EditFolderNameCommand
+deactivate Model
+
+create CommandResult
+EditFolderNameCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> EditFolderNameCommand
+deactivate CommandResult
+
+EditFolderNameCommand --> LogicManager : result
+deactivate EditFolderNameCommand
+
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/FindFoldersSequenceDiagram.puml b/docs/diagrams/FindFoldersSequenceDiagram.puml
new file mode 100644
index 00000000000..4a8926e4f73
--- /dev/null
+++ b/docs/diagrams/FindFoldersSequenceDiagram.puml
@@ -0,0 +1,69 @@
+@startuml
+!include style.puml
+
+box Logic LOGIC_COLOR_T1
+participant ":LogicManager" as LogicManager LOGIC_COLOR
+participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
+participant ":FindFoldersCommandParser" as FindFoldersCommandParser LOGIC_COLOR
+participant "f:FindFoldersCommand" as FindFoldersCommand LOGIC_COLOR
+participant ":CommandResult" as CommandResult LOGIC_COLOR
+end box
+
+box Model MODEL_COLOR_T1
+participant ":Model" as Model MODEL_COLOR
+end box
+
+[-> LogicManager : execute("find -folders CS")
+activate LogicManager
+
+LogicManager -> AddressBookParser : parseCommand("find -folders CS")
+activate AddressBookParser
+
+create FindFoldersCommandParser
+AddressBookParser -> FindFoldersCommandParser
+activate FindFoldersCommandParser
+
+FindFoldersCommandParser --> AddressBookParser
+deactivate FindFoldersCommandParser
+
+AddressBookParser -> FindFoldersCommandParser : parse("CS")
+activate FindFoldersCommandParser
+
+create FindFoldersCommand
+FindFoldersCommandParser -> FindFoldersCommand
+activate FindFoldersCommand
+
+FindFoldersCommand --> FindFoldersCommandParser : f
+deactivate FindFoldersCommand
+
+FindFoldersCommandParser --> AddressBookParser : f
+deactivate FindFoldersCommandParser
+'Hidden arrow to position the destroy marker below the end of the activation bar.
+FindFoldersCommandParser -[hidden]-> AddressBookParser
+destroy FindFoldersCommandParser
+
+AddressBookParser --> LogicManager : f
+deactivate AddressBookParser
+
+LogicManager -> FindFoldersCommand : execute()
+activate FindFoldersCommand
+
+FindFoldersCommand -> Model : updateFilteredFolderList(predicate)
+activate Model
+
+Model --> FindFoldersCommand
+deactivate Model
+
+create CommandResult
+FindFoldersCommand -> CommandResult
+activate CommandResult
+
+CommandResult --> FindFoldersCommand
+deactivate CommandResult
+
+FindFoldersCommand --> LogicManager : result
+deactivate FindFoldersCommand
+
+[<--LogicManager
+deactivate LogicManager
+@enduml
diff --git a/docs/diagrams/ModelClassDiagram.puml b/docs/diagrams/ModelClassDiagram.puml
index 1122257bd9a..7a9b4a816ed 100644
--- a/docs/diagrams/ModelClassDiagram.puml
+++ b/docs/diagrams/ModelClassDiagram.puml
@@ -15,8 +15,10 @@ Class ModelManager
Class UserPrefs
Class ReadOnlyUserPrefs
-
+Class UniqueFolderList
Class UniquePersonList
+Class Folder
+Class FolderName
Class Person
Class Address
Class Email
@@ -38,8 +40,12 @@ ModelManager -left-> "1" AddressBook
ModelManager -right-> "1" UserPrefs
UserPrefs .up.|> ReadOnlyUserPrefs
+AddressBook *--> "1" UniqueFolderList
AddressBook *--> "1" UniquePersonList
UniquePersonList --> "~* all" Person
+UniqueFolderList --> "~* all" Folder
+Folder --> FolderName
+Folder -right-> "*" Person
Person *--> Name
Person *--> Phone
Person *--> Email
@@ -51,4 +57,5 @@ Phone -[hidden]right-> Address
Address -[hidden]right-> Email
ModelManager -->"~* filtered" Person
+ModelManager -->"~* filtered" Folder
@enduml
diff --git a/docs/diagrams/StorageClassDiagram.puml b/docs/diagrams/StorageClassDiagram.puml
index 85ac3ea2dee..4a99f9f8073 100644
--- a/docs/diagrams/StorageClassDiagram.puml
+++ b/docs/diagrams/StorageClassDiagram.puml
@@ -20,6 +20,7 @@ Class JsonAddressBookStorage
Class JsonSerializableAddressBook
Class JsonAdaptedPerson
Class JsonAdaptedTag
+Class JsonAdaptedFolder
}
}
@@ -38,6 +39,8 @@ JsonUserPrefsStorage .up.|> UserPrefsStorage
JsonAddressBookStorage .up.|> AddressBookStorage
JsonAddressBookStorage ..> JsonSerializableAddressBook
JsonSerializableAddressBook --> "*" JsonAdaptedPerson
+JsonSerializableAddressBook --> "*" JsonAdaptedFolder
+JsonAdaptedFolder -right-> "*" JsonAdaptedPerson
JsonAdaptedPerson --> "*" JsonAdaptedTag
@enduml
diff --git a/docs/diagrams/UiClassDiagram.puml b/docs/diagrams/UiClassDiagram.puml
index ecae4876432..91a86c163d6 100644
--- a/docs/diagrams/UiClassDiagram.puml
+++ b/docs/diagrams/UiClassDiagram.puml
@@ -11,8 +11,10 @@ Class UiManager
Class MainWindow
Class HelpWindow
Class ResultDisplay
+Class FolderListPanel
Class PersonListPanel
Class PersonCard
+Class FolderCard
Class StatusBarFooter
Class CommandBox
}
@@ -33,21 +35,26 @@ UiManager -down-> "1" MainWindow
MainWindow *-down-> "1" CommandBox
MainWindow *-down-> "1" ResultDisplay
MainWindow *-down-> "1" PersonListPanel
+MainWindow *-down-> "1" FolderListPanel
MainWindow *-down-> "1" StatusBarFooter
MainWindow --> "0..1" HelpWindow
PersonListPanel -down-> "*" PersonCard
+FolderListPanel -down-> "*" FolderCard
MainWindow -left-|> UiPart
ResultDisplay --|> UiPart
CommandBox --|> UiPart
PersonListPanel --|> UiPart
+FolderListPanel --|> UiPart
PersonCard --|> UiPart
+FolderCard --|> UiPart
StatusBarFooter --|> UiPart
HelpWindow --|> UiPart
PersonCard ..> Model
+FolderCard ..> Model
UiManager -right-> Logic
MainWindow -left-> Logic
diff --git a/docs/diagrams/UndoRedoState0.puml b/docs/diagrams/UndoRedoState0.puml
deleted file mode 100644
index 96e30744d24..00000000000
--- a/docs/diagrams/UndoRedoState0.puml
+++ /dev/null
@@ -1,20 +0,0 @@
-@startuml
-!include style.puml
-skinparam ClassFontColor #000000
-skinparam ClassBorderColor #000000
-
-title Initial state
-
-package States {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
-}
-State1 -[hidden]right-> State2
-State2 -[hidden]right-> State3
-hide State2
-hide State3
-
-class Pointer as "Current State" #FFFFF
-Pointer -up-> State1
-@end
diff --git a/docs/diagrams/UndoRedoState1.puml b/docs/diagrams/UndoRedoState1.puml
deleted file mode 100644
index 01fcb9b2b96..00000000000
--- a/docs/diagrams/UndoRedoState1.puml
+++ /dev/null
@@ -1,22 +0,0 @@
-@startuml
-!include style.puml
-skinparam ClassFontColor #000000
-skinparam ClassBorderColor #000000
-
-title After command "delete 5"
-
-package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
-}
-
-State1 -[hidden]right-> State2
-State2 -[hidden]right-> State3
-
-hide State3
-
-class Pointer as "Current State" #FFFFF
-
-Pointer -up-> State2
-@end
diff --git a/docs/diagrams/UndoRedoState2.puml b/docs/diagrams/UndoRedoState2.puml
deleted file mode 100644
index bccc230a5d1..00000000000
--- a/docs/diagrams/UndoRedoState2.puml
+++ /dev/null
@@ -1,20 +0,0 @@
-@startuml
-!include style.puml
-skinparam ClassFontColor #000000
-skinparam ClassBorderColor #000000
-
-title After command "add n/David"
-
-package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
-}
-
-State1 -[hidden]right-> State2
-State2 -[hidden]right-> State3
-
-class Pointer as "Current State" #FFFFF
-
-Pointer -up-> State3
-@end
diff --git a/docs/diagrams/UndoRedoState3.puml b/docs/diagrams/UndoRedoState3.puml
deleted file mode 100644
index ea29c9483e4..00000000000
--- a/docs/diagrams/UndoRedoState3.puml
+++ /dev/null
@@ -1,20 +0,0 @@
-@startuml
-!include style.puml
-skinparam ClassFontColor #000000
-skinparam ClassBorderColor #000000
-
-title After command "undo"
-
-package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
-}
-
-State1 -[hidden]right-> State2
-State2 -[hidden]right-> State3
-
-class Pointer as "Current State" #FFFFF
-
-Pointer -up-> State2
-@end
diff --git a/docs/diagrams/UndoRedoState4.puml b/docs/diagrams/UndoRedoState4.puml
deleted file mode 100644
index 1b784cece80..00000000000
--- a/docs/diagrams/UndoRedoState4.puml
+++ /dev/null
@@ -1,20 +0,0 @@
-@startuml
-!include style.puml
-skinparam ClassFontColor #000000
-skinparam ClassBorderColor #000000
-
-title After command "list"
-
-package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab2:AddressBook__"
-}
-
-State1 -[hidden]right-> State2
-State2 -[hidden]right-> State3
-
-class Pointer as "Current State" #FFFFF
-
-Pointer -up-> State2
-@end
diff --git a/docs/diagrams/UndoRedoState5.puml b/docs/diagrams/UndoRedoState5.puml
deleted file mode 100644
index 88927be32bc..00000000000
--- a/docs/diagrams/UndoRedoState5.puml
+++ /dev/null
@@ -1,21 +0,0 @@
-@startuml
-!include style.puml
-skinparam ClassFontColor #000000
-skinparam ClassBorderColor #000000
-
-title After command "clear"
-
-package States <> {
- class State1 as "__ab0:AddressBook__"
- class State2 as "__ab1:AddressBook__"
- class State3 as "__ab3:AddressBook__"
-}
-
-State1 -[hidden]right-> State2
-State2 -[hidden]right-> State3
-
-class Pointer as "Current State" #FFFFF
-
-Pointer -up-> State3
-note right on link: State ab2 deleted.
-@end
diff --git a/docs/diagrams/UndoSequenceDiagram.puml b/docs/diagrams/UndoSequenceDiagram.puml
deleted file mode 100644
index 410aab4e412..00000000000
--- a/docs/diagrams/UndoSequenceDiagram.puml
+++ /dev/null
@@ -1,53 +0,0 @@
-@startuml
-!include style.puml
-
-box Logic LOGIC_COLOR_T1
-participant ":LogicManager" as LogicManager LOGIC_COLOR
-participant ":AddressBookParser" as AddressBookParser LOGIC_COLOR
-participant "u:UndoCommand" as UndoCommand LOGIC_COLOR
-end box
-
-box Model MODEL_COLOR_T1
-participant ":Model" as Model MODEL_COLOR
-participant ":VersionedAddressBook" as VersionedAddressBook MODEL_COLOR
-end box
-[-> LogicManager : execute(undo)
-activate LogicManager
-
-LogicManager -> AddressBookParser : parseCommand(undo)
-activate AddressBookParser
-
-create UndoCommand
-AddressBookParser -> UndoCommand
-activate UndoCommand
-
-UndoCommand --> AddressBookParser
-deactivate UndoCommand
-
-AddressBookParser --> LogicManager : u
-deactivate AddressBookParser
-
-LogicManager -> UndoCommand : execute()
-activate UndoCommand
-
-UndoCommand -> Model : undoAddressBook()
-activate Model
-
-Model -> VersionedAddressBook : undo()
-activate VersionedAddressBook
-
-VersionedAddressBook -> VersionedAddressBook :resetData(ReadOnlyAddressBook)
-VersionedAddressBook --> Model :
-deactivate VersionedAddressBook
-
-Model --> UndoCommand
-deactivate Model
-
-UndoCommand --> LogicManager : result
-deactivate UndoCommand
-UndoCommand -[hidden]-> LogicManager : result
-destroy UndoCommand
-
-[<--LogicManager
-deactivate LogicManager
-@enduml
diff --git a/docs/images/BetterModelClassDiagram.png b/docs/images/BetterModelClassDiagram.png
index 1ec62caa2a5..f7fab08a320 100644
Binary files a/docs/images/BetterModelClassDiagram.png and b/docs/images/BetterModelClassDiagram.png differ
diff --git a/docs/images/CreateFolderAlternative1.png b/docs/images/CreateFolderAlternative1.png
new file mode 100644
index 00000000000..12bc7a7275b
Binary files /dev/null and b/docs/images/CreateFolderAlternative1.png differ
diff --git a/docs/images/CreateFolderAlternative2.png b/docs/images/CreateFolderAlternative2.png
new file mode 100644
index 00000000000..ad65833adf2
Binary files /dev/null and b/docs/images/CreateFolderAlternative2.png differ
diff --git a/docs/images/CreateFolderSequenceDiagram.png b/docs/images/CreateFolderSequenceDiagram.png
new file mode 100644
index 00000000000..a8a1fe38ede
Binary files /dev/null and b/docs/images/CreateFolderSequenceDiagram.png differ
diff --git a/docs/images/EditFolderNameSequenceDiagram.png b/docs/images/EditFolderNameSequenceDiagram.png
new file mode 100644
index 00000000000..0409e59cb7b
Binary files /dev/null and b/docs/images/EditFolderNameSequenceDiagram.png differ
diff --git a/docs/images/FindFoldersSequenceDiagram.png b/docs/images/FindFoldersSequenceDiagram.png
new file mode 100644
index 00000000000..1c98902fb62
Binary files /dev/null and b/docs/images/FindFoldersSequenceDiagram.png differ
diff --git a/docs/images/ModelClassDiagram.png b/docs/images/ModelClassDiagram.png
index 39d7aec4b33..cbd73b7937a 100644
Binary files a/docs/images/ModelClassDiagram.png and b/docs/images/ModelClassDiagram.png differ
diff --git a/docs/images/StorageClassDiagram.png b/docs/images/StorageClassDiagram.png
index 82c66f8f16e..9eb9d3f57e8 100644
Binary files a/docs/images/StorageClassDiagram.png and b/docs/images/StorageClassDiagram.png differ
diff --git a/docs/images/Ui.png b/docs/images/Ui.png
index 91488fd1a0f..cacdc9ad51a 100644
Binary files a/docs/images/Ui.png and b/docs/images/Ui.png differ
diff --git a/docs/images/UiClassDiagram.png b/docs/images/UiClassDiagram.png
index 4bb8b2ce591..41b1e682a9e 100644
Binary files a/docs/images/UiClassDiagram.png and b/docs/images/UiClassDiagram.png differ
diff --git a/docs/images/UndoRedoState0.png b/docs/images/UndoRedoState0.png
deleted file mode 100644
index 8f7538cd884..00000000000
Binary files a/docs/images/UndoRedoState0.png and /dev/null differ
diff --git a/docs/images/UndoRedoState1.png b/docs/images/UndoRedoState1.png
deleted file mode 100644
index df9908d0948..00000000000
Binary files a/docs/images/UndoRedoState1.png and /dev/null differ
diff --git a/docs/images/UndoRedoState2.png b/docs/images/UndoRedoState2.png
deleted file mode 100644
index 36519c1015b..00000000000
Binary files a/docs/images/UndoRedoState2.png and /dev/null differ
diff --git a/docs/images/UndoRedoState3.png b/docs/images/UndoRedoState3.png
deleted file mode 100644
index 19959d01712..00000000000
Binary files a/docs/images/UndoRedoState3.png and /dev/null differ
diff --git a/docs/images/UndoRedoState4.png b/docs/images/UndoRedoState4.png
deleted file mode 100644
index 4c623e4f2c5..00000000000
Binary files a/docs/images/UndoRedoState4.png and /dev/null differ
diff --git a/docs/images/UndoRedoState5.png b/docs/images/UndoRedoState5.png
deleted file mode 100644
index 84ad2afa6bd..00000000000
Binary files a/docs/images/UndoRedoState5.png and /dev/null differ
diff --git a/docs/images/UndoSequenceDiagram.png b/docs/images/UndoSequenceDiagram.png
deleted file mode 100644
index 6addcd3a8d9..00000000000
Binary files a/docs/images/UndoSequenceDiagram.png and /dev/null differ
diff --git a/docs/images/findAlexDavidResult.png b/docs/images/findAlexDavidResult.png
index 235da1c273e..89cd5267272 100644
Binary files a/docs/images/findAlexDavidResult.png and b/docs/images/findAlexDavidResult.png differ
diff --git a/docs/images/github.png b/docs/images/github.png
new file mode 100644
index 00000000000..fcd55a90de2
Binary files /dev/null and b/docs/images/github.png differ
diff --git a/docs/images/helpMessage.png b/docs/images/helpMessage.png
index b1f70470137..7fe5619e270 100644
Binary files a/docs/images/helpMessage.png and b/docs/images/helpMessage.png differ
diff --git a/docs/images/itsyme.png b/docs/images/itsyme.png
new file mode 100644
index 00000000000..ffe707cb6c4
Binary files /dev/null and b/docs/images/itsyme.png differ
diff --git a/docs/images/jiarong15.png b/docs/images/jiarong15.png
new file mode 100644
index 00000000000..6d93b18e6e5
Binary files /dev/null and b/docs/images/jiarong15.png differ
diff --git a/docs/images/linkedin.png b/docs/images/linkedin.png
new file mode 100644
index 00000000000..ceb5c8d01fa
Binary files /dev/null and b/docs/images/linkedin.png differ
diff --git a/docs/images/portfolio.png b/docs/images/portfolio.png
new file mode 100644
index 00000000000..f262860fd05
Binary files /dev/null and b/docs/images/portfolio.png differ
diff --git a/docs/images/rehmmann.png b/docs/images/rehmmann.png
new file mode 100644
index 00000000000..af025afde2f
Binary files /dev/null and b/docs/images/rehmmann.png differ
diff --git a/docs/images/sebbycake.png b/docs/images/sebbycake.png
new file mode 100644
index 00000000000..6df9d988fd1
Binary files /dev/null and b/docs/images/sebbycake.png differ
diff --git a/docs/images/startupUi.png b/docs/images/startupUi.png
new file mode 100644
index 00000000000..2dd07c00d86
Binary files /dev/null and b/docs/images/startupUi.png differ
diff --git a/docs/images/xlzior.png b/docs/images/xlzior.png
new file mode 100644
index 00000000000..693db1a6060
Binary files /dev/null and b/docs/images/xlzior.png differ
diff --git a/docs/index.md b/docs/index.md
index 7601dbaad0d..e5d99cbdbb0 100644
--- a/docs/index.md
+++ b/docs/index.md
@@ -1,19 +1,22 @@
---
layout: page
-title: AddressBook Level-3
+title: UNIon - Manage your wide range of college contacts easily
---
-[](https://github.com/se-edu/addressbook-level3/actions)
-[](https://codecov.io/gh/se-edu/addressbook-level3)
+[](https://github.com/AY2122S1-CS2103-T16-1/tp/actions)
+[](https://codecov.io/gh/AY2122S1-CS2103-T16-1/tp)

-**AddressBook is a desktop application for managing your contact details.** While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface).
-
-* If you are interested in using AddressBook, head over to the [_Quick Start_ section of the **User Guide**](UserGuide.html#quick-start).
-* If you are interested about developing AddressBook, the [**Developer Guide**](DeveloperGuide.html) is a good place to start.
+**UNIon is a desktop app for organizing various types of contacts in college**, optimized for use for the vast majority of computing students.
+While it has a GUI, most of the user interactions happen using a CLI (Command Line Interface) based on **Unix**.
+* If you are interested in using UNIon, head over to the [_Quick Start_ section of the **User
+ Guide**](UserGuide.html#quick-start).
+* If you are interested about developing UNIon, the [**Developer Guide**](DeveloperGuide.html) is a good place to
+ start.
**Acknowledgements**
-* Libraries used: [JavaFX](https://openjfx.io/), [Jackson](https://github.com/FasterXML/jackson), [JUnit5](https://github.com/junit-team/junit5)
+* Libraries used: [JavaFX](https://openjfx.io/), [Jackson](https://github.com/FasterXML/jackson)
+ , [JUnit5](https://github.com/junit-team/junit5)
diff --git a/docs/team/itsyme.md b/docs/team/itsyme.md
new file mode 100644
index 00000000000..e4acb26d6b3
--- /dev/null
+++ b/docs/team/itsyme.md
@@ -0,0 +1,38 @@
+---
+layout: page
+title: David's Project Portfolio Page
+---
+
+### Project: UNIon
+
+UNIon is a desktop app for organizing various types of contacts, optimized for use for the vast majority of computing students. If you are already familiar with Unix commands, then UNIon will be easy for you to use.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Implement folders and command to create folders to UNIon [\#46](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/46)
+ * What it does: Allows the user to organise contacts by adding them to folders.
+ * Justification: This feature allows users to see a summary of all their social groups and which of their contacts are in which folders.
+ * Highlights: Besides the command to add folders, all the other classes required for folders to work were implemented here. This enhancement affects commands to be added in the future. It required an analysis of current models in order to implement a folder class that fits with the other components. The implementation was challenging due to the sheer number of classes that had to be implemented.
+
+* **New Feature**: Saving of folders to JSON file [\#82](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/82)
+ * What it does: Allows UNIon to save folders to a local JSON file.
+ * Justification: As UNIon allows users to create folders, folders must be saved to allow users to close UNIon and come back to the same state as they left it in.
+ * Highlights: This enhancement required an analysis of the `Storage` component. Implementing this feature was challenging as it required learning about JSON files and how to read and write them.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2122s1.github.io/tp-dashboard/?search=itsyme)
+
+* **Project management**:
+ * Created the name for UNIon
+ * In charge of documentation for UNIon
+
+* **Documentation**:
+ * User Guide:
+ * Added documentation for the features `create folder` [\#15](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/15).
+ * Tweaked documentation to fix documentation bugs from PE-D [\#188](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/188).
+ * Developer Guide:
+ * Added implementation details of the `create folder` feature [\#83](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/83).
+ * Added Appendix: Effort and two use cases [\#202](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/202)
+
+* **Community**:
+ * Contributed to module forum discussions (examples: [1](https://github.com/nus-cs2103-AY2122S1/forum/issues/118#issuecomment-907715971))
+ * Reported bugs and suggestions for other teams in the class ([examples](https://github.com/itsyme/ped/issues))
diff --git a/docs/team/jiarong15.md b/docs/team/jiarong15.md
new file mode 100644
index 00000000000..92deda792ca
--- /dev/null
+++ b/docs/team/jiarong15.md
@@ -0,0 +1,43 @@
+---
+layout: page
+title: Jia Rong's Project Portfolio Page
+---
+
+### Project: UNIon
+
+UNIon is a desktop app for organizing various types of contacts, optimized for use for the vast majority of computing students. If you are already familiar with Unix commands, then UNIon will be easy for you to use.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Added the ability to remove unwanted folders command. [\#51](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/51)
+ * What it does: Allows users to remove folders that they no longer need one at a time.
+ * Justification: This feature improves the product significantly as we do not want unwanted folders to remain in the app, causing wastage of storage space and searching of folders.
+ * Highlights: This enhancement affects commands to be added in the future. We required it to reflect the unix command of removing directory, in this case, folders.
+
+* **New Feature**: Added the ability to change folder names to a new one. [\#67](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/67)
+ * What it does: Allows users to rename outdated folder names.
+ * Justification: This feature will prevent users having to delete the folder and add the entire list of contacts again when they wish to change folder's name. In the process, they may forget the contacts in the folder when there are large amount of contacts in the folder.
+
+* **New Feature**: Added the availability to remove specified contacts from specified folder. [\#98](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/98)
+ * What it does: Allows users to remove contacts no longer belonging to the folder.
+ * Justification: This feature improves the product significantly as the inability to do so compels user to go through the whole process of deleting folder and adding everyone except that one guy that should be left out.
+ * Highlights: This enhancement is affected by filtering of folders and contacts as well.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2122s1.github.io/tp-dashboard/?search=jiarong15)
+
+* **Enhancements to existing features**:
+ * Ensured consistency of only able to make changes to filtered list and contacts [\#186](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/186)
+
+* **Documentation**:
+ * User Guide:
+ * Added documentation for the feature `rmdir` [\#42](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/42)
+ * Added documentation for the feature `mv` [\#68](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/68)
+ * Added documentation for the feature of removing contact from folder `rm` [\#68](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/110)
+ * Developer Guide:
+ * Added use case details of all the commands we are implementing [\#32](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/32).
+ * Added UML diagram and implementation details of `mv` feature [\#96](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/96).
+
+* **Community**:
+ * Contributed to forum discussions (examples: [1](https://github.com/nus-cs2103-AY2122S1/forum/issues/8), [2](https://github.com/nus-cs2103-AY2122S1/forum/issues/47), [3](https://github.com/nus-cs2103-AY2122S1/forum/issues/122), [4](https://github.com/nus-cs2103-AY2122S1/forum/issues/173))
+ * Reported bugs and suggestions for other teams in the class ([examples](https://github.com/jiarong15/ped/issues))
+
diff --git a/docs/team/rehmmann.md b/docs/team/rehmmann.md
new file mode 100644
index 00000000000..ce59473a6e8
--- /dev/null
+++ b/docs/team/rehmmann.md
@@ -0,0 +1,36 @@
+---
+layout: page
+title: Rehman Sajid's Project Portfolio Page
+---
+
+### Project: UNIon
+
+UNIon is a desktop app for organizing various types of contacts, optimized for use for the vast majority of computing students. If you are already familiar with Unix commands, then UNIon will be easy for you to use.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Adding contact to a folder [\#49](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/49)
+ * What it does: Allows the user to add contacts to folder.
+ * Justification: To be able to organize all your contacts, it will be essential to be able to group them together. (E.g. User might want to group his classmates from tutorial classes or maybe his CCA friends)
+ * Highlights: This enhancement affects existing commands and commands to be added in the future. It required an in-depth analysis of design alternatives.This non-trivial feature required creation and modification of several files across the code base which gave me a good understanding of how the different components function.
+
+* **New Feature**: Adding multiple contacts to a folder [\#95](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/95)
+ * What it does: Allows the user to add multiple contacts into a folder in one command
+ * Justification: UNIon allows users to add contacts to a folder one at a time however if a particular folder has many contacts it will be tiring for a user to add all of them in one by one.
+ * Highlights: This command required changing some classes written in my first feature and required some careful planning on how it will handle certain user inputs. It was also a feature that required rigorous testing and debugging as there were plenty of edge cases.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2122s1.github.io/tp-dashboard/?search=rehmmann)
+
+* **Project management**:
+ * Creating an initial mock up for our product
+ * In charge of ensuring smooth integration of all developers code
+
+* **Documentation**:
+ * User Guide:
+ * Added documentation for adding contact to folder feature [\#16](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/16).
+ * Developer Guide:
+ * Added implementation details of the `echo` command, and a sequence diagram [\#92](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/92).
+
+* **Community**:
+ * Contributed to module forum discussions (examples: [1](https://github.com/nus-cs2103-AY2122S1/forum/issues/55))
+ * Reported bugs and suggestions for other teams in the class ([examples](https://github.com/rehmmann/ped/issues))
diff --git a/docs/team/sebbycake.md b/docs/team/sebbycake.md
new file mode 100644
index 00000000000..c58c36590f0
--- /dev/null
+++ b/docs/team/sebbycake.md
@@ -0,0 +1,47 @@
+---
+layout: page
+title: Sebastian's Project Portfolio Page
+---
+
+### Project: UNIon
+
+UNIon is a desktop app for organizing various types of contacts, optimized for use for the vast majority of computing students.
+If you are already familiar with Unix commands, then UNIon will be easy for you to use.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Display folder list [#48](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/48)
+ * What it does: Allows users to view list of folders create. Data shown: Folder name and list of contact names
+ * Justification: By having a component to view the folders that contain the name and the list of contacts, it allows the user to visualize, organize and manage efficiently and effectively with the massive number of contacts they collected while in college.
+ * Highlights: This has data dependency with the persons' data. If any of the person data is modified, we need to be able to update in the folder list as well. In particular, we need to update the person in the folder that contains the updated person data.
+
+* **New Feature**: Implement command to clear all folders [#108](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/108)
+ * What it does: Allows users to clear all folders
+ * Justification: With the marching of time, some folders, if not all, become obsolete. This feature comes in handy when they want to remove all folders at one go. This helps to improve user experience as they do not have to delete one by one, especially if he/she has created a significant number of it.
+ * Highlights: This command is similar to that of clearing all persons. However, there is one key difference. When clearing the folders, we need to ensure that the list of person/contacts still remain.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2122s1.github.io/tp-dashboard/?search=sebbycake)
+
+* **Project management**:
+ * Conducted team meetings and drove discussions on Zoom
+ * Prepared weekly meeting notes and wrote minutes
+ * Reviewed other team member's PRs and gave constructive feedback where necessary
+ * Managed day-to-day activities and addressed key issues or challenges brought up by the members
+
+* **Critical bugs fixes**:
+ * Contacts' data inconsistency between folder list and contact list due to change(s) to contacts [#107](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/107)
+ * Inability to remove folders with contacts populated [#62](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/62)
+
+* **Contributions to team-based tasks**:
+ * Setting up [GitHub team org/repo](https://github.com/AY2122S1-CS2103-T16-1/tp) and [Codecov](https://app.codecov.io/gh/AY2122S1-CS2103-T16-1/tp)
+ * Changed product icon
+ * Documenting project details like description, target audience and value proposition
+
+* **Documentation**:
+ * User Guide:
+ * Added documentation for the feature to view all folders [#29](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/29) and `rm -folders` [#108](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/108)
+ * Developer Guide:
+ * Added implementation details of the `ls -folders` feature [#85](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/85).
+
+* **Community**:
+ * Reported bugs and suggestions for other teams in the class ([examples](https://github.com/sebbycake/ped/issues))
diff --git a/docs/team/xlzior.md b/docs/team/xlzior.md
new file mode 100644
index 00000000000..475905ba57a
--- /dev/null
+++ b/docs/team/xlzior.md
@@ -0,0 +1,37 @@
+---
+layout: page
+title: Wen Jun's Project Portfolio Page
+---
+
+### Project: UNIon
+
+UNIon is a desktop app for organizing various types of contacts, optimized for use for the vast majority of computing students. If you are already familiar with Unix commands, then UNIon will be easy for you to use.
+
+Given below are my contributions to the project.
+
+* **New Feature**: Convert old command format to Unix commands [\#44](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/44)
+ * What it does: Allows the user to use a familiar set of Unix commands in UNIon. This includes changing the command words (e.g. from `list` to `ls -contacts`, as well as replacing the old prefixes `n/` with flags like `-n`.
+ * Justification: This feature allows UNIon to be relatively easy to pick up and remember for computing students who already have some knowledge of Unix commands.
+ * Highlights: This enhancement affects existing commands and commands to be added in the future. Since this affected a core part of the original AB3, many files needed to be changed while monitoring for possible regressions. One change required was that command words could now comprise multiple words, which the original AB3 did not allow. The other change was that the AB3 prefixes did not need to end with a space e.g. `n/John Doe`, but our flags would need an extra space at the end such as `-n John Doe`. Hence, the implementation was non-trivial and was not simply a matter of replacing command words.
+
+* **New Feature**: Implement command to search for folders [\#77](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/77)
+ * What it does: Allows the user to search for folders by keyword
+ * Justification: As UNIon allows users to create folders, users may want to search for folders to narrow down the list of folders they can see.
+ * Highlights: This enhancement is similar to the original `find` command for persons. However, the command to find persons only matches full words while the command to find folders allows partial words to match e.g. the keyword `CS` matches `CS2103`. Furthermore, by adding the `-folders` tag to the command, some validation checks needed to be updated in order to ignore the flags from the search terms.
+
+* **Code contributed**: [RepoSense link](https://nus-cs2103-ay2122s1.github.io/tp-dashboard/?search=xlzior)
+
+* **Project management**:
+ * Managed project deliverables to ensure module deadlines are met
+ * In charge of reviewing other team member's PRs (together with one other team member)
+
+* **Documentation**:
+ * User Guide:
+ * Added documentation for the features `Unix commands` [\#41](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/41) and `find -folders` [\#55](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/55)
+ * Developer Guide:
+ * Added implementation details of the `find -folders` feature [\#84](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/84).
+
+* **Community**:
+ * PRs reviewed (with non-trivial review comments): [\#46](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/46), [\#57](https://github.com/AY2122S1-CS2103-T16-1/tp/pull/57)
+ * Contributed to module forum discussions (examples: [1](https://github.com/nus-cs2103-AY2122S1/forum/issues/4#issuecomment-898862824), [2](https://github.com/nus-cs2103-AY2122S1/forum/issues/102#issuecomment-905653729), [3](https://github.com/nus-cs2103-AY2122S1/forum/issues/142#issuecomment-908973467), [4](https://github.com/nus-cs2103-AY2122S1/forum/issues/241#issuecomment-920977286), [5](https://github.com/nus-cs2103-AY2122S1/forum/issues/277#issuecomment-928639397), [6](https://github.com/nus-cs2103-AY2122S1/forum/issues/286#issuecomment-934306682))
+ * Reported bugs and suggestions for other teams in the class ([examples](https://github.com/xlzior/ped/issues))
diff --git a/docs/tutorials/AddRemark.md b/docs/tutorials/AddRemark.md
index 8919d8eaa17..48e9915cade 100644
--- a/docs/tutorials/AddRemark.md
+++ b/docs/tutorials/AddRemark.md
@@ -340,7 +340,7 @@ save it with `Model#setPerson()`.
List lastShownList = model.getFilteredPersonList();
if (index.getZeroBased() >= lastShownList.size()) {
- throw new CommandException(Messages.MESSAGE_INVALID_PERSON_DISPLAYED_INDEX);
+ throw new CommandException(Messages.MESSAGE_INVALID_INDEX_EXCEEDS_LIST_SIZE);
}
Person personToEdit = lastShownList.get(index.getZeroBased());
diff --git a/src/main/java/seedu/address/MainApp.java b/src/main/java/seedu/address/MainApp.java
index 4133aaa0151..0346495cc2c 100644
--- a/src/main/java/seedu/address/MainApp.java
+++ b/src/main/java/seedu/address/MainApp.java
@@ -48,7 +48,7 @@ public class MainApp extends Application {
@Override
public void init() throws Exception {
- logger.info("=============================[ Initializing AddressBook ]===========================");
+ logger.info("=============================[ Initializing UNIon ]===========================");
super.init();
AppParameters appParameters = AppParameters.parse(getParameters());
@@ -151,7 +151,7 @@ protected UserPrefs initPrefs(UserPrefsStorage storage) {
+ "Using default user prefs");
initializedPrefs = new UserPrefs();
} catch (IOException e) {
- logger.warning("Problem while reading from the file. Will be starting with an empty AddressBook");
+ logger.warning("Problem while reading from the file. Will be starting with an empty UNIon");
initializedPrefs = new UserPrefs();
}
@@ -167,13 +167,13 @@ protected UserPrefs initPrefs(UserPrefsStorage storage) {
@Override
public void start(Stage primaryStage) {
- logger.info("Starting AddressBook " + MainApp.VERSION);
+ logger.info("Starting UNIon " + MainApp.VERSION);
ui.start(primaryStage);
}
@Override
public void stop() {
- logger.info("============================ [ Stopping Address Book ] =============================");
+ logger.info("============================ [ Stopping UNIon ] =============================");
try {
storage.saveUserPrefs(model.getUserPrefs());
} catch (IOException e) {
diff --git a/src/main/java/seedu/address/commons/core/Messages.java b/src/main/java/seedu/address/commons/core/Messages.java
index 1deb3a1e469..be7bc2b2490 100644
--- a/src/main/java/seedu/address/commons/core/Messages.java
+++ b/src/main/java/seedu/address/commons/core/Messages.java
@@ -7,7 +7,21 @@ public class Messages {
public static final String MESSAGE_UNKNOWN_COMMAND = "Unknown command";
public static final String MESSAGE_INVALID_COMMAND_FORMAT = "Invalid command format! \n%1$s";
- public static final String MESSAGE_INVALID_PERSON_DISPLAYED_INDEX = "The person index provided is invalid";
- public static final String MESSAGE_PERSONS_LISTED_OVERVIEW = "%1$d persons listed!";
+ public static final String MESSAGE_INVALID_PERSON_IN_UNION = "This person does not exist in UNIon";
+ public static final String MESSAGE_NONEXISTENT_FOLDER_IN_CURRENT_LIST = "Folder name supplied "
+ + "is not found in the current folder's list below.";
+ private static final String MESSAGE_PERSONS_LISTED_OVERVIEW = "%1$d person%2$s listed!";
+ private static final String MESSAGE_FOLDERS_LISTED_OVERVIEW = "%1$d folder%2$s listed!";
+
+ private static String getPluralModifier(int numberOfObject) {
+ return numberOfObject != 1 ? "s" : "";
+ }
+
+ public static String getMessagePersonsListedOverview(int numberOfPersons) {
+ return String.format(MESSAGE_PERSONS_LISTED_OVERVIEW, numberOfPersons, getPluralModifier((numberOfPersons)));
+ }
+ public static String getMessageFoldersListedOverview(int numberOfFolders) {
+ return String.format(MESSAGE_FOLDERS_LISTED_OVERVIEW, numberOfFolders, getPluralModifier((numberOfFolders)));
+ }
}
diff --git a/src/main/java/seedu/address/commons/util/StringUtil.java b/src/main/java/seedu/address/commons/util/StringUtil.java
index 61cc8c9a1cb..9255de7b044 100644
--- a/src/main/java/seedu/address/commons/util/StringUtil.java
+++ b/src/main/java/seedu/address/commons/util/StringUtil.java
@@ -38,6 +38,29 @@ public static boolean containsWordIgnoreCase(String sentence, String word) {
.anyMatch(preppedWord::equalsIgnoreCase);
}
+ /**
+ * Returns true if the {@code sentence} contains the {@code text}.
+ * Ignores case and matches partial words
+ * examples: