: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.
+
: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.
@@ -228,14 +129,13 @@ The following activity diagram summarizes what happens when a user executes a ne
**Aspect: How undo & redo executes:**
-* **Alternative 1 (current choice):** Saves the entire address book.
- * Pros: Easy to implement.
- * Cons: May have performance issues in terms of memory usage.
+- **Alternative 1 (current choice):** Saves the entire address book.
+ - Pros: Easy to implement.
+ - Cons: May have performance issues in terms of memory usage.
-* **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.
+- **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.
_{more aspects and alternatives to be added}_
@@ -243,118 +143,124 @@ _{more aspects and alternatives to be added}_
_{Explain here how the data archiving feature will be implemented}_
-
---------------------------------------------------------------------------------------------------------------------
+---
## **Documentation, logging, testing, configuration, dev-ops**
-* [Documentation guide](Documentation.md)
-* [Testing guide](Testing.md)
-* [Logging guide](Logging.md)
-* [Configuration guide](Configuration.md)
-* [DevOps guide](DevOps.md)
+- [Documentation guide](Documentation.md)
+- [Testing guide](Testing.md)
+- [Logging guide](Logging.md)
+- [Configuration guide](Configuration.md)
+- [DevOps guide](DevOps.md)
---------------------------------------------------------------------------------------------------------------------
+---
-## **Appendix: Requirements**
+{% include DeveloperGuide/Requirements/index.md %}
-### Product scope
+---
-**Target user profile**:
+## **Appendix: Instructions for manual testing**
-* has a need to manage a significant number of contacts
-* prefer desktop apps over other types
-* can type fast
-* prefers typing to mouse interactions
-* is reasonably comfortable using CLI apps
+Given below are instructions to test the app manually.
-**Value proposition**: manage contacts faster than a typical mouse/GUI driven app
+
+:information_source: **Note:** These instructions only provide a starting point for testers to work on; testers are expected to do more *exploratory* testing.
+
+### Launch and shutdown
-### User stories
+1. Initial launch
-Priorities: High (must have) - `* * *`, Medium (nice to have) - `* *`, Low (unlikely to have) - `*`
+ 1. Download the jar file and copy into an empty folder
-| 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 |
+ 2. Launch the app
+ Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
-*{More to be added}*
+2. Saving window preferences
-### Use cases
+ 1. Resize the window to an optimum size. Move the window to a different location. Close the window.
-(For all use cases below, the **System** is the `AddressBook` and the **Actor** is the `user`, unless specified otherwise)
+ 2. Re-launch the app
+ Expected: The most recent window size and location is retained.
-**Use case: Delete a person**
+### Local GUI testing
-**MSS**
+The available gradle tasks are: guiTests, nonGuiTests, allTests.
-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
+- guiTests: all tests under `systemtests` package
+- nonGuiTests: all tests under `spleetwaise.address`, `spleetwaise.common`, `spleetwaise.transaction` packages
+- allTests: guiTests and nonGuiTests, nonGuiTests will be run before guiTests
- Use case ends.
+As an example, you can run `gradle nonGuiTests` in the gradle terminal for all tests excluding GUI related tests.
+You can navigate the gradle terminal by clicking on elephant icon _(Gradle)_ > terminal icon _(Execute Gradle tasks)_.
-**Extensions**
+### Adding a person
-* 2a. The list is empty.
+1. Adding a person while all persons are being shown
- Use case ends.
+ 1. Prerequisites: List all persons using the list command. Multiple persons in the list.
-* 3a. The given index is invalid.
+ 2. Test case: `add n/John Doe p/98765432 e/johnd@example.com a/John street, block 123, #01-01`
+ Expected: Assuming no duplicates, a new contact named John Doe is added to the list. Details of the added contact shown in the status message.
- * 3a1. AddressBook shows an error message.
+ 3. Test case: `add n/ p/ e/ a/`
+ Expected: No person is added. Error details shown in the status message. Status bar remains the same.
- Use case resumes at step 2.
+ 4. Other incorrect add commands to try: `add n/John Doe`, `add p/98765432`, `add e/johnd@example.com`, `add a/John street, block 123, #01-01`
+ Expected: Similar to previous.
-*{More to be added}*
+### Editing a person
-### Non-Functional Requirements
+1. Editing a person while all persons are being shown
-1. Should work on any _mainstream OS_ as long as it has Java `17` or above installed.
-2. Should be able to hold up to 1000 persons 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.
+ 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
-*{More to be added}*
+ 2. Test case: `edit 1 n/Jane Doe`
+ Expected: Assuming no duplicates, first contact's name is changed to Jane Doe. Details of the edited contact shown in the status message.
-### Glossary
+ 3. Test case: `edit 0 n/Jane Doe`
+ Expected: No person is edited. Error details shown in the status message.
-* **Mainstream OS**: Windows, Linux, Unix, MacOS
-* **Private contact detail**: A contact detail that is not meant to be shared with others
+ 4. Other incorrect edit commands to try: `edit`, `edit x n/Jane Doe` (where x is larger than the list size),
+ `edit 1`
+ Expected: Similar to previous.
---------------------------------------------------------------------------------------------------------------------
+### Person Synchronization in transaction list
-## **Appendix: Instructions for manual testing**
+1. Ensuring person details changed are accurately reflected in all views and models.
-Given below are instructions to test the app manually.
+ 1. Prerequisites: List all persons and transactions using the `list` and `listTxn` command. At least one person and one transaction with that person in the list.
-
:information_source: **Note:** These instructions only provide a starting point for testers to work on;
-testers are expected to do more *exploratory* testing.
+ 2. Test case: `edit 1 n/New Name` (where `New Name` is the updated name for the person)
+ Expected: The person's name updates in both the address and transaction lists and the UI (assuming no duplicates).
-
+### Adding/deleting a remark for a person
-### Launch and shutdown
+1. Adding a remark for a person using the `remark` command while all persons are being shown
-1. Initial launch
+ 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
- 1. Download the jar file and copy into an empty folder
+ 2. Test case: `remark 1 r/Likes to swim`
+ Expected: First contact's remark is updated to "Likes to swim". Details of the updated contact shown in the status message. Timestamp in the status bar is updated.
+
+ 3. Test case: `remark 0 r/Likes to swim`
+ Expected: No person's remark is updated. Error details shown in the status message. Status bar remains the same.
- 1. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
+ 4. Other incorrect remark commands to try: `remark`, `remark x r/Likes to swim` (where x is larger than the list size)
+ Expected: Similar to previous.
+
+2. Deleting a remark for a person using the `remark` command while all persons are being shown
-1. Saving window preferences
+ 1. Prerequisites: List all persons using the `list` command. Multiple persons in the list.
- 1. Resize the window to an optimum size. Move the window to a different location. Close the window.
+ 2. Test case: `remark 1 r/`
+ Expected: First contact's remark is deleted. Details of the contact shown in the status message.
- 1. Re-launch the app by double-clicking the jar file.
- Expected: The most recent window size and location is retained.
+ 3. Test case: `remark 1`
+ Expected: First contact's remark is deleted (shortcut for users intending to empty remark). Details of the contact shown in the status message.
-1. _{ more test cases … }_
+ 4. Test case: `remark 0 r/`
+ Expected: No person's remark is deleted. Error details shown in the status message.
### Deleting a person
@@ -362,21 +268,150 @@ testers are expected to do more *exploratory* testing.
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.
+ 2. Test case: `delete 1`
+ Expected: First contact is deleted from the list. Details of the deleted contact shown in the status message.
+
+ 3. Test case: `delete 0`
+ Expected: No person is deleted. Error details shown in the status message.
+
+ 4. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
+ Expected: Similar to previous.
+
+### Adding a transaction
+
+1. Adding a transaction while all transactions are being shown with minimally 1 person in address book
+
+ 1. Prerequisites: List all persons and transactions using the `list` and `listTxn` command. At least one person in the address book list and multiple transactions in the list
+
+ 2. Test cases: `addTxn 1 amt/12.3 desc/John owes me for dinner`
+ Expected: Assuming no duplicates, a new transaction related to the person in the first index of the address book is added to the list along with description of it. The amount reflected in the transaction is displayed green in the transaction panel to signify that _the user_ is owed. The date of the transaction displays the current day. No categories to be displayed. Details of the added transaction is shown in the status message.
+
+ 3. Test cases: `addTxn 1 amt/-12.3 desc/I owe John for dinner date/10102024`
+ Expected: Assuming no duplicates, a new transaction related to the person in the first index of the address book is added to the list along with description of it. The amount reflected in the transaction is displayed red in the transaction panel to signify that _the user_ owes. The date of the transaction displays `10 Oct 2024`. No categories to be displayed. Details of the added transaction is shown in the status message.
+
+ 4. Test cases: `addTxn 1 amt/12.3 desc/John owes me for dinner cat/FOOD`
+ Expected: Assuming no duplicates, a new transaction related to the person in the first index of the address book is added to the list along with description of it. The amount reflected in the transaction is displayed green in the transaction panel to signify that you are owed. The date of the transaction displays the current day. Category of `FOOD` is displayed. Details of the added transaction is shown in the status message.
+
+ 5. Test cases: `addTxn 1 amt/-12.3 desc/I owe John for dinner date/10102024` when identical transaction exists
+ Expected: No transaction is added. Error details shown in the status message with `Transaction already exists in the transaction book`. Status bar remains the same.
+
+ 6. Test cases: `addTxn 0 amt/ desc/ date/ cat/`
+ Expected: No transaction is added. Error details shown in the status message. Status bar remains the same.
+
+ 7. Other incorrect `addTxn` commands to try: `addTxn 1`, `addTxn amt/1.234`, `addTxn desc/dinner`, `addTxn date/10102024`, `addTxn cat/FOOD`
+ Expected: Similar to previous.
+
+### Marking a transaction as done
+
+1. Marking a transaction as done while all transactions are being shown.
+
+ 1. Prerequisites: List all transactions using the `listTxn` command. One transaction is in the list.
+
+ 2. Test cases: `markDone 1`
+ Expected: The first transaction is marked as done. A "done" icon appears next to the person's name for that transaction. Details of the updated transaction shown in the status message.
+
+ 3. Test cases: `markDone 1` (Assumes transaction 1 is already marked)
+ Expected: No change in transaction status. The "done" icon remains. A status message confirms that the transaction is already marked.
+
+ 4. Test cases: `markDone 0`
+ Expected: No transaction is marked. Error details shown in the status message.
+
+ 5. Other incorrect `markDone` commands to try: `markDone`, `markDone x` (where x is larger than the list size)
+ Expected: Similar to previous.
+
+### Reverting a done transaction back to undone
+
+1. Reverting a done transaction back to undone while all transactions are being shown.
+
+ 1. Prerequisites: List all transactions using the `listTxn` command. One transaction is in the list.
+
+ 2. Test cases: `markUndone 1`
+ Expected: The first transaction is reverted to undone. The existing "done" icon disappears for that transaction. Details of the updated transaction shown in the status message.
+
+ 3. Test cases: `markUndone 1` (Assumes transaction 1 is already undone)
+ Expected: No change in transaction status. The transaction remains to have no "done" icon. A status message confirms that the transaction is already undone.
+
+ 4. Test cases: `markUndone 0`
+ Expected: No transaction is marked. Error details shown in the status message.
+
+ 5. Other incorrect `markUndone` commands to try: `markUndone`, `markUndone x` (where x is larger than the list size)
+ Expected: Similar to previous.
+
+### Editing a transaction
+
+1. Editing a transaction while all persons are being shown
+
+ 1. Prerequisites: List all persons and transactions using the `list` and `listTxn` command respectively. Multiple
+ persons in the list on the left pane. Multiple transactions in the list on the right pane.
- 1. Test case: `delete 0`
- Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.
+ 2. Test case: `editTxn 1 amt/1.23`
+ Expected: Assuming no duplicates, first contact's amount is changed to $1.23. Details of the edited transaction shown in the status message.
- 1. Other incorrect delete commands to try: `delete`, `delete x`, `...` (where x is larger than the list size)
+ 3. Test case: `editTxn 0 desc/Updated description`
+ Expected: No transaction is edited. Error details shown in the status message.
+
+ 4. Other incorrect edit commands to try: `editTxn`, `edit x amt/1.23` (where x is larger than the list size), `editTxn 1`
Expected: Similar to previous.
-1. _{ more test cases … }_
+### Filter Reuse in Transaction List
+
+1. Maintaining the current filter state when transactions are modified.
+
+ 1. Prerequisites: List all transactions using the `listTxn` command. Apply a filter via `filterTxn` command to the list (e.g., filtering by description containing "mac").
+
+ 2. Test cases: `addTxn 1 amt/12.3 desc/John owes me for dinner`
+ Expected: The new transaction appears in the filtered list while preserving the existing filter. Details of the new transaction shown in the status message.
+
+ 3. Test cases: `editTxn 1 d/happy meal at mac` (Assumes transaction 1 description is "KFC")
+ Expected: The updated transaction appears in the filtered list while preserving the existing filter. Details of the updated transaction shown in the status message.
+
+ 4. Test cases: `editTxn 1 d/KFC` (Assumes transaction 1 description is "fries at mac")
+ Expected: The updated transaction disappears in the filtered list while preserving the existing filter. Details of the updated transaction shown in the status message.
+
+ 5. Test cases: `markDone 1`, `markUndone 1` (Assumes transaction 1 description is "fries at mac")
+ Expected: The transaction done icon updated in the filtered list while preserving the existing filter. Details of the updated transaction shown in the status message.
+
+### Filtering the transaction list.
+
+1. Filtering the transaction list while all persons are being shown
+
+ 1. Prerequisites: List all persons and transactions using the `list` and `listTxn` command respectively. Multiple
+ persons in the list on the left pane. Multiple transactions in the list on the right pane.
+
+ 2. Test case: `filterTxn 1`
+ Expected: Transaction list will be filtered by the person corresponding to the displayed index 1 in the person
+ list.
+
+ 3. Test case: `filterTxn 1 amt/1.23`
+ Expected: Transaction list will show transactions related to the person corresponding to the displayed index 1
+ in the person list with amount $1.23.
+
+ 4. Test case: `filterTxn 0`
+ Expected: Current displayed transaction list will remain the same. Error details shown in the status message.
+
+ 5. Other incorrect edit commands to try: `filterTxn desc/`, `filterTxn x` (where x is larger than the list size),
+ `filterTxn amt/1.222`
+ Expected: Similar to previous.
+
+### Default Behavior on App Startup
+
+1. Verifying filter state upon app initialization.
+
+ 1. Prerequisites: At least one done transaction and one undone transaction in the list.
+
+ 2. Test cases: Initial Filter on App Startup
+ Expected: The list displays all transactions (both done and undone) by default when the app starts.
### Saving data
1. Dealing with missing/corrupted data files
- 1. _{explain how to simulate a missing/corrupted file, and the expected behavior}_
+ 1. Prerequisites: Multiple persons in `addressbook.json` and multiple transactions in `transactionbook.json` data files.
+
+ 2. Test cases: Missing `name` field in `addressbook.json` data file
+ Simulation: Remove the `name` field from a person entry in the JSON file, then start the app.
+ Expected: The person is discarded and not loaded to the app, with log message `WARNING: Address book is possibly corrupted: Person's Name field is missing! Ignoring corrupted person.`. If the corrupted person has any related transactions in the transaction book, they will be discarded accordingly with log message `WARNING: Transaction book is possibly corrupted: Person with id [Person-ID] not found! Ignoring corrupted transactions.` - `[Person-ID]` will be the respective person ID of the corrupted person.
-1. _{ more test cases … }_
+ 3. Test cases: Missing `isDone` field in `transactionbook.json` data file
+ Simulation: Remove the `isDone` field from a transaction entry in the JSON file, then start the app.
+ Expected: The transaction loads as undone by default. Upon closing the app, the transaction is saved as undone in the JSON file.
diff --git a/docs/Gemfile.lock b/docs/Gemfile.lock
index bac5eb36d35..73be7b0a58a 100644
--- a/docs/Gemfile.lock
+++ b/docs/Gemfile.lock
@@ -1,48 +1,68 @@
GEM
remote: https://rubygems.org/
specs:
- activesupport (7.0.7.2)
- concurrent-ruby (~> 1.0, >= 1.0.2)
+ activesupport (7.2.1.2)
+ base64
+ bigdecimal
+ concurrent-ruby (~> 1.0, >= 1.3.1)
+ connection_pool (>= 2.2.5)
+ drb
i18n (>= 1.6, < 2)
+ logger (>= 1.4.2)
minitest (>= 5.1)
- tzinfo (~> 2.0)
- addressable (2.8.4)
- public_suffix (>= 2.0.2, < 6.0)
+ securerandom (>= 0.3)
+ tzinfo (~> 2.0, >= 2.0.5)
+ addressable (2.8.7)
+ public_suffix (>= 2.0.2, < 7.0)
+ base64 (0.2.0)
+ bigdecimal (3.1.8)
coffee-script (2.4.1)
coffee-script-source
execjs
- coffee-script-source (1.11.1)
+ coffee-script-source (1.12.2)
colorator (1.1.0)
commonmarker (0.23.10)
- concurrent-ruby (1.2.2)
- dnsruby (1.70.0)
+ concurrent-ruby (1.3.4)
+ connection_pool (2.4.1)
+ csv (3.3.0)
+ dnsruby (1.72.2)
simpleidn (~> 0.2.1)
+ drb (2.2.1)
em-websocket (0.5.3)
eventmachine (>= 0.12.9)
http_parser.rb (~> 0)
ethon (0.16.0)
ffi (>= 1.15.0)
eventmachine (1.2.7)
- eventmachine (1.2.7-x64-mingw32)
- execjs (2.8.1)
- faraday (2.7.5)
- faraday-net_http (>= 2.0, < 3.1)
- ruby2_keywords (>= 0.0.4)
- faraday-net_http (3.0.2)
- ffi (1.15.5)
- ffi (1.15.5-x64-mingw32)
+ execjs (2.10.0)
+ faraday (2.12.0)
+ faraday-net_http (>= 2.0, < 3.4)
+ json
+ logger
+ faraday-net_http (3.3.0)
+ net-http
+ ffi (1.17.0-aarch64-linux-gnu)
+ ffi (1.17.0-aarch64-linux-musl)
+ ffi (1.17.0-arm-linux-gnu)
+ ffi (1.17.0-arm-linux-musl)
+ ffi (1.17.0-arm64-darwin)
+ ffi (1.17.0-x86-linux-gnu)
+ ffi (1.17.0-x86-linux-musl)
+ ffi (1.17.0-x86_64-darwin)
+ ffi (1.17.0-x86_64-linux-gnu)
+ ffi (1.17.0-x86_64-linux-musl)
forwardable-extended (2.6.0)
- gemoji (3.0.1)
- github-pages (228)
- github-pages-health-check (= 1.17.9)
- jekyll (= 3.9.3)
- jekyll-avatar (= 0.7.0)
- jekyll-coffeescript (= 1.1.1)
- jekyll-commonmark-ghpages (= 0.4.0)
- jekyll-default-layout (= 0.1.4)
- jekyll-feed (= 0.15.1)
+ gemoji (4.1.0)
+ github-pages (232)
+ github-pages-health-check (= 1.18.2)
+ jekyll (= 3.10.0)
+ jekyll-avatar (= 0.8.0)
+ jekyll-coffeescript (= 1.2.2)
+ jekyll-commonmark-ghpages (= 0.5.1)
+ jekyll-default-layout (= 0.1.5)
+ jekyll-feed (= 0.17.0)
jekyll-gist (= 1.5.0)
- jekyll-github-metadata (= 2.13.0)
+ jekyll-github-metadata (= 2.16.1)
jekyll-include-cache (= 0.2.1)
jekyll-mentions (= 1.6.0)
jekyll-optional-front-matter (= 0.3.2)
@@ -69,30 +89,32 @@ GEM
jekyll-theme-tactile (= 0.2.0)
jekyll-theme-time-machine (= 0.2.0)
jekyll-titles-from-headings (= 0.5.3)
- jemoji (= 0.12.0)
- kramdown (= 2.3.2)
+ jemoji (= 0.13.0)
+ kramdown (= 2.4.0)
kramdown-parser-gfm (= 1.1.0)
liquid (= 4.0.4)
mercenary (~> 0.3)
minima (= 2.5.1)
- nokogiri (>= 1.13.6, < 2.0)
- rouge (= 3.26.0)
+ nokogiri (>= 1.16.2, < 2.0)
+ rouge (= 3.30.0)
terminal-table (~> 1.4)
- github-pages-health-check (1.17.9)
+ webrick (~> 1.8)
+ github-pages-health-check (1.18.2)
addressable (~> 2.3)
dnsruby (~> 1.60)
- octokit (~> 4.0)
- public_suffix (>= 3.0, < 5.0)
+ octokit (>= 4, < 8)
+ public_suffix (>= 3.0, < 6.0)
typhoeus (~> 1.3)
html-pipeline (2.14.3)
activesupport (>= 2)
nokogiri (>= 1.4)
http_parser.rb (0.8.0)
- i18n (1.14.1)
+ i18n (1.14.6)
concurrent-ruby (~> 1.0)
- jekyll (3.9.3)
+ jekyll (3.10.0)
addressable (~> 2.4)
colorator (~> 1.0)
+ csv (~> 3.0)
em-websocket (~> 0.5)
i18n (>= 0.7, < 2)
jekyll-sass-converter (~> 1.0)
@@ -103,27 +125,28 @@ GEM
pathutil (~> 0.9)
rouge (>= 1.7, < 4)
safe_yaml (~> 1.0)
- jekyll-avatar (0.7.0)
+ webrick (>= 1.0)
+ jekyll-avatar (0.8.0)
jekyll (>= 3.0, < 5.0)
- jekyll-coffeescript (1.1.1)
+ jekyll-coffeescript (1.2.2)
coffee-script (~> 2.2)
- coffee-script-source (~> 1.11.1)
+ coffee-script-source (~> 1.12)
jekyll-commonmark (1.4.0)
commonmarker (~> 0.22)
- jekyll-commonmark-ghpages (0.4.0)
- commonmarker (~> 0.23.7)
- jekyll (~> 3.9.0)
+ jekyll-commonmark-ghpages (0.5.1)
+ commonmarker (>= 0.23.7, < 1.1.0)
+ jekyll (>= 3.9, < 4.0)
jekyll-commonmark (~> 1.4.0)
rouge (>= 2.0, < 5.0)
- jekyll-default-layout (0.1.4)
- jekyll (~> 3.0)
- jekyll-feed (0.15.1)
+ jekyll-default-layout (0.1.5)
+ jekyll (>= 3.0, < 5.0)
+ jekyll-feed (0.17.0)
jekyll (>= 3.7, < 5.0)
jekyll-gist (1.5.0)
octokit (~> 4.2)
- jekyll-github-metadata (2.13.0)
+ jekyll-github-metadata (2.16.1)
jekyll (>= 3.4, < 5.0)
- octokit (~> 4.0, != 4.4.0)
+ octokit (>= 4, < 7, != 4.4.0)
jekyll-include-cache (0.2.1)
jekyll (>= 3.7, < 5.0)
jekyll-mentions (1.6.0)
@@ -194,42 +217,52 @@ GEM
jekyll (>= 3.3, < 5.0)
jekyll-watch (2.2.1)
listen (~> 3.0)
- jemoji (0.12.0)
- gemoji (~> 3.0)
+ jemoji (0.13.0)
+ gemoji (>= 3, < 5)
html-pipeline (~> 2.2)
jekyll (>= 3.0, < 5.0)
- kramdown (2.3.2)
+ json (2.7.4)
+ kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
kramdown (~> 2.0)
liquid (4.0.4)
- listen (3.8.0)
+ listen (3.9.0)
rb-fsevent (~> 0.10, >= 0.10.3)
rb-inotify (~> 0.9, >= 0.9.10)
+ logger (1.6.1)
mercenary (0.3.6)
- mini_portile2 (2.8.6)
minima (2.5.1)
jekyll (>= 3.5, < 5.0)
jekyll-feed (~> 0.9)
jekyll-seo-tag (~> 2.1)
- minitest (5.19.0)
- nokogiri (1.16.5)
- mini_portile2 (~> 2.8.2)
+ minitest (5.25.1)
+ net-http (0.4.1)
+ uri
+ nokogiri (1.16.7-aarch64-linux)
+ racc (~> 1.4)
+ nokogiri (1.16.7-arm-linux)
+ racc (~> 1.4)
+ nokogiri (1.16.7-arm64-darwin)
+ racc (~> 1.4)
+ nokogiri (1.16.7-x86-linux)
+ racc (~> 1.4)
+ nokogiri (1.16.7-x86_64-darwin)
+ racc (~> 1.4)
+ nokogiri (1.16.7-x86_64-linux)
racc (~> 1.4)
octokit (4.25.1)
faraday (>= 1, < 3)
sawyer (~> 0.9)
pathutil (0.16.2)
forwardable-extended (~> 2.6)
- public_suffix (4.0.7)
- racc (1.7.3)
+ public_suffix (5.1.1)
+ racc (1.8.1)
rb-fsevent (0.11.2)
- rb-inotify (0.10.1)
+ rb-inotify (0.11.1)
ffi (~> 1.0)
- rexml (3.3.6)
- strscan
- rouge (3.26.0)
- ruby2_keywords (0.0.5)
+ rexml (3.3.9)
+ rouge (3.30.0)
rubyzip (2.3.2)
safe_yaml (1.0.5)
sass (3.7.4)
@@ -240,25 +273,33 @@ GEM
sawyer (0.9.2)
addressable (>= 2.3.5)
faraday (>= 0.17.3, < 3)
- simpleidn (0.2.1)
- unf (~> 0.1.4)
- strscan (3.1.0)
+ securerandom (0.3.1)
+ simpleidn (0.2.3)
terminal-table (1.8.0)
unicode-display_width (~> 1.1, >= 1.1.1)
- typhoeus (1.4.0)
+ typhoeus (1.4.1)
ethon (>= 0.9.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
- unf (0.1.4)
- unf_ext
- unf_ext (0.0.8.2)
- unf_ext (0.0.8.2-x64-mingw32)
unicode-display_width (1.8.0)
- webrick (1.8.1)
+ uri (0.13.1)
+ webrick (1.8.2)
PLATFORMS
- ruby
- x64-mingw32
+ aarch64-linux
+ aarch64-linux-gnu
+ aarch64-linux-musl
+ arm-linux
+ arm-linux-gnu
+ arm-linux-musl
+ arm64-darwin
+ x86-linux
+ x86-linux-gnu
+ x86-linux-musl
+ x86_64-darwin
+ x86_64-linux
+ x86_64-linux-gnu
+ x86_64-linux-musl
DEPENDENCIES
github-pages
@@ -266,4 +307,4 @@ DEPENDENCIES
webrick
BUNDLED WITH
- 2.1.4
+ 2.5.22
diff --git a/docs/SettingUp.md b/docs/SettingUp.md
index 9f832a19674..e3677508b8d 100644
--- a/docs/SettingUp.md
+++ b/docs/SettingUp.md
@@ -6,7 +6,6 @@ title: Setting up and getting started
* Table of Contents
{:toc}
-
--------------------------------------------------------------------------------------------------------------------
## Setting up the project in your computer
@@ -19,12 +18,16 @@ Follow the steps in the following guide precisely. Things will not work out if y
First, **fork** this repo, and **clone** the fork into your computer.
If you plan to use Intellij IDEA (highly recommended):
-1. **Configure the JDK**: Follow the guide [_[se-edu/guides] IDEA: Configuring the JDK_](https://se-education.org/guides/tutorials/intellijJdk.html) to ensure Intellij is configured to use **JDK 17**.
-1. **Import the project as a Gradle project**: Follow the guide [_[se-edu/guides] IDEA: Importing a Gradle project_](https://se-education.org/guides/tutorials/intellijImportGradleProject.html) to import the project into IDEA.
- :exclamation: Note: Importing a Gradle project is slightly different from importing a normal Java project.
-1. **Verify the setup**:
- 1. Run the `seedu.address.Main` and try a few commands.
- 1. [Run the tests](Testing.md) to ensure they all pass.
+
+1. **Configure the JDK**: Follow the guide [_[se-edu/guides] IDEA: Configuring the
+ JDK_](https://se-education.org/guides/tutorials/intellijJdk.html) to ensure Intellij is configured to use **JDK 17**.
+2. **Import the project as a Gradle project**: Follow the guide [_[se-edu/guides] IDEA: Importing a Gradle
+ project_](https://se-education.org/guides/tutorials/intellijImportGradleProject.html) to import the project into
+ IDEA.
+ :exclamation: Note: Importing a Gradle project is slightly different from importing a normal Java project.
+3. **Verify the setup**:
+ 1. Run the `spleetwaise.commons.Main` and try a few commands.
+ 2. [Run the tests](Testing.md) to ensure they all pass.
--------------------------------------------------------------------------------------------------------------------
@@ -32,24 +35,40 @@ If you plan to use Intellij IDEA (highly recommended):
1. **Configure the coding style**
- If using IDEA, follow the guide [_[se-edu/guides] IDEA: Configuring the code style_](https://se-education.org/guides/tutorials/intellijCodeStyle.html) to set up IDEA's coding style to match ours.
+ If using IDEA, follow the guide [_[se-edu/guides] IDEA: Configuring the code
+ style_](https://se-education.org/guides/tutorials/intellijCodeStyle.html) to set up IDEA's coding style to match
+ ours.
:bulb: **Tip:**
- Optionally, you can follow the guide [_[se-edu/guides] Using Checkstyle_](https://se-education.org/guides/tutorials/checkstyle.html) to find how to use the CheckStyle within IDEA e.g., to report problems _as_ you write code.
+ Optionally, you can follow the guide [_[se-edu/guides] Using
+ Checkstyle_](https://se-education.org/guides/tutorials/checkstyle.html) to find how to use the CheckStyle within IDEA
+ e.g., to report problems _as_ you write code.
-1. **Set up CI**
+2. **Git Workflow**
+ This project uses
+ the [Feature Branch Flow](https://nus-cs2103-ay2425s1.github.io/website/se-book-adapted/chapters/revisionControl.html#feature-branch-flow)
+ with rules set to protect the `master` branch. PRs are mandatory and at least 1 member requires review.
+
+ > Feature branches are branches being used to develop an individual story. They should be named "
+ > {issue-number}-{summary}" where "{issue-number}" is the issue number corresponding to the feature you are
+ > implementing and "{summary}" is a brief summary of the feature `formatted-like-this`.
+
+3. **Set up CI**
- This project comes with a GitHub Actions config files (in `.github/workflows` folder). When GitHub detects those files, it will run the CI for your project automatically at each push to the `master` branch or to any PR. No set up required.
+ This project comes with a GitHub Actions config files (in `.github/workflows` folder). When GitHub detects those
+ files, it will run the CI for your project automatically at each push to the `master` branch or to any PR. No set up
+ required.
-1. **Learn the design**
+4. **Learn the design**
- When you are ready to start coding, we recommend that you get some sense of the overall design by reading about [AddressBook’s architecture](DeveloperGuide.md#architecture).
+ When you are ready to start coding, we recommend that you get some sense of the overall design by reading
+ about [Spleetwaise’s architecture](DeveloperGuide.md#architecture).
-1. **Do the tutorials**
+5. **Do the tutorials**
These tutorials will help you get acquainted with the codebase.
- * [Tracing code](tutorials/TracingCode.md)
- * [Adding a new command](tutorials/AddRemark.md)
- * [Removing fields](tutorials/RemovingFields.md)
+ * [Tracing code](tutorials/TracingCode.md)
+ * [Adding a new command](tutorials/AddRemark.md)
+ * [Removing fields](tutorials/RemovingFields.md)
diff --git a/docs/Testing.md b/docs/Testing.md
index 8a99e82438a..07d5a48e9fe 100644
--- a/docs/Testing.md
+++ b/docs/Testing.md
@@ -29,8 +29,8 @@ There are two ways to run tests.
This project has three types of tests:
1. *Unit tests* targeting the lowest level methods/classes.
- e.g. `seedu.address.commons.StringUtilTest`
+ e.g. `spleetwaise.commons.util.StringUtilTest`
1. *Integration tests* that are checking the integration of multiple code units (those code units are assumed to be working).
- e.g. `seedu.address.storage.StorageManagerTest`
+ e.g. `spleetwaise.commons.storage.StorageManagerTest`
1. Hybrids of unit and integration tests. These test are checking multiple code units as well as how the are connected together.
- e.g. `seedu.address.logic.LogicManagerTest`
+ e.g. `spleetwaise.commons.logic.LogicManagerTest`
diff --git a/docs/UserGuide.md b/docs/UserGuide.md
index 84b4ddc4e40..874462407eb 100644
--- a/docs/UserGuide.md
+++ b/docs/UserGuide.md
@@ -3,7 +3,7 @@ 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.
+SpleetWaise builds on [AddressBook Level 3 (AB3)](https://se-education.org/addressbook-level3/), **a desktop app for managing contacts, optimized for use via a Command Line Interface** (CLI) while still offering the benefits of a Graphical User Interface (GUI). Designed to streamline expense tracking for students, SpleetWaise makes it easy to record and monitor both personal and shared expenses with contacts saved in the address book. With features to keep track of balances with friends, it eliminates the confusion often associated with managing shared costs, providing a clear, organised view of who has owes what. If you can type fast, SpleetWaise lets you handle your contact and expense management tasks more efficiently than traditional GUI apps, offering students a stress-free way to manage their expenses and shared balances with contacts.
* Table of Contents
{:toc}
@@ -14,28 +14,31 @@ AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized fo
1. Ensure you have Java `17` or above installed in your Computer.
-1. Download the latest `.jar` file from [here](https://github.com/se-edu/addressbook-level3/releases).
+2. Download the latest `.jar` file from [here](https://github.com/AY2425S1-CS2103-F13-1/tp/releases).
-1. Copy the file to the folder you want to use as the _home folder_ for your AddressBook.
+3. Copy the file to the folder you want to use as the _home folder_ for SpleetWaise.
-1. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar addressbook.jar` command to run the application.
+4. Open a command terminal, `cd` into the folder you put the jar file in, and use the `java -jar spleetwaise-[version].jar`
+ command to run the application (*replace `[version]` with the release version you chose, for example, 1.5).
A GUI similar to the below should appear in a few seconds. Note how the app contains some sample data.
![Ui](images/Ui.png)
-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.
+ * `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.
+ * `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.
+ * `delete 3` : Deletes the 3rd contact shown in the current list.
- * `clear` : Deletes all contacts.
+ * `clear` : Deletes all contacts.
- * `exit` : Exits the app.
+ * `exit` : Exits the app.
-1. Refer to the [Features](#features) below for details of each command.
+6. Refer to the [Features](#features) below for details of each command.
--------------------------------------------------------------------------------------------------------------------
@@ -57,57 +60,154 @@ AddressBook Level 3 (AB3) is a **desktop app for managing contacts, optimized fo
* 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.
-* Extraneous parameters for commands that do not take in parameters (such as `help`, `list`, `exit` and `clear`) will be ignored.
+* 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`.
-* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines as space characters surrounding line-breaks may be omitted when copied over to the application.
+* If you are using a PDF version of this document, be careful when copying and pasting commands that span multiple lines
+ as space characters surrounding line-breaks may be omitted when copied over to the application.
+
### Viewing help : `help`
-Shows a message explaning how to access the help page.
+Shows a message explaining how to access the help page.
![help message](images/helpMessage.png)
Format: `help`
-
### Adding a person: `add`
Adds a person to the address book.
Format: `add n/NAME p/PHONE_NUMBER e/EMAIL a/ADDRESS [t/TAG]…`
+* The `NAME` input allows a wide variety of characters but has some restrictions. Below are examples of valid and invalid inputs.
+ * Valid inputs include those that contain **letters, numbers, spaces, and certain special characters** such as apostrophes (`'`), hyphens (`-`), periods (`.`), slashes (`/`), ampersands (`&`), quotation marks (`"`), and parentheses (`()`).
+ - `John Doe` (letters and space)
+ - `Betsy O'Connor` (apostrophe)
+ - `Jean-Luc` (hyphen)
+ - `J.P. Morgan` (period)
+ - `John s/o Tan` (slash)
+ - `Anne-Marie & Sons` (ampersand and hyphen)
+ - `John "Johnny" Doe` (quotation marks)
+ - `Richard (Rick) Roe` (parentheses)
+ * Invalid inputs include those that contain special characters such as `*`, `@`, `#`, `!`, `^`, `%`, `$`, or any characters from Arabic, or Latin scripts like `Æ` or Chinese characters.
+ - `peter*` (contains `*`)
+ - `john@doe` (contains `@`)
+ - `王小明` (non-Latin characters like Chinese)
+ - `X Æ A-12` (non-Latin characters like `Æ` or Arabic `عبد العزيز`)
+
+:bulb: **Tip:**
+A person with an Indian name containing "s/o" denoting "son of" can be added as `add n/John s/o Jason p/98765432 e/johnd@example.com a/John street, block 123, #01-01`
+
+:bulb: **Tip:**
+A person with an Indian name containing "d/o" denoting "daughter of" can be added as `add n/Genevieve d/o Jason p/98765432 e/johnd@example.com a/John street, block 123, #01-01`
+
:bulb: **Tip:**
+If a transaction is marked as done, a done icon appears for the transaction in GUI.
+
+
+Examples:
+
+* `listTxn` followed by `markDone 2` marks the 2nd transaction in the transaction book as done.
+* If a done transaction is marked as done again, the transaction remains done.
+
+### Unmarking a transaction as done : `markUndone`
+
+Unmarks a specified transaction from the transaction book as undone.
+
+Format: `markUndone INDEX`
+
+* Unmarks a transaction at the specified `INDEX` as undone.
+* The index refers to the index number shown in the displayed transaction list.
+* The index **must be a positive integer** 1, 2, 3, …
+
+
+:bulb: **Tip:** By default, a new transaction is undone.
+:bulb: **Tip:** If a done transaction is marked as undone, the existing done icon for the transaction in GUI disappears.
+
+
+Examples:
+
+* `listTxn` followed by `markUndone 2` unmarks the 2nd transaction in the transaction book as undone.
+* if an undone transaction is marked as undone again, the transaction remains undone.
+
### Exiting the program : `exit`
Exits the program.
@@ -155,15 +370,21 @@ 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.
+AddressBook and Transaction 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 automatically as a JSON file `[JAR file location]/data/addressbook.json`. Advanced users are welcome to update data directly by editing that data file.
+- AddressBook data are saved automatically as a JSON file `[JAR file location]/data/addressbook.json`
+- TransactionBook data are saved automatically as a JSON file `[JAR file location]/data/transactionbook.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. Hence, it is recommended to take a backup of the file before editing it.
-Furthermore, certain edits can cause the AddressBook to behave in unexpected ways (e.g., if a value entered is outside of the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly.
+If changes to the data file make its format invalid, SpleetWaise will discard corrupted data and start as usual. To avoid data loss, it’s recommended to back up the file before making edits. Person and Transactions with invalid fields will be discarded before the application starts.
+Furthermore, certain edits can cause the AddressBook or TransactionBook to behave in unexpected ways (e.g., if a value entered is outside the acceptable range). Therefore, edit the data file only if you are confident that you can update it correctly.
+Notably, if SpleetWaise encounter a person/transaction with an existing person/transaction ID in the
+address/transaction book, it will be discarded. Similarly, if SpleetWaise encounter a transaction with the same
+person ID, amount, date and description as an existing transaction in the transaction book, it will be discarded as
+well.
### Archiving data files `[coming in v2.0]`
@@ -175,25 +396,40 @@ _Details coming soon ..._
## FAQ
**Q**: How do I transfer my data to another Computer?:information_source:
+**Package structure:**
+Packages follow this general package structure:
+- **`logic`**: Contains classes related to commands/command parsing.
+- **`model`**: Contains classes for representing data in the app.
+- **`storage`**: Contains classes related to reading and writing data from, and to storage.
+- **`ui`**: Contains classes related to the GUI of the app.
+
+
+**Main application**
+
+The entry-point to the app, **`Main`** (consisting of classes [`Main`](https://github.com/AY2425S1-CS2103-F13-1/tp/blob/master/src/main/java/spleetwaise/commons/Main.java) and [`MainApp`](https://github.com/AY2425S1-CS2103-F13-1/tp/blob/master/src/main/java/spleetwaise/commons/MainApp.java)), lives in the `common` package, and is in charge of managing the app's lifecycle.
+
+- At app launch, it initializes the other components in the correct sequence, and connects them up with each other.
+- At shut down, it shuts down the other components and invokes cleanup methods where necessary.
+
+The bulk of the app's work is done by the following four components:
+
+- [**`Ui`**](#ui-component): The UI of the App.
+- [**`Logic`**](#logic-component): The command executor.
+- [**`Model`**](#model-component): Holds the data of the App in memory.
+- [**`Storage`**](#storage-component): Reads data from, and writes data to, the hard disk.
+
+**How the architecture components interact with each other**
+
+The _Sequence Diagram_ below shows how the components interact with each other for the scenario where the user issues the command `delete 1`.
+
+:information_source: **Note:** The lifeline for `DeleteCommandParser` should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
+
+
+#### Dual-parser setup
+How the `Logic` component works:
+
+1. When `Logic` is called upon to execute a command, it will first check whether the command is known by the `AddressBookParser`:
+
+ 1.1. **It is first passed to an `AddressBookParser` object which will attempt to parse it.** If there is a matching command, it creates a parser that matches the command (e.g., `DeleteCommandParser`) and uses it to parse the command.
+
+ 1.2. **If there is no matching command, `Logic` will try to parse it with a `TransactionParser`.** If there is a matching command, a similar thing happens as with `AddressBookParser`. The partial sequence diagram below illustrates this case clearly:
+
+ ![Partial sequence diagram for transaction command](images/LogicSequenceDiagram.png)
+
+2. This ultimately results in a non-null `Command` object (more precisely, an object of one of its subclasses e.g., `DeleteCommand`) which is executed by the `LogicManager`.
+
+3. The command can communicate with the `Model` when it is executed (e.g. to delete a person).