Developer Guide
Welcome to ConnectUS!
ConnectUS is a contact management system that enables NUS School of Computing (SoC) students to better manage their contact information. Users can leverage on ConnectUS’ contact management system to view and edit their contact information. The tagging system also helps users better organize their contact information according to their needs.
ConnectUS focuses on:
- Efficiency: Optimized for use via a Command Line Interface (CLI), easily view and edit contacts with the contact management system.
- User-friendliness: With the benefits of having a Graphical User Interface (GUI), users can easily navigate through contact information to find exactly what they need to connect with others.
This Developer Guide provides an in-depth documentation on how ConnectUS is designed and implemented. It covers high-level details such as the architecture of ConnectUS, to detailed specifications on smaller pieces of the design such as how commands are implemented. It also includes a glossary for definitions of terms used in ConnectUS.
You can use this guide to help maintain, upgrade, and evolve ConnectUS.
Table of Contents
- 1. Preface
- 2. How to Use the Developer Guide
- 3. Design
- 4. Implementation
- 5. Planned Enhancements
- 6. Documentation, Testing, and Other Guides
-
7. Instructions for Manual Testing
- 7.1 Launch and Shutdown
- 7.2 Adding a Person
- 7.3 Editing a Person
- 7.4 Deleting a Person
- 7.5 Adding Additional Tags to a Person
- 7.6 Deleting Tags from a Person
- 7.7 Searching for a Person
- 7.8 Opening a Person’s social media links in app
- 7.9 Opening a social media platform with prefilled message
- 7.10 Viewing Upcoming Birthdays
- 8. Requirements
- 9. Glossary
1. Preface
1.1 Acknowledgements
ConnectUS is a brownfield software project based on AddressBook Level-3 created by the SE-EDU initiative, as part of the CS2103T Software Engineering module by SoC at the National University of Singapore (NUS).
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 for more info.
Java libraries used in this project:
1.2 Setting Up, Getting Started
Refer to the guide Setting up and getting started.
2. How to Use the Developer Guide
Thank you for your interest in ConnectUS! We aim to provide you with all the information necessary to understand, maintain, upgrade, and evolve ConnectUS.
While you do not need to read the Developer Guide in a sequential order, we recommend going through the Design section to get a high-level overview of ConnectUS before looking for information that concerns you.
2.1 Notation
Some special notations are used throughout this guide:
- Links in blue will help you navigate through this document, or take you to places on the Internet.
- Bolded words are phrases that you should pay attention to.
- Underlined words can be found in the Glossary.
2.2 Navigation
The Developer Guide has six main sections:
- Design
- Implementation
- Planned Enhancements
- Documentation, Testing, and Other Guides
- Instructions for Manual Testing
- Requirements
-
If you are a developer, the first four sections will be most applicable to you. Design gives you a high-level overview of how ConnectUS is structured, and information on the key components of ConnectUS. Implementation addresses how the features in ConnectUS are implemented. Planned Enhancements provides insights on known bugs and issues in the latest release of ConnectUS, and plans we have to address and fix these issues. Finally, Documentation, Testing, and Other Guides provides guides on creating documentation, logging, testing, configuring, and DevOps for ConnectUS.
-
If you are a tester, the Instructions for Manual Testing will provide you with a guide for testing. It covers how to launch and shut down the application, as well as how to test some commands in ConnectUS.
-
If you are in the marketing or product team, or are interested in knowing why ConnectUS was created, the Requirements section addresses our Product Scope, User Stories, Use Cases, and Non-Functional Requirements (NFRs).
-
Refer to the Glossary for definitions of terms used in ConnectUS.
3. Design
This section will provide you with a high-level overview of how ConnectUS is structured, as well as information on the key components of ConnectUS.
Firstly, the Architecture section gives an overview of how each of the main components in ConnectUS interact with each other.
ConnectUS has four main components, namely:
Each section of these components will describe the smaller subcomponents within them.
Finally, the Commons section covers classes that are used by multiple components in ConnectUS.
Tip:
The .puml
files used to create diagrams in this document can be found in the diagrams folder. Refer to the PlantUML Tutorial at se-edu/guides to learn how to create and edit diagrams.
3.1 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
has two classes called Main
and MainApp
. It is responsible for:
- At app launch: Initializes the components in the correct sequence, and connects them up with each other.
- At shut down: Shuts down the components and invokes cleanup methods where necessary.
Commons
represents a collection of classes used by multiple other components.
The rest of the App consists of 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.
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
.
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 APIinterface
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.
Note:
In this Developer Guide, contacts that users add to the ConnectUS contact list will be referred to as Person
.
3.2 UI component
The API of this component is specified in Ui.java
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.
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 theUI
relies on theLogic
to execute commands. - depends on some classes in the
Model
component, as it displaysPerson
object residing in theModel
.
3.3 Logic component
API : Logic.java
Here’s a (partial) class diagram of the Logic
component:
How the Logic
component works:
- When
Logic
is called upon to execute a command, it uses theConnectUsParser
class to parse the user command. - This results in a
Command
object (more precisely, an object of one of its subclasses e.g.,AddCommand
) which is executed by theLogicManager
. - The command can communicate with the
Model
when it is executed (e.g. to add a person). - The result of the command execution is encapsulated as a
CommandResult
object which is returned back fromLogic
.
The Sequence Diagram below illustrates the interactions within the Logic
component for the execute("delete 1")
API call.
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:
How the parsing works:
- When called upon to parse a user command, the
ConnectUsParser
class creates anXYZCommandParser
(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 aXYZCommand
object (e.g.,AddCommand
) which theConnectUsParser
returns back as aCommand
object. - All
XYZCommandParser
classes (e.g.,AddCommandParser
,DeleteCommandParser
, …) inherit from theParser
interface so that they can be treated similarly where possible e.g, during testing.
3.4 Model component
API : Model.java
The Model
component,
- stores the address book data i.e., all
Person
objects (which are contained in aUniquePersonList
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 unmodifiableObservableList<Person>
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 aReadOnlyUserPref
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)
Note:
An alternative (arguably, a more OOP) model is given below. It has a Tag
list in ConnectUS
, which Person
references. This allows ConnectUS
to only require either one Module
object, CCA
object, Major
object, or Remark
object per unique tag, instead of each Person
needing their own tag type objects. It also ensures that no duplicate tags are created.
3.5 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
ConnectUsStorage
andUserPrefStorage
, 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 theStorage
component’s job is to save/retrieve objects that belong to theModel
)
3.6 Common classes
Classes used by multiple components are in the seedu.connectus.commons
package.
API : Commons.java
4. Implementation
This section describes some noteworthy details on how certain features are implemented.
- 4.1 Add Command
- 4.2 Edit Command
- 4.3 Help Command
- 4.4 Adding Addtional Tags Command
- 4.5 Deleting Individual Tags Command
- 4.6 Search Command
- 4.7 Upcoming Birthdays Command
4.1 Add Command
Overview:
The add
command is used to create a new Person
in ConnectUS with information fields specified by the user, namely the Name
, Phone
, Email
, Address
, Birthday
, Social Media
(i.e. Telegram, Instagram, WhatsApp), and tags such as Module
, CCA
, Major
and Remark
fields.
The format for the add
command can be found here.
Feature Details:
- The user specifies a name for the
Person
to be added. The user can optionally specify thePhone
,Email
,Address
,Birthday
,Social Media
, and tags such asModule
,CCA
,Major
, andRemark
fields. - If the person name is not provided, or if invalid command parameters are provided, the user will be prompted to re-enter the command correctly via an error message.
- The
Person
is cross-referenced in theModel
to check if it already exists. If it does, then an error is raised as feedback to the user. - If step 3 completes without exceptions, the new
Person
will be successfully added and stored inside the contact list.
The following activity diagram shows the logic of adding a Person
into the contact list.
The sequence of the add
command is as follows:
- The command
add INPUT
is entered by the user (e.g.add n/Jason
). -
Logic Manger
calls theConnectUsParser#parseCommand
with theINPUT
. -
ConnectUsParser
parses the command word, creating an instance ofAddCommandParser
toparse
theinformationFields
via the respectiveParserUtil
functions. -
AddCommandParser
creates the correspondingPerson
object. ThisPerson
object is taken as the input of a newAddCommand
object created byAddCommandParser
. -
Logic Manager
executesAddCommand#execute
, adding thePerson
to the model throughAddCommand
callingModel#addPerson
. - A
Command Result
is returned with the result of the execution.
If duplicate parameters are entered (e.g. add n/Jason p/91234567 p/12345678
, where the phone parameter is entered twice), only the last instance, p/12345678
will be taken.
The AddCommandParser
creates the corresponding Person
object, which is then taken as an input by the AddCommand
object that it creates and returns. Logic Manager
then runs AddCommand
, which then adds the Person
to the model.
The following sequence diagram shows how add
works:
4.2 Edit Command
Overview:
The edit
command is used to change the information of an existing Person
in ConnectUS with the information fields specified by the user, namely the Name
, Phone
, Email
, Address
, Birthday
, Social Media
(i.e. Telegram, Instagram, WhatsApp), and Birthday
fields.
The format for the edit
command can be found here.
Feature Details:
- The user specifies a person index that represents a
Person
to be edited. - If a negative or zero index is provided, an error is thrown. The user is prompted to re-enter the command correctly.
- At least one field to be edited must be provided. If no field is provided, an error is thrown. The user is prompted to re-enter the command correctly.
- If the index is not in valid range of the contact list provided, an error is thrown. The user is prompted to re-enter the command correctly.
- The
Person
is cross-referenced in theModel
to check if it already exists. If it does, then an error is raised as feedback to the user. - If step 6 completes without exceptions, the new
Person
will be successfully edited and stored inside the contact list.
The following activity diagram shows the logic of editing an existing Person
in the contact list.
The sequence of the edit
command is as follows:
- The command
edit INPUT
is entered by the user, where theINPUT
is an integer index followed by fields to edit (e.g.edit 1 n/John Doe
). -
Logic Manager
calls theConnectUsParser#parseCommand
with the givenINPUT
-
ConnectUsParser
parses the command word. creating an instance ofEditCommandParser
toparse
theinformationFields
via the respectiveParserUtil
functions. -
EditCommandParser
creates the correspondingEditPersonDescriptor
object. ThisEditPersonDescriptor
object is taken as the input of a newEditCommand
object created byEditCommandParser
. -
Logic Manager
executesEditPerson#execute
, creating aPerson
from the aforementionedEditPersonDescriptor
object and adding thisPerson
to the model throughModel#setPerson
. -
Model#updateFilteredPersonList
is called to update the list ofPerson
objects. - A
Command Result
is returned with the result of the execution.
The following sequence diagram shows how edit
works:
The following sequence diagram provides details on how the informationFields
are being parsed:
4.3 Help Command
Overview:
The help
command provides the user with instructions on how to access the User Guide, or how to use a specified command.
Feature Details:
- The user specifies a command that they need help with using
help
followed by the word needed to execute a particular command available in ConnectUS. - If a command is not specified, the help window with the URL to access the ConnectUS User Guide will be shown, as well as a general feedback message to denote successful execution of the command.
- If a command is specified, the provided command is cross-referenced with all available commands in ConnectUS. If the command specified by the user does not exist, an error is thrown. A
help
feedback message with instructions on accessinghelp
command with the User Guide will be shown. - The command usage instructions will be shown in the command feedback box. There will also be a message to denote successful execution of the
help
command.
The following activity diagram shows the logic of the help
command.
4.4 Adding Additional Tags Command
Overview:
The add-t
command is used to add additional tags to an existing Person
in ConnectUS specified by the user.
The format for the add-t
command can be found here.
Feature Details:
- The user specifies a person index that represents a
Person
to be edited, followed by the tag to be added. - If a negative or zero index is provided, an error is thrown. The user is prompted to re-enter the command correctly.
- If the index is not in valid range of the contact list provided, an error is thrown. The user is prompted to re-enter the command correctly.
- If step 3 completes without exceptions, the new
Person
will be successfully edited and stored inside the contact list.
The following activity diagram shows the logic of the add-t
command.
The sequence of the add-t
command is as follows:
- The command
add-t INPUT
is entered by the user, where theINPUT
is an integer index followed by a tag to add (e.g.add-t 1 r/friend
). -
Logic Manager
calls theConnectUsParser#parseCommand
with the givenINPUT
-
ConnectUsParser
parses the command word. creating an instance ofAddTagToPersonCommandParser
toparse
the tags via the respectiveParserUtil
functions. -
AddTagToPersonCommandParser
creates the correspondingAddTagDescriptor
object. ThisAddTagDescriptor
object is taken as the input of a newAddTagToPersonCommand
object created byAddTagToPersonCommandParser
. -
Logic Manager
executesAddTagToPersonCommand#execute
, creating aPerson
from the aforementionedAddTagDescriptor
object and adding thisPerson
to the model throughModel#setPerson
. -
Model#updateFilteredPersonList
is called to update the list ofPerson
objects. - A
Command Result
is returned with the result of the execution.
The following sequence diagram shows how add-t
works:
4.5 Deleting Individual Tags Command
Overview:
The delete-t
command is used to delete individual tags from an existing Person
in ConnectUS specified by the user.
The format for the delete-t
command can be found here.
Feature Details:
- The user specifies a person index that represents a
Person
to be edited, followed by the tag index to be deleted. - If a negative or zero index is provided, an error is thrown. The user is prompted to re-enter the command correctly.
- If the index is not in valid range of the contact list provided, an error is thrown. The user is prompted to re-enter the command correctly.
- If step 3 completes without exceptions, the tag of
Person
will be successfully deleted and this change will be stored inside the contact list.
The following activity diagram shows the logic of the delete-t
command.
The sequence of the delete-t
command is as follows:
- The command
delete-t INPUT
is entered by the user, where theINPUT
is an integer index followed by a tag index to delete (e.g.delete-t 1 r/1
). -
Logic Manager
calls theConnectUsParser#parseCommand
with the givenINPUT
-
ConnectUsParser
parses the command word. creating an instance ofDeleteTagFromPersonCommandParser
toparse
the tags via the respectiveParserUtil
functions. -
DeleteTagFromPersonCommandParser
parses the corresponding tag indices. They are taken as the constructor arguments of a newDeleteTagFromPersonCommand
object. -
Logic Manager
executesDeleteTagFromPersonCommand#execute
, creating a newPerson
with new tag lists from its parameters and replacing the originalPerson
with this newPerson
in the model throughModel#setPerson
. -
Model#updateFilteredPersonList
is called to update the list ofPerson
objects. - A
Command Result
is returned with the result of the execution.
The following sequence diagram shows how delete-t
works:
4.6 Search Command
Overview:
The search
command is used to search ConnectUS for all Person
s for whom the specified keyword matches the specified field information in the Name
, Phone
, Email
, Address
, Birthday
, Social Media
(i.e. Telegram, Instagram, WhatsApp), Birthday
and tags (Module
, CCA
, Major
, Remarks
) fields. If no field is specified, the command searches ConnectUS for all Person
s for whom the specified keyword matches any of the information fields.
The format for the search
command can be found here.
Feature Details:
- The user specifies keywords to search ConnectUS with.
- At least one keyword must be provided. If no keyword is provided, an error is thrown. The user is prompted to re-enter the command correctly.
- All fields provided must have a keyword associated. If an empty field is provided, an error is thrown. The user is prompted to re-enter the command correctly.
- Every
Person
in theModel
is tested against the specified keywords. If all the keywords with fields match the corresponding information fields, and the keywords without fields match at least one information field, thePerson
is displayed. If any of the keywords do not match, thePerson
is filtered out.
The following activity diagram shows the logic of searching for in the contact list.
The sequence of the search
command is as follows:
- The command
search INPUT
is entered by the user, where theINPUT
is optional keywords without fields followed by keywords with fields (e.g.search alex cca/chess
). -
Logic Manager
calls theConnectUsParser#parseCommand
with the givenINPUT
-
ConnectUsParser
parses the command word. creating an instance ofSearchCommandParser
toparse
theinformationFields
via the respectiveParserUtil
functions. -
SearchCommandParser
creates the correspondingFieldsContainKeywordsPredicate
object. ThisFieldsContainKeywordsPredicate
object is taken as the input of a newSearchCommand
object created bySearchCommandParser
. -
Logic Manager
executesSearchCommand#execute
, updating the filtered person list of the model using themodel#updateFilteredPersonList
with theFieldsContainKeywordsPredicate
object used to create theSearchCommand
as the argument. - The
FieldsContainKeywordsPredicate#test
matches each keyword with the information fields of thePerson
object being tested. If any keyword does not match, thePerson
object fails the test. - A
Command Result
is returned with the result of the execution.
The following sequence diagram shows how search
works:
The following sequence diagram provides details on how the informationFields
are being parsed by ParserUtil
:
4.7 Upcoming Birthdays Command
Overview:
The upcoming-b
command allows the user to view the birthdays of all contacts that are within the next 60 days.
Feature Details:
- The user specifies the
upcoming-b
command to view the birthdays of all contacts that are within the next 60 days. - The command iterates through the contact list and checks the birthday of each contact, if present.
- It then calculates the difference between the current date and the birthday of the contact by considering date of the year.
- If the difference is less than or equal to 60 days, the contact is added to the list of contacts whose birthdays are within the next 60 days.
- The list of contacts whose birthdays are within the next 60 days is then displayed to the user.
The following activity diagram shows the logic of the upcoming birthdays command.
5. Planned Enhancements
This section contains a list of known features that we plan to enhance in future iterations of the application.
5.1 Improve Edit Command
Currently, the edit command will not return the “Invalid Command Format” error message in the Command Result Feedback box. Instead, it states “At least one field to edit must be provided”, which indirectly indicates that the command is of the correct format, when it is actually missing at least one information field to be edited.
The correct format should be: edit INDEX [n/NAME] [p/PHONE] [a/ADDRESS] [e/EMAIL] [ig/INSTAGRAM] [tg/TELEGRAM] [wa/WHATSAPP] [b/BIRTHDAY]
, where at least one of the optional fields is indicated.
5.2 Better Information Field Validation
Currently, certain information fields can hold values that would be considered invalid in real life. Some other information fields cannot hold values that would be considered valid in real life.
Emails: Based on the current format constraints on valid emails, an email such as jason@gmail
would be considered valid as it is:
- of the format local-part@domain, where
- local-part contains only alphanumeric characters and these special characters:
+_.-
, - local-part does not start or end with any special characters,
- local-part contains only alphanumeric characters and these special characters:
- followed by a ‘@’ and then a domain name, where the domain name
- ends with a domain label at least 2 characters long,
- starts and ends with alphanumeric characters,
- consists of alphanumeric characters, separated only by hyphens, if any.
However, such an email would be considered invalid in real life, as they are of the following format: local-part@domain.extension
, e.g. jason@gmail.com
.
Addresses: Based on the current format constraints on valid addresses, an address such as ;
would be considered valid as it:
- can take any value, and should not be blank.
However, such an address would be considered invalid in real life, as it would at least include a block number, street name, and a postal code.
Instagram Usernames: Based on the current format constraints on valid Instagram usernames, an Instagram username such as john_doe
would be considered as invalid as:
- it contains the special character
_
, when it should only contain the special character.
.
However, such an Instagram username would be considered valid in real life.
5.3 More Language Support
Currently, English is the only language that is supported by our application.
As we are aware that there are many international students studying in NUS SoC, we intend to add more language support (such as Chinese, French, Japanese, Korean etc.) so that international students can better enjoy our app!
We plan to address and improve language support in V1.6.
5.4 More Social Media Support
Currently, only Instagram, Telegram and WhatsApp are supported.
As we are aware that some students studying in NUS SoC may have other forms of social media (such as WeChat, LinkedIn, Reddit etc.), and may want to add them to contacts, we are currently working on bringing this feature to you!
We plan to address and fix all the current constraints mentioned above in the next iteration of this product (V1.5).
5.5 Improve UI
There are some known issues with the current UI.
For example, our testers have noted that:
- The feedback box is too small, and is unable to show the full feedback message without long scrolling.
- The scroll bar sometimes jumps and changes in size randomly.
- There is an amount of space on the right side of the contact card that is not being utilized.
We plan to address and improve our UI in V1.6.
5.6 Improve Tag Deletion Command
Currently, the delete-t
command can only delete tags one at a time. This may be inefficient if a users wants to delete multiple tags of differing tag types, especially if said user has contacts with many assigned tags.
We plan to address this constraint in the next iteration of this product (V1.5).
5.7 Improve Consistency of Command Feedback
Currently, executing certain commands may return inconsistent feedback. For example, if there is an index overflow, the feedback returned is “Invalid command format!”, when it should be “The person index provided is invalid”, as is when an invalid index is provided to command parsers.
We plan to address this constraint in the next iteration of this product (V1.5).
5.8 Removing of Optional Information Fields
Currently, users are unable to edit an optional field back to null
/remove an optional information field from a contact.
We plan to address this constraint in the next iteration of this product (V1.5).
6. Documentation, Testing, and Other Guides
7. 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.
7.1 Launch and shutdown
-
Initial launch:
-
Download the
ConnectUS.jar
file and copy into an empty folder -
Double-click the
ConnectUS.jar
file Expected: Shows the GUI with a set of sample contacts. The window size may not be optimum.
-
-
Saving window preferences:
-
Resize the window to an optimum size. Move the window to a different location. Close the window.
-
Re-launch the app by double-clicking the jar file.
Expected: The most recent window size and location is retained.
-
7.2 Adding a Person:
-
Adding a
Person
with just name, email and phone:-
Test case:
add n/John Doe e/email@example.com p/88291322
Expected: a newPerson
named JohnDoe with given email and phone number is created. Details of the newPerson
shown in the status message.Person
is visible in contact list. -
Test case:
add n/ e/email@example.com
Expected: NoPerson
is created. Error details shown in status message.
-
-
Adding a
Person
with additional fields such as address, birthday, social medias etc. (For a detailed list see this)-
Test case:
add n/Peter Davis e/peter@example.com p/92849132 b/11/09/1989 a/Road No. 12, Kent Ridge, Singapore ig/peterdavis cca/ICS mod/CS3230
.
Expected: A newPerson
named Peter Davis with given email, phone number, birthday, address and Instagram handle is created. It also adds two tags showing that he is in theICS
CCA and in theCS3230
module. Details of the newPerson
shown in the status message.Person
is visible in the contact list.
-
Test case:
7.3 Editing a Person:
-
Editing a
Person
’s details:-
Prerequisites: List all
Persons
using thelist
command. MultiplePersons
in the list. -
Test case:
edit 1 b/12/10/2003 tg/example p/88923444
Expected: The firstPerson
in the list is edited to have the birthday12/10/2003
, the phone number88923444
. Details of the editedPerson
shown in the status message. If any of these fields were previously empty, they will be filled with the new information. If any of these fields were previously filled, they will be overwritten with the new information.
-
-
To see if the
Person
’s details are edited, use thelist
command to verify the details of the editedPerson
. -
For a detailed list of fields that can be edited, see this.
7.4 Deleting a Person:
-
Deleting a
Person
while all persons are being shown:-
Prerequisites: List all
Persons
using thelist
command. MultiplePersons
in the list. -
Test case:
delete 1
Expected: FirstPerson
is deleted from the list. Details of the deletedPerson
shown in the status message. Timestamp in the status bar is updated. -
Test case:
delete 0
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same. -
Other incorrect delete commands to try:
delete
,delete x
,...
(where x is larger than the list size).
Expected: Similar to previous.
-
7.5 Adding additional tags to a Person:
-
Adding tags to a
Person
:-
Prerequisites: List all
Persons
using thelist
command. MultiplePersons
in the list. -
Test case:
add-t 1 r/friends mod/CS2103T
Expected: The firstPerson
in the list is edited to have the remark tagfriends
and module tagCS2103T
. Trying the same command again on the same person will still show that the tags have been added but only unique tags are shown. -
Test case:
add-t 1029 r/friends
Expected: NoPerson
is edited. Error showing invalid index shown in the status bar. Assuming there are less than 1029Persons
in the list. -
Test case:
add-t
,add-t 10
Expected: NoPerson
is edited. Error showing invalid command format shown in the status bar.
-
7.6 Deleting tags from a Person:
-
Deleting tags from a
Person
:-
Prerequisites: List all
Persons
using thelist
command. MultiplePersons
in the list. Assuming the firstPerson
in the list has the remark tagfriends
and module tagCS2103T
. -
Test case:
delete-t 1 r/1
Expected: The firstPerson
in the list is edited to have the remark tagfriends
removed. -
Test case:
delete-t 1 r/1 m/1
Expected: The firstPerson
in the list is edited to have the remark tagfriends
and module tagCS2103T
removed. -
Test case:
delete-t 1 r/10
Expected: NoPerson
is edited. Error showing invalid index shown in the status bar. Assuming there are less than 10 remark tags in the firstPerson
’s remark tag list.
-
7.7 Searching for a Person:
-
Searching for a
Person
:-
Prerequisites: List all
Persons
using thelist
command. MultiplePersons
in the list. -
Test case:
search cs
. Expected: AllPersons
whose information containscs
in any of the fields (name, email, address, Telegram etc.). For instance, if a person with a cca tagICS
would be shown in the list. -
Test case:
search alex may
Expected: AllPersons
whose information containsalex
andmay
in any of the fields (name, email, address, Telegram etc.). For instance, if a person with a nameAlex May
would be shown in the list. -
Test case:
search r/friends
Expected: AllPersons
whose information containsfriends
in any of the remark tags. For instance, if a person with a remark tagfriends
would be shown in the list.
-
7.8 Opening a Person’s social media links in app:
-
Opening a
Person
’s social media links:-
Prerequisites: List all
Persons
using thelist
command. MultiplePersons
in the list. -
Test case:
open 1 tg/
for aPerson
with a valid Telegram account
Expected: The firstPerson
’s Telegram account is opened in the app, assuming the firstPerson
telegram field is not empty, is a valid Telegram username and the Telegram app is installed on the user’s computer. -
Test case:
open 1 wa/
for aPerson
with a valid WhatsApp number
Expected: The firstPerson
’s WhatsApp account is opened in the app, assuming the firstPerson
WhatsApp field is not empty, is a valid WhatsApp number and the WhatsApp app is installed on the user’s computer. -
Test case:
open 1 ig/
for aPerson
with no Instagram
Expected: Nothing happens. Error showing that thePerson
’s corresponding field is empty, assuming the firstPerson
Instagram field is empty.
-
7.9 Opening a social media platform with prefilled message:
-
Opening a social media platform with prefilled message:
-
Prerequisites: List all
Persons
using thelist
command. MultiplePersons
in the list. -
Test case:
open 1 wa/ m/Hello World
Expected: The firstPerson
’s WhatsApp account is opened in the app with the messageHello World
. Assuming the firstPerson
WhatsApp field is not empty, is a valid WhatsApp number and the WhatsApp app is installed on the user’s computer. -
Note: Only WhatsApp is supported right now due to platform limitations.
-
7.10 View upcoming birthdays:
-
View people whose birthday are in the next 60 days:
-
Prerequisites: List all
Persons
using thelist
command. MultiplePersons
in the list. -
Test case:
upcoming-b
Expected: AllPersons
whose birthday is in the next 60 days are shown in the list.
-
8. Requirements
8.1 Product scope
Target user profile:
- NUS School of Computing (SoC) students
- especially those with many CCAs, modules or Team Projects
- 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
Value proposition: As students, we meet people everywhere, in CCAs, modules, events etc, and we may lose track of important information of people we network with. ConnectUS provides a platform for Computing students to easily manage their friends’ information, saving time and effort as users can access this information at their fingertips.
8.2 User stories
In the user stories, user refers to an NUS student unless specified otherwise.
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 contact | |
* * * |
user | delete a contact | remove entries that I no longer need |
* * * |
user | find a contact by name | locate details of persons without having to go through the entire list |
* * * |
user with many different modules | add module tags to a contact | remember which module I met them from |
* * * |
user with many different CCAs | add CCA tags to a contact | remember which CCA I met them from |
* * * |
user with many different CCAs | add CCA post tags to a contact | remember which post they hold in the CCA |
* * * |
user | add a new contact without adding their email | add people when I don’t know their email id |
* * * |
user | add a new contact without adding their phone number | add people when I don’t know their phone number |
* * * |
user | add a new contact without adding their Telegram | add people when I don’t know their telegram |
* * * |
user | add a new contact without adding any tags | add people who don’t have a common CCA or module with me |
* * * |
user | easily add my friends’ Telegram information to the app | quickly connect with them on the platform |
* * * |
user | easily add my friends’ Instagram information to the app | quickly connect with them on the platform |
* * * |
user | easily add my friends’ WhatsApp information to the app | quickly connect with them on the platform |
* * * |
user | add a birthday for my contacts | remember them |
* * |
user | open Instagram directly from the CLI | message someone without having to find them on Instagram |
* * |
user | open Telegram directly from the CLI | message someone without having to find them on Telegram |
* * |
user | open WhatsApp directly from the CLI | message someone without having to find them on WhatsApp |
* * |
user with many CCAs | find the exco of a specific CCA | submit a proposal for an event to them |
* * |
user with many CCAs | find the friends of a specific CCA | find their contact easily |
* * |
exco of a CCA who is also part of other CCAs | find the contacts of the CCA members (of which I am an exco of) | find their contact easily to contact them regarding CCA events/other needs |
* * |
exco of a CCA | find the exco of my CCA | contact them to plan an event for the members of the CCA |
* * |
user with new friends | find their contact details | easily ask them out to lunch to get to know them |
* * |
user taking many modules | find other friends who are taking the same modules as me | study together with them |
* * |
user taking many modules | find other friends who are taking the same modules as me | easily form groups with them prior to the start of the module |
* * |
user who is a teaching assistant (TA) | find the contact details of the students I am TA-ing | so that I can easily inform them about important information related to the module/class |
* * |
user | receive notifications when my friends change their telegram information | stay up to date with their latest details |
* * |
user | search for my friends’ telegram information within the app | don’t have to manually go through my contacts list every time I want to reach out to them |
* * |
user | view a list of upcoming birthdays for my contacts | plan ahead for their birthday |
* * |
user with friends from different majors | add major tags | remember which major they are in |
* * |
user with friends from different majors | find other friends who are taking the same major as me | easily form groups with them prior to the start of the module |
* |
user with friends from different years | add year tags to a contact | remember which year they are in |
* |
user | receive notifications for my friends’ birthday | prepare for it and wish them |
* |
user with many contacts saved in the app | search contacts by specific information fields | locate a contact easily |
* |
user | send short messages on WhatsApp directly from the app | message someone without having to juggle between apps |
* |
user with friends from other schools | add school tags to a contact | remember which school they are from |
* |
user with friends from companies | add company tags to a contact | remember which company they are from |
8.3 Use cases
(For all use cases below, the System is ConnectUS
and the Actor is the user
, unless specified otherwise). Use case will be referred to as UCXX, where XX is the use case numbering.
UC01: Add a contact
Main Success Scenario (MSS)
- User requests to add a contact by giving name and some contact information.
- ConnectUS adds a new contact with given information.
- ConnectUS displays confirmation message.
- The new contact is visible in the contacts list.
Use case ends.
Extensions
- 1a. There is an error in the given information.
- 1a1. ConnectUS shows an error message.
Use case ends.
- 1a1. ConnectUS shows an error message.
- 4a. User requests to add more information to the contact.
- 4a1. ConnectUS adds the given information to the contact.
- 4a2. ConnectUS displays confirmation message.
- 4a3. Updated contact is visible in the contacts list.
Use case ends.
UC02: Delete a contact
MSS
- User requests to list persons.
- ConnectUS shows a list of persons.
- User requests to delete a specific person in the list.
- ConnectUS deletes the person.
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends. -
3a. The given index is invalid.
- 3a1. ConnectUS shows an error message.
Use case resumes at step 2.
- 3a1. ConnectUS shows an error message.
UC03: Edit a contact
MSS
- User requests to list persons.
- ConnectUS shows a list of persons.
- User requests to edit a specific person’s information from the list by giving the type of information to be updated, and the updated information.
- ConnectUS edits the person’s information.
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends. - 3a. The given index is invalid.
- 3a1. ConnectUS shows an error message.
Use case resumes at step 2.
- 3a1. ConnectUS shows an error message.
- 3b. There is an error in the given information.
- 3b1. ConnectUS shows an error message.
Use case resumes at step 2.
- 3b1. ConnectUS shows an error message.
UC04: Add tags to a contact
MSS
- User requests to list persons.
- ConnectUS shows a list of persons.
- User requests to add tags to a specific person’s information from the list by giving the tag type to be added, and the tag information.
- ConnectUS adds tags to the person.
Use case ends.
Extensions
- UC04’s extensions are the same as UC03: Edit a contact.
UC05: Delete a tag from a contact
MSS
- User requests to list persons.
- ConnectUS shows a list of persons.
- User requests to delete tags from a specific person’s information from the list by giving the tag type to be added, and the tag index.
- ConnectUS deletes a tag from the person.
Use case ends.
Extensions
-
UC05’s extensions are similar to UC03: Edit a contact, excluding extension 3b.
-
3b. The given tag index is invalid.
- 3b1. ConnectUS shows an error message.
Use case resumes at step 2.
- 3b1. ConnectUS shows an error message.
UC06: Search for a contact
MSS
- User requests to search for a contact by keywords.
- ConnectUS displays confirmation message.
- ConnectUS displays all contacts with keywords in name.
Use case ends.
Extensions
- 1a. No keywords are provided.
- 1a1. ConnectUS displays error message.
Use case ends
- 1a1. ConnectUS displays error message.
- 1b. User requests to find a contact by specific tag type and information fields.
- 1b1. ConnectUS displays confirmation message.
- 1b2. ConnectUS displays all contacts with given tag type and information fields.
Use case ends.
UC07: List all contacts
MSS
- User requests to list all contacts.
- ConnectUS displays confirmation message.
- ConnectUS displays all contacts.
Use case ends
Extensions
- 1a. There is an error in the request.
- 1a1. ConnectUS displays error message.
Use case ends
- 1a1. ConnectUS displays error message.
UC08: Viewing help for a specific command
MSS
- User requests for help regarding usage format of a specific command.
- ConnectUS displays confirmation message.
- ConnectUS displays usage format of the given command.
Use case ends
Extensions
- 1a. No keywords are provided.
- 1a1. ConnectUS displays general help message.
Use case ends
- 1a1. ConnectUS displays general help message.
UC09: Open a contact’s Social Media homepage
MSS
- User requests to list persons.
- ConnectUS shows a list of persons.
- User requests to open a specified Social Media homepage of a specific person in the list.
- ConnectUS opens the desired Social Media homepage.
Use case ends
Extensions
- 3a. The person has no specified Social Media record.
- 3a1. ConnectUS displays error message.
Use case ends.
- 3a1. ConnectUS displays error message.
UC10: Open a contact’s WhatsApp with prefilled message
MSS
- User requests to list persons.
- ConnectUS shows a list of persons.
- User requests to open the WhatsApp page of a specific person in the list with provided message.
- ConnectUS launches desired WhatsApp with message prefilled.
Use case ends.
Extensions
- 3a. The person has no WhatsApp record.
- 3a1. ConnectUS displays error message.
Use case ends.
- 3a1. ConnectUS displays error message.
- 4a. WhatsApp is launched, but it does not fill the message.
Use case resumes from step 3.
8.4 Non-Functional Requirements
- Should work on any mainstream OS as long as it has Java
11
installed. - Should be able to hold up to 1000 contacts without a noticeable sluggishness in performance for typical usage.
- 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.
- Should be for a single user i.e. (not a multi-user product).
- Should have its data stored locally.
- Should have its data be in a human editable text file.
- Should not use a Database Management System (DBMS) to store data.
- Should not depend on a remote server.
- Should not cause have its GUI cause any resolution-related inconveniences to the user for standard screen resolutions (1920x1080 and higher), and resolutions of 1280x720 and higher.
- Should be packaged into a single JAR file not exceeding 100MB.
- Should not have any hard-to-test features or features that make it hard-to-test.
9. Glossary
A
Alphanumeric: English alphabet letters and numbers only.
Architecture: The architecture of a system describes its major components, their relationships (structures), and how they interact with each other.
B
Brownfield: Brownfield software development refers to the development and deployment of a new software system in the presence of existing or legacy software systems. Brownfield application development usually happens when developing or improving upon an existing application.
C
CCA: Co-curricular activities that students participate in.
Command Line Interface (CLI): A text-based user interface used to run programs.
Command: Commands are actions that you want to perform using ConnectUS. Most commands will require user inputs, otherwise known as parameters, for ConnectUS to perform the action.
ConnectUS.jar: >
.jar
is short for Java ARchive. A file format that contains the executable Java application for ConnectUS.CS2103T: The module code for a Software Engineering module in the National University of Singapore.
F
Format: In this Developer Guide, the format of a command is the correct input usage of a command.
G
Graphical User Interface (GUI): A form of user interface that allows users to interact with programs through graphical icons and audio indicators.
J
Java
11
: A feature release of the Java SE platform, used to run ConnectUS. The download link for this release can be found here.JavaFX: A Java library used for creating and delivering desktop applications.
JSON: Short for JavaScript Object Notation. A standard text-based format for representing structured data based on JavaScript object syntax. Basically, it stores your data.
JUnit 5: JUnit 5 is a unit testing framework for the Java programming language, and is important in the development of test-driven development.
M
Mainstream OS: Short for Mainstream Operating Systems. This refers to Windows, Linux, Unix, OS-X.
MSS: Short for Main Success Scenario. It describes the most straightforward system-user interaction for a given use case, assuming that no errors occur.
Major: Majors are the main programmes that students take at the National University of Singapore.
Module: Modules are courses that students take at the National University of Singapore.
N
NUS: Short for the National University of Singapore.
P
Parameter: Parameters are user inputs that ConnectUS requires to perform certain commands.
S
School of Computing: Also known as SoC. A computing school in the National University of Singapore.
Special Characters: Characters that are not alphabetic or numeric.
U
Use Case: A use case describes the interaction between the system and the user for a specific functionality of the system.
User Story: User stories are short, simple descriptions of a feature told from the perspective of the person who desires the new feature. It is typically of the format: “As a [user type], I can [function] so that [benefit].”