Developer Guide
Table of Contents
- Acknowledgements
- Setting up, getting started
- Design
- Documentation, logging, testing, configuration, dev-ops
- Appendix: Requirements
- Appendix: Instructions for manual testing
Acknowledgements
This project is based on the AddressBook-Level3 project created by the SE-EDU initiative.
Setting up, getting started
Refer to the guide Setting up and getting started.
Design
.puml files used to create diagrams in this document docs/diagrams folder. Refer to the PlantUML Tutorial at se-edu/guides to learn how to create and edit diagrams.
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 deletep 1.

Each of the four main components (also shown in the diagram above),
- defines its API in an
interfacewith the same name as the Component. - implements its functionality using a concrete
{Component Name}Managerclass (which follows the corresponding APIinterfacementioned 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

The UI consists of a MainWindow that is made up of parts e.g.CommandBox, ResultDisplay, PersonListPanel, ConcertListPanel, 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
Logiccomponent. - listens for changes to
Modeldata so that the UI can be updated with the modified data. - keeps a reference to the
Logiccomponent, because theUIrelies on theLogicto execute commands. - depends on some classes in the
Modelcomponent, as it displaysPerson,ConcertandConcertContactobjects residing in theModel.
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("deletep 1") API call as an example.

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:
- When
Logicis called upon to execute a command, it is passed to anAddressBookParserobject which in turn creates a parser that matches the command (e.g.,DeletePersonCommandParser) and uses it to parse the command. - This results in a
Commandobject (more precisely, an object of one of its subclasses e.g.,DeletePersonCommand) which is executed by theLogicManager. - The command can communicate with the
Modelwhen it is executed (e.g. to delete a person).
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 theModel) to achieve. - The result of the command execution is encapsulated as a
CommandResultobject which is returned back fromLogic.
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
AddressBookParserclass creates anXYZCommandParser(XYZis a placeholder for the specific command name e.g.,AddPersonCommandParser) which uses the other classes shown above to parse the user command and create aXYZCommandobject (e.g.,AddPersonCommand) which theAddressBookParserreturns back as aCommandobject. - All
XYZCommandParserclasses (e.g.,AddPersonCommandParser,DeletePersonCommandParser, …) inherit from theParserinterface 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,ConcertandConcertContactobjects (which are contained in aUniquePersonList,UniqueConcertListandUniqueConcertContactListobject respectively). - stores the currently ‘selected’
Personobjects (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 the currently ‘selected’
Concertobjects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiableObservableList<Concert>that can be ‘observed’ e.g. the UI can be bound to this list so that the UI automatically updates when the data in the list change. - stores the currently ‘selected’
ConcertContactobjects (e.g., results of a search query) as a separate filtered list which is exposed to outsiders as an unmodifiableObservableList<ConcertContact>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
UserPrefobject that represents the user’s preferences. This is exposed to the outside as aReadOnlyUserPrefobjects. - does not depend on any of the other three components (as the
Modelrepresents data entities of the domain, they should make sense on their own without depending on other components)
Tag list in the AddressBook, which Person references. This allows AddressBook to only require one Tag object per unique tag, instead of each Person needing their own Tag objects.
Storage component
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
AddressBookStorageandUserPrefStorage, which means it can be treated as either one (if only the functionality of only one is needed). - depends on some classes in the
Modelcomponent (because theStoragecomponent’s job is to save/retrieve objects that belong to theModel)
Common classes
Classes used by multiple components are in the seedu.address.commons package.
Documentation, logging, testing, configuration, dev-ops
Appendix: Requirements
Product scope
Target user profile:
- concert organisers who manage many different groups of contacts
- for different concerts
- prefer desktop apps over other types
- can type fast
- prefers typing to mouse interactions
- is reasonably comfortable using CLI apps
Value proposition: ConcertPhonebook allows concert organisers to add, delete and quickly sift through many contacts, from whom to obtain required resources or fulfill their professional obligations. Contacts will include roles, such as promoter, logistics, sound technician, etc. It provides an efficient CLI optimised for fast typists, complemented by a GUI for convenience.
User stories
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As a … | I want to … | So that I can… |
|---|---|---|---|
* * * |
new user | see usage instructions | refer to instructions when I forget how to use the App |
* * * |
concert organiser | add a new person | |
* * * |
concert organiser | delete a person | remove entries that I no longer need |
* * * |
concert organiser | view a person by name | locate details of persons without having to go through the entire list |
* * * |
concert organiser | assign roles to people | categorise each contact by what they do |
* * * |
concert organiser | edit a contact | have the most updated contact details |
* * * |
concert organiser | view people by their roles | easily contact the personnel I need for a concert |
* * * |
concert organiser | create a new concert | manage the personnel involved in the concert |
* * * |
concert organiser | view a list of personnel for a concert | view everyone involved in a concert easily |
* * * |
concert organiser | view a list of bands for a concert | view the concert lineup easily |
* * * |
concert organiser | add a contact to a concert | collate the list of personnel for the concert |
* * * |
concert organiser | remove a contact from a concert | have the most updated list of personnel for the concert |
* * |
concert organiser | edit a concert | have the most updated concert details |
* |
concert organiser | favourite a contact | quickly contact the people I favourite |
* |
concert organiser | write a review for a contact | describe past experiences with the contact |
* |
concert organiser | leave a rating for a contact | generalise past experiences with the contact |
* |
concert organiser | find people by their roles | easily contact the personnel I need for a concert |
Use cases
(For all use cases below, the System is the ConcertPhonebook and the Actor is the user, unless specified otherwise)
Use case: UC1 - Delete a person
MSS
- User requests to list persons
- ConcertPhonebook shows a list of persons
- User requests to delete a specific person in the list
-
ConcertPhonebook deletes the person
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. ConcertPhonebook shows an error message.
Use case resumes at step 2.
-
Use case: UC2 - Add a person
MSS
- User requests to list persons
- ConcertPhonebook shows a list of persons
- User requests to add a person
-
ConcertPhonebook adds the person
Use case ends.
Extensions
-
3a. The list already contains the person.
-
3a1. ConcertPhonebook shows an error message.
Use case ends.
-
-
3b. The given person details is invalid.
-
3b1. ConcertPhonebook shows an error message.
Use case resumes at step 2.
-
Use case: UC3 - Edit a person
MSS
- User requests to list persons
- ConcertPhonebook shows a list of persons
- User requests to edit a person in the list
-
ConcertPhonebook edits the person
Use case ends.
Extensions
-
2a. The list does not contain the person.
-
2a1. ConcertPhonebook shows an error message.
Use case ends.
-
-
3a. The given contact details/index is invalid.
-
3a1. ConcertPhonebook shows an error message.
Use case resumes at step 2.
-
Use case: UC4 - Delete a concert
MSS
- User requests to list concerts
- ConcertPhonebook shows a list of concerts
- User requests to delete a concert in the list
-
ConcertPhonebook deletes the concert
Use case ends.
Extensions
-
2a. The list is empty.
Use case ends.
-
3a. The given index is invalid.
-
3a1. ConcertPhonebook shows an error message.
Use case resumes at step 2.
-
Use case: UC5 - Add a concert
MSS
- User requests to list concerts
- ConcertPhonebook shows a list of concerts
- User requests to add a concert not in the list
-
ConcertPhonebook adds the concert
Use case ends.
Extensions
-
2a. The list contains the concert.
Use case ends.
-
3a. The given concert details is invalid.
-
3a1. ConcertPhonebook shows an error message.
Use case resumes at step 2.
-
Use case: UC6 - Edit a concert
MSS
- User requests to list concerts
- ConcertPhonebook shows a list of concerts
- User requests to edit a concert in the list
-
ConcertPhonebook edits the concert
Use case ends.
Extensions
-
2a. The list does not contain the concert.
Use case ends.
-
3a. The given concert details/index is invalid.
-
3a1. ConcertPhonebook shows an error message.
Use case resumes at step 2.
-
Use case: UC7 - Assign person to a concert
MSS
- User requests to list concerts and persons
- ConcertPhonebook shows a list of concerts and persons
- User requests to assign a person to a concert in the list
-
ConcertPhonebook assigns the person to the concert
Use case ends.
Extensions
-
2a. The list does not contain the concert/person.
Use case ends.
-
3a. The given person/concert is invalid.
-
3a1. ConcertPhonebook shows an error message.
Use case resumes at step 2.
-
Use case: UC8 - Unassign person from concert
MSS
- User requests to list concert contacts
- ConcertPhonebook shows a list of concert contacts
- User requests to unassign a person from a concert in the list
- ConcertPhonebook unassigns the person from the concert
Use case ends
Extensions
-
2a. The list does not contain the concert contact.
Use case ends.
-
3a. The given concert contact is invalid.
-
3a1. ConcertPhonebook shows an error message.
Use case resumes at step 2.
-
Use case: UC9 - Find person
MSS
- User request to find a person based on name/role
-
ConcertPhonebook shows a list matched persons
Use case ends.
Extensions
-
1a. The given search keywords are invalid
Use case resumes at step 1.
Use case: UC10 - Find concert
MSS
- User request to find a concert based on name
-
ConcertPhonebook shows a list matched concerts.
Use case ends.
Extensions
-
1a. The given search keywords are invalid
Use case resumes at step 1.
Use case: UC11 - Find concert contact
MSS
- User request to find a concert contact based on person/concert.
-
ConcertPhonebook shows a list matched concert contacts.
Use case ends.
Extensions
-
1a. The given person/concert is invalid.
Use case resumes at step 1.
Non-Functional Requirements
- Should work on any mainstream OS as long as it has Java
17or above installed. - Should be able to hold up to 1000 persons 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.
- The user interface should be intuitive enough for users who are not IT-savvy.
- The product is offered as a free offline service.
- The response to any action should become visible within 5 seconds.
- The source code should be open source.
- Major bug fixes should be accompanied with a new release.
- The app should not have any offensive UI elements.
- Features should complement each other soundly.
Glossary
- Mainstream OS: Windows, Linux, Unix, MacOS
- Private contact detail: A contact detail that is not meant to be shared with others
- GUI: Graphical User Interface
- CLI: Command Line Interface
- ConcertPhonebook: Refers to the application
- Concert contact: Link between between an existing Person and a particular Concert in the ConcertPhonebook
Appendix: Instructions for manual testing
Given below are instructions to test the app manually.
Launch and shutdown
-
Initial launch
-
Download the jar file and copy into an empty folder
-
Double-click the 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.
-
Deleting a person
-
Deleting a person while all persons are being shown
-
Prerequisites: List all persons using the
listpcommand. Multiple persons in the list. -
Test case:
deletep 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. -
Test case:
deletep 0
Expected: No person is deleted. Error details shown in the status message. Status bar remains the same. -
Other incorrect delete commands to try:
deletep,deletep x,...(where x is larger than the list size)
Expected: Similar to previous.
-
-
Cases for deleting concert contacts as well as concerts follow similarly to that of deleting a person.