StudyCircle Developer Guide


Acknowledgements


Setting up, getting started

Refer to the guide Setting up and getting started.


Design

Architecture

The Architecture Diagram given above explains the high-level design of the App.

Given below is a quick overview of main components and how they interact with each other.

Main components of the architecture

Main (consisting of classes Main and MainApp) is in charge of the app launch and shut down.

  • 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: The UI of the App.
  • Logic: The command executor.
  • Model: Holds the data of the App in memory.
  • Storage: Reads data from, and writes data to, the hard disk.

Commons represents a collection of classes used by multiple other components.

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-contact 1.

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

Structure of the UI Component

The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, PersonListPanel, StatusBarFooter etc. All these, including the MainWindow, inherit from the abstract UiPart class which captures the commonalities between classes that represent parts of the visible GUI.

Structure of the GroupCard component

The GroupCard contains an EventListPanel, the list of events attached to a group, and a MiniPersonListPanel, which is the list of a group's members.

The UI component uses the JavaFx UI framework. The layout of these UI parts are defined in matching .fxml files that are in the src/main/resources/view folder. For example, the layout of the MainWindow is specified in MainWindow.fxml

The UI component,

  • executes user commands using the Logic component.
  • listens for changes to Model data so that the UI can be updated with the modified data.
  • 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

Here's a (partial) class diagram of the Logic component:

The sequence diagram below illustrates the interactions within the Logic component, taking execute("delete-contact 1") API call as an example.

Interactions Inside the Logic Component for the `delete 1` Command

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.

How the Logic component works:

  1. When Logic is called upon to execute a command, it is passed to an AddressBookParser object which in turn creates a parser that matches the command (e.g., DeleteCommandParser) and uses it to parse the command.
  2. This results in a 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 contact).
    Note that although this is shown as a single step in the diagram above (for simplicity), in the code it can take several interactions (between the command object and the Model) to achieve.
  4. The result of the command execution is encapsulated as a CommandResult object which is returned back from Logic.

Here are the other classes in Logic (omitted from the class diagram above) that are used for parsing a user command:

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

The Model component,

  • stores the address book data i.e., all Person and Group objects (which are contained in a UniquePersonList and UniqueGroupList object respectively).
  • stores the currently 'selected' Person and Group 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 all Person and Event objects which belong to each Group (contained in a UniquePersonList and UniqueEventList object respectively).
  • 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)


See The Group Model for more information about Groups.

Storage component

API : Storage.java

The Storage component,

  • can save both address book data and user preference data in JSON format, and read them back into corresponding objects.
  • inherits from both AddressBookStorage and UserPrefStorage, which means it can be treated as either one (if only the functionality of only one is needed).
  • depends on some classes in the Model component (because the Storage component's job is to save/retrieve objects that belong to the Model)

Common classes

Classes used by multiple components are in the seedu.address.commons package.


Implementation

This section describes some noteworthy details on how certain features are implemented.

The Group Model

Overview

Groups are a newly added feature in StudyCircle.

A Group has:

  • GroupName: A unique identifier for the group.
  • UniquePersonList: A list of members within the group.
  • UniqueEventList: A list of events associated with the group.
  • Dashboard: A custom dashboard for managing group-related data.
  • [Optional] RepoLink: A URL to a repository associated with the group.

and are stored in a single UniqueGroupList within an AddressBook.

Group Methods and Responsibilities

The Group class is responsible for managing its internal members and events, but it does not directly modify the global contact list or other global data. Instead, it ensures internal consistency within the group. Synchronisation with global data is handled by higher-level methods elsewhere in the application.

Internal lists and modification

The internal lists (persons and events) are not exposed except as read-only ObservableLists. The only way to modify the group’s state is through its methods such as: addPerson, removePerson, addEvent, and removeEvent.

Factory and update methods
  • Group.fromStorage: A factory method used to create a new Group from input data (e.g., event list, person list, dashboard). This method is intended to be used only by specific methods and is not typically used for new groups, which should start with empty fields (except for the group name).

  • Group#withUpdatedName: Returns a new Group with copied internal data but a different name. This method is used in commands like edit-group.

    • This approach ensures that changes are explicit, preventing unintended side effects and making state management more predictable.
    • While containers like lists or dashboards are copied to avoid modifying the original state, immutable elements are reused to optimize memory.
Why This Design?

This approach ensures that the Group class focuses solely on managing its own data, while global data (like contacts) is updated through methods in the Model layer. It keeps the system modular and reduces the risk of unintended side effects.

Key Components

Unique Lists

The implementation of UniqueGroupList and UniqueEventList follow the UniquePersonList pattern - that is, they are wrappers on an ObservableList which prevent the addition of duplicate entries.

Group Display in GUI

Groups are displayed in a list in the GUI, similar to the contact list in AB3. It can be filtered using predicates, similar to the contact list. Each group card in the list displays embedded lists for both members and events. JavaFX is used to ensure that the ObservableLists for groups, persons, and events are dynamically reflected in the GUI. Any changes made to the lists will be automatically updated.

Invariants

To maintain the integrity of the application, the following invariants must be respected:

  • Persons in a Group: Each person in a group must exist in the Contact List. If a person is part of a group, that person should also be present in the global list of contacts.

  • Group Membership: A group’s members must have its name as part of their list of GroupNames. Conversely, all of a person's GroupNames should correspond to valid groups in the application of which they are members.

Caution: Immutability of Persons and Events

  • Persons and Events are Immutable: Both the Person and Event classes are designed to be immutable to ensure consistency in the application’s state.

  • Synchronisation: Care must be taken to ensure that the references to Persons in the group list and the global contact list remain synchronised.

    • Use Existing High-Level Methods (e.g., Model#setPerson): To modify a person’s details, always use the existing method Model#setPerson. This method ensures updates are properly synchronised across the model. Avoid manually calling lower-level methods like UniquePersonList#setPerson.
    • Note: setPerson is a well-implemented method and serves as a good example for handling updates. While the codebase isn't fully consistent, use similar methods for other objects when available, or manually ensure synchronisation when necessary.

The immutability of Persons and Events simplifies the future implementation of features such as:

  • State Saving: Enabling features like undo/redo.

  • Concurrency: Maintaining data consistency when multiple users or threads are interacting with the application.


[Proposed] Undo/redo feature

Proposed 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:

  • 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.

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.

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.

UndoRedoState0

Step 2. The user executes delete 5 command to delete the 5th contact 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.

UndoRedoState1

Step 3. The user executes add n/David …​ to add a new contact. The add command also calls Model#commitAddressBook(), causing another modified address book state to be saved into the addressBookStateList.

UndoRedoState2

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.

Step 4. The user now decides that adding the contact 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.

UndoRedoState3

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.

The following sequence diagram shows how an undo operation goes through the Logic component:

UndoSequenceDiagram-Logic

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.

Similarly, how an undo operation goes through the Model component is shown below:

UndoSequenceDiagram-Model

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.

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.

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.

UndoRedoState4

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.

UndoRedoState5

The following activity diagram summarizes what happens when a user executes a new command:

Design considerations:

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 2: Individual command knows how to undo/redo by itself.

    • Pros: Will use less memory (e.g. for delete, just save the contact being deleted).
    • Cons: We must ensure that the implementation of each individual command are correct.

Planned Enhancements

Team size: 5

  1. Improve text wrapping behaviour in dashboard: The current dashboard GUI element does not properly wrap text for long member or event entries. As a result, users must manually scroll horizontally to see the entire entry. We plan to implement automatic text wrapping to improve the readability of these entries, ensuring that all content is visible without the need for horizontal scrolling.
  2. Fix vertical scrolling issue in Event list GUI (Group card): Currently, the Event list GUI sub-element in the Group card doesn’t handle long event strings properly. When the event string is too long, text wrapping causes the list to scroll vertically, instead of expanding as expected. We plan to fix this by ensuring the event list expands horizontally to accommodate long text without forcing vertical scrolling.
  3. Clarify event index error message: Currently, for commands using the event-index prefix, the error message does not specify if the event index is incorrect. Instead, it generically states: "Index is not a non-zero unsigned integer." This could be confusing, especially when the command also uses a group index, as users wouldn’t know which index is causing the error. We’ll update it to "Event index is not a non-zero unsigned integer" to clearly specify which index is invalid when both event and group indexes are used.
  4. Improve error message for index parsing in command preamble (Contact command): Currently, index parsing errors in the command preamble (for contact-related commands) result in a generic command usage message. We will update this behavior to specify that the contact index is invalid (if non-empty) with the message "Contact index is not a non-zero unsigned integer", making the error message more informative.
  5. Improve error message for index parsing in command preamble (Group command): Currently, index parsing errors in the command preamble (for group-related commands) result in a generic command usage message. We will update this behavior to specify that the group index is invalid (if non-empty) with the message "Group index is not a non-zero unsigned integer", making the error message more informative.

Documentation, logging, testing, configuration, dev-ops


Appendix: Requirements

Product scope

Target user profile:

  • A computing student at the National University of Singapore(NUS) with multiple group projects across different modules.

Value proposition:

  • It is hard to manage the members of each specific group
    The app allows Creation of groups and subgroups

  • With many groups at the same time, it can become difficult to know when each one needs your attention.
    The app helps you manage your deadlines and meetings for each group

User stories

Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *

Priority As a …​ I want to …​ So that…​
* * * user add contacts from my school projects with their phone numbers and email into the system I can manage the contact information of all the relevant people for the semester
* * * user delete contacts from the contact list when I no longer need a person's contact my contact list is not too cluttered.
* * * NUS student currently doing many group projects create groups within my list of contacts I am able to navigate to each group based on which module I am working on.
* * * NUS student managing deadlines attach project/submission deadlines to each group I can manage each deadline and I know when I should contact my various groupmates.
* * * user delete just a group, not the contacts I can remove a group without losing my contacts
* * * user add member to a group I can easily manage my group
* * * user list contacts I can see all the contacts I have
* * * user list groups I can see all the groups I have
* * new user view a guide I can easily find out what the app can do for me
* * expert user save my GitHub repository link I can easily copy and paste later on when I need it
* * new user see a prompt telling how to execute a “help” command I can find out all the various commands that I can use in the app.
* * user delete old contacts by group I do not need to spend too much time deleting users one by one
* * user see a confirmation of the data I added I can catch and fix mistakes quickly
* * user edit the details of a particular contact through an intuitive interface I can easily tweak the information of a contact if needed.
* * user look for a specific contact by their name by typing it into the search bar I do not have to sort through the entire list of contacts to find one person.
* * user add a number of contacts in a group at once I do not need to spend too much time adding members of a new group one by one
* * NUS student currently doing many group projects add a label to the contacts of people in my various groups I can easily look up people based on their label.
* * member of a group project set a meeting time/place for each of my groups I can easily know if I have a meeting for the day with my group and where to go for it.
* * user check the dashboard for nearby group assignment deadlines I know which tasks to prioritize
* * NUS student set a reminder for all my project/submission deadlines and group meetings I know when all my deadlines are without having to check them.
* * NUS student press one button to reset and clear my entire contact list when the semester is over I do not have to delete those contacts one by one when I am preparing for a new semester.
* * user set profile photo for each contact I can quickly identify the person through face, if there are similar names
* * user Make a contact a member of multiple groups I don't have to add the same contact multiple times if I am in multiple groups with the same person
* * user search my groups I can easily find the group I am looking for
* * user set a profile picture for each of my groups I can easily find and recognize the group that I am looking for without having to look at the names
* * user show a group's dashboard I can easily see all the group's details and make notes about each group
* potential new user experiment with sample data I can see how the app looks and behaves
* new user see various tooltips within the app I am able to orientate myself with the app and its uses
* user access important links for my group project I can easily access my group project materials from one place
* NUS student managing project groups hide contacts from group projects which have already been completed I do not have to see people in my contacts when I do not have to contact them anymore.
* expert user create shortcuts for tasks I can save time on frequently performed tasks.
* user who is trying to contact a group of people at once press one button and copy all the email addresses of people in a group to my clipboard I can easily paste it when trying to send an email to all of these members.
* experienced user turn off the integrated tooltips I can de-clutter my screen
* user receive daily/weekly summaries about the deadlines, events and tasks I can plan my workload accordingly
* user Set a colour for each group which will show up on a contacts profile I can easily tell what group someone belongs to visually
* user Find which times I am free I can easily schedule new meetings with a group

Use cases

System: StudyCircle (SC)
Use Case: UC1 - Create a group
Actor: User

MSS

  1. User requests to create a new group with specified details.

  2. SC creates the new group and displays it.

    Use case ends.

Extensions

  • 1a. SC detects an error in the input.

    • 1a1. SC specifies the error(s) and requests new input.

    • 1a2. User enters new input.

      Steps 1a1-1a2 are repeated until the input is valid.
      Use case resumes from step 1.

  • *a. At any point the User decides not to add the group.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC2 - Create a contact
Actor: User

MSS

  1. User requests to create a new contact with specified details.

  2. SC creates the new contact and displays it.

    Use case ends.

Extensions

  • 1a. SC detects an error in the input.

    • 1a1. SC specifies the error(s) and requests new input.

    • 1a2. User enters new input.

      Steps 1a1-1a2 are repeated until the input is valid.
      Use case resumes from step 2.

  • *a. At any point the user decides not to add the contact.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC3 - Attach a contact to a group
Actor: User
Precondition: The specified group already exists within SC

MSS

  1. User requests to list all contacts (UC6).

  2. User requests to list all groups (UC7).

  3. User requests to add specific contacts in the first list to a specific group in the second list.

  4. SC adds the contact to the group and notifies user of success of the task.

    Use case ends.

Extensions

  • 1a. The contact the user wishes to add is not in the list or the list is empty.

    • 1a1. User requests to create a new contact (UC2).

      Use case resumes from step 2.

  • 3a. SC detects that the specified contact does not exist.

    • 3a1. SC shows an error message.

      Use case resumes at step 3.

  • 3b. SC detects that the specified group does not exist.

    • 3b1. SC shows an error message.

      Use case resumes at step 3.

  • 3c. SC detects that the contact is already in the group.

    • 3c1. SC tells user that the contact is already in the group.

      Use case ends.

  • *a. At any point the user decides to stop the operation.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC4 - Delete a group
Actor: User

MSS

  1. User requests to list all groups (UC6).

  2. User chooses to delete a group from the list.

  3. SC deletes the group, keeping the member contacts, and displays details of the deleted group.

    Use case ends.

Extensions

  • 2b. The specified group does not exist.

    • 2b1. SC shows an error message.

      Use case resumes from step 2.

System: StudyCircle (SC)
Use Case: UC5 - View all contacts' details
Actor: User

MSS

  1. User requests to list all contacts.

  2. SC displays a list of all contacts and their details.

    Use case ends.

Extensions

  • 1a. SC does not have any contacts currently saved.

    • 1a1. SC shows an empty contact list.

      Use case ends.

System: StudyCircle (SC)
Use Case: UC6 - View all groups’ details
Actor: User

MSS

  1. User requests to list groups.

  2. SC shows user a list of all groups and their details.

    Use case ends.

Extensions

  • 1a. SC does not have any groups currently saved.

    • 1a1. SC shows an empty group list.

      Use case ends.

System: StudyCircle (SC)
Use Case: UC7 - View specific contact’s details
Actor: User
Preconditions: The specified contact already exists within SC

MSS

  1. User requests to list all contacts (UC5).

  2. User requests to view a specific contact’s details in the list.

  3. SC shows the user the given contact’s details.

    Use case ends.

Extensions

  • 2a. SC does not have the specified contact.

    • 2a1. SC shows the user an empty contact list.

      Use case resumes from step 2.

  • *a. At any point the user decides to cancel the operation.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC8 - View specific Group’s details
Actor: User
Preconditions: The specified Group already exists within SC

MSS

  1. User requests to list groups (UC6).

  2. User requests to view a specific group's details in the list.

  3. SC shows user the given group’s details.

    Use case ends.

Extensions

  • 2a. SC does not have the specified group.

    • 2a1. SC shows user an empty group-list.

      Use case resumes from step 2.

  • *a. At any point the user decides to cancel the operation.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC9 - Create an event for a group (task/meeting/assignment)
Actor: User
Preconditions: The group which the event is to be attached to already exists

MSS

  1. User requests for a list of groups (UC6).

  2. User enters event details and specified group.

  3. SC adds the event to the group and displays the new event.

    Use case ends.

Extensions

  • 2a. SC detects an error in the input.

    • 2a1. SC specifies the error(s) and requests new input.

    • 2a2. User enters valid input.

      Use case resumes from step 3.

  • *a. At any point the user decides to cancel the operation.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC10 - Add notes to a group
Actor: User
Preconditions: The specified group already exists within SC

MSS

  1. User requests to view a specific group's details (UC8).

  2. SC shows the user the details for the specified group

  3. User adds notes to the group.

    Use case ends.

Extensions

  • 2b. The specified group does not exist.

    • 2b1. SC shows an error message.

      Use case resumes from step 2.

  • *a. At any point the user decides to cancel the operation.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC11 - Edit details of a specific contact
Actor: User
Preconditions: The specified contact already exists within SC

MSS

  1. User requests for a list of contacts (UC5).

  2. User specifies a specific contact and selects which detail they would like to edit.

  3. User enters new details that they want to edit.

  4. SC edits the contact and display a confirmation message.

    Use case ends.

Extensions

  • 2a. The detail is empty.

    • 2a1. SC shows an error message.

      Use case end.

  • *a. At any point the user decides to cancel the operation.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC12 - Start a new project group with a deadline
Actor: User

MSS

  1. User creates a group (UC1).

  2. User adds notes to this group (UC10).

  3. User attaches a contact to this group (UC3). Loop step 3 until all needed contacts are added.

  4. User creates an Event (UC9).

    Loop step 4 until all Events are added.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC13 - Delete a contact
Actor: User

MSS

  1. User requests to list all contacts (UC5).

  2. User chooses to delete a contact from the list.

  3. SC deletes the contact from the list and removes all the groups that they are attached to (if any).

    Use case ends.

System: StudyCircle (SC)
Use Case: UC14 - Set a repository link for a group
Actor: User
Preconditions: The specified group already exists within SC

MSS

  1. User requests for a list of groups (UC6).

  2. User enters repository link and specified group.

  3. SC sets the repository link for the specified group and displays a confirmation message.

    Use case ends.

Extensions

  • 2a. The repository link input is invalid or empty.

    • 2a1. SC shows an error message.

      Use case resumes from step 2.

  • 2b. The specified group already has a repository link.

    • 2b1. SC replaces the existing repository link with the new one and notifies the user.

      Use case ends.

  • *a. At any point the user decides to cancel the operation.

    Use case ends.

System: StudyCircle (SC)
Use Case: UC15 - Retrieve a Repository Link for a Group
Actor: User Preconditions: The specified group already exists within StudyCircle (SC).

MSS

  1. User requests for a list of groups (UC6).

  2. User enters the target group to retrieve its repository link.

  3. SC retrieves the repository link for the specified group.

  4. SC displays the repository link, copies it to the system clipboard and shows a confirmation message that the link has been copied.

    Use case ends.

Extensions

  • 3a. The specified group does not have a repository link set.

    • 3a1. SC shows a message indicating that no repository link has been set for the group.

      Use case ends.

  • *a. At any point the user decides to cancel the operation.

    Use case ends.

Non-Functional Requirements

  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 contacts without a noticeable sluggishness in performance for typical usage.
  3. Should be able to hold up to 1000 groups without a noticeable sluggishness in performance for typical usage
  4. 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.
  5. Should work on any mainstream OS without requiring an installer.
  6. Should work without use of any third-party libraries/services.
  7. GUI should work well for standard screen resolutions of 1920x1080 and higher.
  8. Product should be packaged into a single jar file and file size of jar file for product should not exceed 100mb.
  9. Product should work without the need for a remote server.
  10. Data for a specific user should not be able to be accessed by other users even on the same device.
  11. The data should be stored locally and in a human editable text file

{More to be added}

Glossary

  • Mainstream OS: Windows, Linux, Unix, MacOS
  • GUI: Graphical User Interface

Appendix: Instructions for manual testing

Given below are instructions to test the app manually.

Note: These instructions only provide a starting point for testers to work on; 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

    2. Double-click the jar file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.

  2. Saving window preferences

    1. Resize the window to an optimum size. Move the window to a different location. Close the window.

    2. Re-launch the app by double-clicking the jar file.
      Expected: The most recent window size and location is retained.

Adding a contact

  1. Add a contact

    1. Prerequisites: none

    2. Test case: add-contact n/John Doe p/98765432 e/e1235557@u.nus.edu
      Expected: Contact name John should appear in the contact list

Listing all contacts

  1. Listing all the contacts

    1. Test case: list-contacts
      Expected: The status message show: Listed all persons, all the contacts show on the contact list panel.

Finding contacts

  1. Finding all the contacts contain some specified characters

    1. Test case: find-contact ab
      Expected: The status message show: x persons listed! where x is the number of contacts that have the name contains the character ab, all the contacts contains the character ab show on the contact list panel.

    2. Test case: find-contact ab cd
      Expected: The status message show: x persons listed! where x is the number of contacts that have the name contains the character ab or cd, all the contacts contains the character ab or cd show on the contact list panel.

    3. Test case: find-contact aB CD
      Expected: The status message show: x persons listed! where x is the number of contacts that have the name contains the character ab or cd, all the contacts contains the character ab or cd show on the contact list panel.

    4. Test case: find-contact
      Expected: The status message show an error message, the contact list panel remain the same.

Deleting a contact

  1. Deleting a contact while all contacts are being shown

    1. Prerequisites: List all contacts using the list-contacts command. Multiple contacts in the contact list.

    2. Test case: delete-contact 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.

    3. Test case: delete-contact 0
      Expected: No person is deleted. Error details shown in the status message. Status bar remains the same.

    4. Other incorrect delete commands to try: delete-contact, delete-contact x, ... (where x is larger than the contact list size)
      Expected: Similar to previous.

Editing a contact

  1. Edit a contact while all contacts are being shown

    1. Prerequisites: must have at least one contact in the contact list

    2. Test case: edit-contact 1 n/mary
      Expected: First contact name in the contact list should change to mary

Listing all groups

  1. Listing all the groups

    1. Test case: list-groups
      Expected: The status message show: Listed all groups, all the groups show on the group list panel.

Adding a group

  1. Add a group

    1. Prerequisites: none

    2. Test case: add-group n/CS2103T tp
      Expected: Group name CS2103T tp should appear in the group list

Finding groups

  1. Finding all the groups contain some specified characters

    1. Test case: find-group ab
      Expected: The status message show: x groups listed! where x is the number of groups that have the name contains the character ab, all the groups contains the character ab show on the group list panel.

    2. Test case: find-group ab cd
      Expected: The status message show: x groups listed! where x is the number of groups that have the name contains the character ab or cd, all the groups contains the character ab or cd show on the group list panel.

    3. Test case: find-group aB CD
      Expected: The status message show: x groups listed! where x is the number of groups that have the name contains the character ab or cd, all the groups contains the character ab or cd show on the group list panel.

    4. Test case: find-group
      Expected: The status message show an error message, the group list panel remain the same.

Deleting a group

  1. Deleting a group while all groups are being shown

    1. Prerequisites: List all groups using the list-groups command. Multiple groups in the group list.

    2. Test case: delete-group 1
      Expected: First group is deleted from the list. Name of the deleted group shown in the status message. Timestamp in the status bar is updated.

    3. Test case: delete-group 0
      Expected: No group is deleted. Error details shown in the status message. Status bar remains the same.

    4. Other incorrect delete commands to try: delete-group, delete-group x, ... (where x is larger than the group list size)
      Expected: Similar to previous.

Adding a member to a group

  1. Adding a member to a group while all contacts and groups are being shown

    1. Prerequisites: List all contacts and groups using the list-contacts and list-groups commands. The contact you are trying to add must not already be in the group you are adding to.

    2. Test case: add-member g/1 c/1
      Expected: First contact is added to the group. Name of the contact added to the group will be shown. Timestamp in the status bar is updated.

    3. Test case: add-member g/0 c/0
      Expected: No member is added to the group. Error details shown in the status message. Status bar remains the same.

    4. Other incorrect add-member commands to try: add-member, add-member g/1 , add-member g/x c/x (where x is larger than the list size)
      Expected: Similar to previous.

Deleting a member from a group

  1. Deleting a member from a group while all contacts and groups are being shown

    1. Prerequisites: List all groups using the list-groups commands. The contact you are trying to remove must already be in the group you are removing from.

    2. Test case: delete-member g/1 c/1
      Expected: First contact is first group's member list is removed from the group. Name of the contact removed from the group will be shown. Timestamp in the status bar is updated.

    3. Test case: delete-member g/0 c/0
      Expected: No member is added to the group. Error details shown in the status message. Status bar remains the same.

    4. Other incorrect add-member commands to try: delete-member, delete-member g/1 , delete-member g/x c/x (where x is larger than the list size)
      Expected: Similar to previous.

Showing a group's dashboard

  1. Showing a group's dashboard

    1. Prerequisites: List all groups using the list-groups command.

    2. Test case: show-dashboard 1
      Expected: The dashboard panel for the selected group is shown to the user. Timestamp in the status bar is updated.

    3. Test case: show-dashboard
      Expected: No member is added to the group. Error details shown in the status message. Status bar remains the same.

    4. Other incorrect add-member commands to try: show-dashboard x (where x is larger than the list size)
      Expected: Similar to previous.

Editing a group's dashboard notes

  1. Editing a groups dashboard notes while it is already being shown

    1. Prerequisites: The group to edit's dashboard is already shown.

    2. Test case: type "I love computing" into the dashboard panel's white note box
      Expected: The notes typed into the note box will be saved and shown to the user when the dashboard is closed and shown again Timestamp in the status bar is updated.

Editing a contact

  1. Edit a contact while all contacts are being shown

    1. Prerequisites: must have at least one contact in the contact list

    2. Test case: edit-contact 1 n/mary
      Expected: First contact name in the contact list should change to mary

Editing a group

  1. Edit a group while all groups are being shown

    1. Prerequisites: must have at least two groups in the group list

    2. Test case: edit-group 2 n/CS2101 CA4
      Expected: Second group name in the group list should change to CS2101 CA4

  1. Setting repository link for a group

    1. Prerequisites: must have at least one group in the group list

    2. Test case: set-repo 1 r/https://github.com/AY2526S1-CS2103T-F12-1/tp
      Expected: You should see a green repo link appear in the first group.

  1. Getting repository link from a group

    1. Prerequisites: must have at least one group in the group list with repo link set successfully

    2. Test case: get-repo 1
      Expected: you should see a success message saying that "This link is copied to your clipboard, you can paste it now". you should be able to paste that link in a browser.

  1. Deleting a repository link from a group

    1. Prerequisites: must have at least one group in the group list with repo link set successfully

    2. Test case: delete-repo 1
      Expected: You should see the green repo link disappear in the first group.

Adding an event

  1. Add an event to a specified group

    1. Prerequisites: List all groups using the list-groups command. Multiple groups in the group list.

    2. Test case: add-event 1 d/abc
      Expected: The status message show: New event: 'abc' added to group: <1st GROUP NAME>, an event abc appear in the group card of the 1st group.

Deleting an event

  1. Delete a specified event from a specified group

    1. Prerequisites: List all groups using the list-groups command. Multiple groups in the group list.

    2. Test case: delete-event 1 e/1
      Expected: The status message show: Event: '<1st EVENT DESCRIPTION>' deleted from group: <1st GROUP NAME>, the first event disappeared in the group card of the 1st group.

Editing an event

  1. Edit a specified event in a specified group

    1. Prerequisites: List all groups using the list-groups command. Multiple groups in the group list.

    2. Test case: edit-event 1 e/1 d/efg
      Expected: The status message show: Edited Event: '<1st EVENT DESCRIPTION>' in Group: <1st GROUP NAME>, the first event changes to efg in the group card of the 1st group.

Saving data

  1. Dealing with missing/corrupted data file

    1. Prerequisites: If you have pre-existing data saved in StudyCircle, make sure you have a backup of the data folder that is found in the home folder of StudyCircle.jar

    2. Test case: Click into the data folder and the addressbook.json file. Inside the file edit the data with invalid inputs (e.g. An email which does not follow the correct format). Expected: All the contacts and groups will be cleared when StudyCircle is launched due to the corrupted data file

  2. Restoring the sample data in the contact book

    1. Prerequisites: You must already have an existing addressbook.json file in the data folder which is found in the home folder of StudyCircle.jar

    2. Test case: Delete the addressbook.json file Expected: Upon the next launch of StudyCircle, the contact book will be repopulated with the sample data