This project is based on the AddressBook-Level 3 project created by the SE-EDU initiative.
Refer to the guide Setting up and getting started.
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.
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 1.
Each of the four main components (also shown in the diagram above),
interface with the same name as the Component.{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.
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,
Logic component.Model data so that the UI can be updated with the modified data.Logic component, because the UI relies on the Logic to execute commands.Model component, as it displays Person object residing in the Model.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 1") API
call as an example.
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:
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.Command object (more precisely, an object of one of its subclasses e.g., DeleteCommand) which
is executed by the LogicManager.Model when it is executed (e.g. to delete a client).Model) to achieve.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:
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.XYZCommandParser classes (e.g., AddCommandParser, DeleteCommandParser, ...) inherit from the Parser
interface so that they can be treated similarly where possible e.g, during testing.API : Model.java
The Model component,
Person and Tag objects (which are contained in UniquePersonList and a
UniqueTagList objects respectively).Person's LogHistory, which contains zero or more LogEntry records.Person objects (e.g., results of a search query) as a separate filtered list which
is exposed to outsiders as an unmodifiable ObservableList<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.UserPref object that represents the user’s preferences. This is exposed to the outside as a
ReadOnlyUserPref objects.Model represents data entities of the domain, they
should make sense on their own without depending on other components)API : Storage.java
The Storage component,
AddressBookStorage and UserPrefStorage, which means it can be treated as either one (if only
the functionality of only one is needed).Model component (because the Storage component's job is to save/retrieve objects
that belong to the Model)Classes used by multiple components are in the seedu.address.commons package.
This section describes some noteworthy details on how certain features are implemented.
Field-level validation is enforced in the model layer (Name, Phone, Email, Address, Tag, Notes) and reused
by parsers via ParserUtil.
All user-provided values are trimmed in ParserUtil before validation.
| Field | Constraint summary |
|---|---|
Name | 1 to 100 printable characters, and cannot be blank (Name#VALIDATION_REGEX). |
Phone | Must contain 3 to 15 digits in total; spaces and hyphens are allowed only between digit groups (Phone#VALIDATION_REGEX). |
Email | Enforces a stricter local-part@domain format where local-part and domain labels follow explicit character rules (Email#VALIDATION_REGEX). |
Address | Must not be blank (first non-whitespace character required). |
Tag | 1 to 50 printable characters, and cannot be blank (Tag#VALIDATION_REGEX). |
Notes | Optional free text with max length 200 characters (Notes#MAX_LENGTH). |
This keeps validation centralized and consistent for both command execution and JSON deserialization.
Target user profile:
Value proposition: A fast, typing-first address book that helps solo residential service technicians avoid mistakes and wasted time by keeping client contact details tightly coupled with service-location context, searchable in seconds.
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As a … | I want to … | So that I can… |
|---|---|---|---|
* * * | solo residential service technician | add a new client with name, phone, email, and service address details | record the exact contact details and service-location details |
* * * | solo residential service technician | delete a client record | remove one-off customers who are not likely to become repeat customers |
* * * | solo residential service technician | find a client by name | locate the correct client quickly |
* * * | solo residential service technician | view a list of clients stored | get an overview of my business |
* * * | solo residential service technician | keep data in a human-editable local file that the app can load | access client information between sessions |
* * | solo residential service technician | update a client's contact details | keep client records accurate when details change |
* * | solo residential service technician | have the list view sorted by name (lexicographic order) | quickly skim the list to find certain clients |
* * | solo residential service technician | find a specific client's details quickly (e.g., by typing part of an address) | retrieve the correct client even if I don't remember their name |
* * | solo residential service technician | add special requirements or precautions specified by each client | avoid mistakes and prepare properly before a visit |
* * | solo residential service technician | see a compact view when listing clients and view full details only when I select a client | scan my list quickly without losing access to details |
* * | solo residential service technician | copy a client's service address to the clipboard | paste it quickly into maps or other apps |
* * | solo residential service technician | append a timestamped service note to a client's record as a visit log | track what was done previously and follow up correctly |
* * | solo residential service technician | sort the contact list by most recent interaction | prioritize clients I worked with recently |
* * | solo residential service technician | attach tags to a client | recognize customer types or service types at a glance |
* * | solo residential service technician | filter clients by tag | narrow down to the relevant subset |
* * | solo residential service technician | see a "Today's Visits" list when I tag clients with a date and remove them from the list when done | manage my daily visits quickly |
* | new user | start with sample data on first launch | understand how the app is supposed to look without entering everything first |
* | solo residential service technician | be prompted by the app when I want to delete a client with service history | avoid accidentally losing important past records |
* | solo residential service technician | group tags into larger categories | categorize clients and services more systematically |
* | solo residential service technician | update or rename a tag globally (cascading) | keep my tagging consistent when I change my conventions |
* | solo residential service technician | delete a tag globally (cascading) | keep my tagging consistent when I change my conventions |
* | solo residential service technician | pin frequent clients to a "Favorites" quick-access list | view my regular clients with a single command |
* | solo residential service technician | store multiple service locations under one client | handle clients who have more than one address (e.g., home + property) |
* | solo residential service technician | set one service location as the default | quickly use the most common address without extra steps |
* | solo residential service technician | record the brand and model of an appliance for a client | prepare the right tools or parts before visiting |
* | solo residential service technician | see the list of clients visited within a certain time period | manage clients based on loyalty or recency |
* | solo residential service technician | set a warranty end date for a specific repair | know whether a follow-up is still under warranty |
* | solo residential service technician | archive or hide inactive clients | reduce clutter while keeping records for reference |
* | solo residential service technician | clear all data | reset the app completely when needed (e.g., for demo or testing) |
* | solo residential service technician | be warned when adding a client that looks like a duplicate | avoid creating repeated records accidentally |
* | solo residential service technician | merge two client records | combine duplicates into a single correct record |
* | solo residential service technician | import clients from other files into my existing list | bring over contacts from older tools or files quickly |
* | solo residential service technician | undo or redo recent actions | recover from mistakes quickly |
{More to be added}
(For all use cases below, Linkline is the system, and the user is the sole Actor, unless specified otherwise)
System: Linkline Actor: user Guarantees:
MSS
user requests to add a client.user fills in the details (name, phone, email, address, with optional tag and notes field) of the client on the
CLI.Linkline creates a new client, inserts them into the list in lexicographical order by name and displays the details
on the GUI.Extensions
Linkline returns error message informing user what criteria the name must meet.Linkline returns error message informing user what criteria the phone number must meet.Linkline returns error message informing user what criteria the email address must meet.Linkline returns error message informing user what criteria the address must meet.Linkline returns error message informing user what criteria the tag must meet.Linkline returns error message informing user what criteria the notes must meet.Linkline returns an error message informing the user that a client with the same phone number or email already exists.System: Linkline Actor: user
MSS
user specifies one or multiple fields (name, phone number, email address, physical address, tags) with one or
multiple keywords per field as a search query.Linkline uses the query provided to search and list (lexicographically by name) the clients who have at least one
field match successfully against the specified fields (This search is done only against the currently filtered
clients).Extensions
Linkline gives a warning to user that command entered is in an invalid format.Linkline gives a warning to user that command entered is in an invalid format.System: Linkline Actor: user
MSS
user requests to copy a client's address by specifying the client's index.Linkline copies the client's address to the system clipboard.user pastes the address into their desired application (e.g., maps).Extensions
Linkline returns an error message informing the user that the index is invalid.Linkline fails to access the system clipboard.
Linkline returns an error message informing the user to copy the address manually from the details view.user searches for the client (UC02) and copies the address manually from the displayed details.System: Linkline Actor: user
MSS
user edits a client's detail via Linkline command by specifying their index and new phone number, and re-sorts
the list to maintain lexicographical order.Linkline displays new fields of the updated client.Extensions
Linkline returns an error that informs user the index given is invalid.Linkline returns error message informing user that the phone number is already in use.System: Linkline Actor: user
MSS
user enters delete command with the index of the target client.Linkline displays the client's details and ask for confirmation.user enters the same delete command again.Linkline deletes the client and confirms the deletion.Extensions
Linkline returns an error message showing that the input index is invalid to the user.user enters any other command instead of confirming.
Linkline cancels the pending deletion and executes the new command normally.System: Linkline Actor: user
MSS
user requests to view all client added in Linkline via command.Linkeline shows list with all clients sorted lexicographically by name.Extensions
Linkline returns an error message to remind user to add at least one client before listing them.System: Linkline Actor: user
MSS
user confirms personal detail of a specific client via Linkline by specifying the index of target client.Linkline shows full details of the client including name, phone, email, full address and precautions.Extensions
Linkline returns an error message showing that the input index is invalid to the user.System: Linkline Actor: user
MSS
user edit client detail by adding new tag(s) or/and notes via Linkline by specifying client index, tag content
or/and notes content.Linkline displays new fields of the updated client.Extensions
Linkline returns an error message showing that the input index is invalid to the user.Linkline returns an error message to inform user adding at least one field.Linkline returns an error message informing user of the tag naming rules.System: Linkline Actor: user
MSS
user enters one or multiple keywords as a filter query.Linkline uses the query provided to filter and list (lexicographically) the clients who have the specified tags
that match the query.Extensions
Linkline returns an empty page that informs user no matching clients were found.Linkline returns error message informing user that at least one word must be provided as a filter query.Linkline returns error message informing user what criteria the query must meet.System: Linkline Actor: user
MSS
user requests to rename an existing tag to a new name.Linkline renames the tag in the global tag list.Linkline updates all clients currently having the old tag to reflect the new tag name.Extensions
Linkline.
Linkline returns an error message informing the user that the tag was not found.Linkline.
Linkline returns an error message informing the user that the new tag name is a duplicate.System: Linkline Actor: user
MSS
user requests to delete a specific tag by tag name.Linkline displays the specified tag name and ask for confirmation.user enters the same delete tag command again.Linkline removes the tag from the global tag list.Linkline removes the tag from all clients with that tag name.Extensions
Linkline returns an error message informing the user that the tag was not found.user enters any other command instead of confirming.
Linkline cancels the pending deletion and executes the new command normally.17 or above installed.add, delete, edit) must trigger an automatic save to
the local JSON file. The save mechanism must use a safe write strategy (e.g., write to temp file then rename) to
prevent data corruption in case of a system crash during write.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.
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 client while all clients are being shown
Prerequisites: List all clients using the list command. Multiple clients in the list.
Test case: delete 1
Expected: Expected: No client is deleted. Confirmation message with the client's details is shown. Status bar
remains the same. Pending deletion state is set for index 1.
Test case: delete 1 (immediately after the above)
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: delete 1 then list then delete 1
Expected: First delete 1 shows confirmation. list cancels the pending deletion. Second delete 1 shows
confirmation again (not auto-deleted).
Test case: delete 0
Expected: No client 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.