https://github.com/se-edu/addressbook-level3https://openjfx.io/https://github.com/FasterXML/jacksonhttps://junit.org/junit5/https://plantuml.com/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, which defines the interface with the start(Stage primaryStage) method. The concrete implementation is provided by UiManager.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 person).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 objects (which are contained in a UniquePersonList object).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)Note: An alternative (arguably, a more OOP) model is given below. It has a Tag list in ClubHub, which Person references. This allows ClubHub to only require one Tag object per unique tag, instead of each Person needing their own Tag objects.

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.
The undo/redo mechanism is implemented via VersionedAddressBook, which maintains two stacks:
addressBookStateHistory (undo stack)addressBookRedoHistory (redo stack)APIs:
VersionedAddressBook#commit() saves a copy of the current state to the undo stack and clears the redo stack.VersionedAddressBook#undo() pushes the current state onto the redo stack, pops the previous state from the undo stack, and calls resetData(previousState).VersionedAddressBook#redo() pushes the current state onto the undo stack, pops from the redo stack, and calls resetData(nextState).Model surface:
Model#commit(), Model#undo(), Model#redo() delegate to the above VersionedAddressBook methods.undo()/redo(), ModelManager refreshes filtered lists via updateFilteredPersonList, updateFilteredEventList, and updateFilteredTaskList to keep the UI consistent.Supported commands: All commands that modify data are undoable, including:
add, edit, delete, clearaddevent, deleteevent, setexpenseaddtask, deletetask, marktask, unmarktaskaddattendance, markattendance, unmarkattendance, removeAttendeesbudgetset, budgetresetRead-only commands (like list, find, showattendance, viewattendees, budgetreport) do not commit state and cannot be undone.
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.
Step 2. The user executes delete 5 command to delete the 5th person 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.
Step 3. The user executes add n/David … to add a new person. The add command also calls Model#commitAddressBook(), causing another modified address book state to be saved into the addressBookStateList.
Note: If a command fails its execution, it will not save state, so the address book state will not be saved into the addressBookStateList. All modifying commands automatically commit state before execution (including attendance operations: addattendance, markattendance, unmarkattendance, removeAttendees), making them undoable.
Step 4. The user now decides that adding the person 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.
Note: If the undo stack is empty, undo() returns false and no state change occurs. Similarly, if the redo stack is empty, redo() returns false.
The following sequence diagram shows how an undo operation goes through the Logic component:
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:
The redo command calls Model#redo(), restoring the next state if available.
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.
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.
The following activity diagram summarizes what happens when a user executes a new command:
Aspect: How undo & redo executes:
Alternative 1 (current choice): Saves the entire address book.
Alternative 2: Individual command knows how to undo/redo by itself.
delete, just save the person being deleted).{more aspects and alternatives to be added}
The add member feature allows users to add new members to the address book with their details.
The sequence diagram below illustrates the interactions within the Logic component for adding a member:
Note: The lifeline for AddCommandParser should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
How the add command works:
add command, LogicManager passes it to AddressBookParser.AddressBookParser creates an AddCommandParser to parse the command arguments.AddCommandParser validates and parses all required fields (name, year, student number, email, phone, dietary requirements, role, and optional tags).AddCommand object is created and executed.AddCommand checks if a person with the same student number already exists.The edit member feature allows users to update existing member details.
The sequence diagram below illustrates the interactions within the Logic component for editing a member:
Note: The lifeline for EditCommandParser now correctly ends at the destroy marker (X) in the diagram below.
How the edit command works:
edit command with an index and field updates, LogicManager passes it to AddressBookParser.AddressBookParser creates an EditCommandParser to parse the command arguments.EditCommandParser validates the index and parses the optional fields to update.EditCommand object is created with an EditPersonDescriptor containing the updates.EditCommand retrieves the person at the specified index from the filtered list.Person object is created with the updated fields.EditCommand checks if the edited person already exists (unless it's the same person).The find member feature allows users to search for members by keywords across all fields.
The sequence diagram below illustrates the interactions within the Logic component for finding members:
How the find command works:
find command with keywords, LogicManager passes it to AddressBookParser.AddressBookParser creates a FindCommandParser to parse the command arguments.FindCommandParser splits the input into keywords.PersonContainsKeywordsPredicate is created with the keywords.FindCommand object is created and executed.FindCommand updates the filtered person list with the predicate.The add event feature allows users to create new events with an event ID, date, and description.
The sequence diagram below illustrates the interactions within the Logic component for adding an event:
Note: The lifeline for AddEventCommandParser should end at the destroy marker (X) but due to a limitation of PlantUML, the lifeline continues till the end of diagram.
How the addevent command works:
addevent command, LogicManager passes it to AddressBookParser.AddressBookParser creates an AddEventCommandParser to parse the command arguments.AddEventCommandParser validates and parses the event ID, date, and description.AddEventCommand object is created and executed.AddEventCommand checks if an event with the same ID already exists.The attendance feature allows users add and record which members attended specific events.
The sequence diagram below illustrates how attendance is added for an event:
The activity diagram below summarizes the flow when adding attendance:
How the attendance feature works:
addattendance command with an event ID and member names, LogicManager passes it to AddressBookParser.AddressBookParser creates an AddAttendanceCommandParser to parse the command arguments.AddAttendanceCommand object is created.LogicManager#execute()).AddAttendanceCommand retrieves the event by event ID from the model.Attendance objects are created and added to the event.Other attendance related features (markattendance, unmarkattendance, removeAttendees) work in a similar way and are also undoable.
Primary User: CCA secretary in NUS, who needs to:
Pain Points:
A streamlined address book that organises member details, tracks unique preferences, and simplifies event attendance — helping secretaries stay efficient, accurate, and focused on building stronger communities.
Priorities: High (must have) - * * *, Medium (nice to have) - * *, Low (unlikely to have) - *
| Priority | As a … | I want to … | So that I can… |
|---|---|---|---|
* * * | secretary | add a member with name, year, role, student number, phone, email, dietary info | keep member details organized and complete |
* * * | secretary | add optional tags to members | categorize members for better organization |
* * * | secretary | edit a member’s details | correct mistakes without re-entering everything |
* * * | secretary | delete a member | remove members no longer in the club |
* * * | secretary | find members by searching across all fields | quickly locate specific members |
* * * | secretary | list all members | get an overview of all club members |
* * * | secretary | clear all member data | reset the system when starting fresh |
* * * | secretary (events) | create an event with unique ID, date, and description | plan and track club activities |
* * * | secretary (events) | delete an event | remove outdated or duplicate records |
* * * | secretary (events) | set a budget/expense for specific events | track event costs and manage finances |
* * * | secretary (attendance) | add members to an event’s attendance list | prepare attendance records before the event |
* * * | secretary (attendance) | mark members as attended/absent | record actual participation |
* * * | secretary (attendance) | view attendees and attendance summary | get a quick overview of participation |
* * * | secretary (tasks) | add tasks with optional deadlines | assign responsibilities and track progress |
* * * | secretary (tasks) | mark/unmark tasks as completed | keep task status accurate |
* * * | secretary (tasks) | delete tasks | remove tasks that are no longer relevant |
* * * | treasurer (budget) | set a global budget with start and end dates | track club finances for a period |
* * * | treasurer (budget) | set expenses for individual events | track costs per event |
* * * | treasurer (budget) | view a budget report | see financial overview and spending patterns |
* * * | secretary | import/export member data as CSV | move data in/out efficiently |
* * * | secretary | undo/redo my last action | recover from mistakes quickly |
* * | secretary | see statistics about attendance | identify active vs inactive members |
* * | secretary | filter members by year or role | find target groups quickly |
For all use cases below, the System is ClubHub and the Actor is the Secretary, unless specified otherwise.
System: ClubHub Actor: Secretary
MSS (Main Success Scenario):
Extensions:
System: ClubHub Actor: Secretary
MSS:
Year, Query: 3).Extensions:
System: ClubHub Actor: Secretary
MSS:
Extensions:
System: ClubHub Actor: Secretary
MSS:
Extensions:
System: ClubHub Actor: Secretary
MSS:
Extensions:
System: ClubHub Actor: Secretary
MSS:
Extensions:
System: ClubHub Actor: Secretary
MSS:
Extensions:
System: ClubHub Actor: Secretary
MSS:
Extensions:
System: ClubHub Actor: Secretary
MSS:
Extensions:
System: ClubHub Actor: Secretary
MSS:
Extensions:
System: ClubHub Actor: Secretary
MSS:
Extensions:
Actor An entity (usually a user or external system) that interacts with ClubHub. In most use cases, the actor is the Secretary, though other Exco members may also interact with the system.
Attendance A record of which members were present at an event. Used to generate statistics and track participation.
ClubHub The system being developed to support secretarial duties, including member management, event organisation, task assignment, and record-keeping.
Dietary Restriction Any limitation on food or drink that a member cannot consume (e.g., vegetarian, halal, no seafood). Stored in member records to aid event meal planning.
Event A scheduled club activity created and tracked in ClubHub. Each event has an ID, date, and description, and may include attendance records.
Exco (Executive Committee) The group of members responsible for running the club (e.g., President, Treasurer, Secretary). Exco members may have special access privileges.
Field A specific attribute of a member record (e.g., Name, Year, Role, Dietary Restriction) used for searching and filtering.
Member A registered individual in ClubHub with stored details such as name, year of study, role, student number, phone number, and optional telegram handle.
Member Record The collection of data fields stored for a member in ClubHub.
Role The position a member holds in the club (e.g., President, Treasurer, Secretary, General Member).
Secretary The main user of ClubHub. Responsible for managing members, creating events, tracking attendance, assigning tasks, and maintaining records.
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.
Adding a member with all fields
Test case: add n/John Doe y/3 s/A1234567X e/johnd@example.com p/98765432 d/Vegetarian r/President t/leadership
Expected: New member is added to the list. Success message shows the member's details. Member appears in the person list panel.
Test case: add n/John Doe y/3 s/A1234567X e/johnd@example.com p/98765432 d/Vegetarian r/President (without tags)
Expected: Member is added successfully without tags.
Test case: Missing required fields (e.g., add n/John Doe)
Expected: Error message shown indicating missing required fields.
Test case: Duplicate student number
Expected: Error message indicating that a person with this student number already exists.
Editing a member
Prerequisites: List all members using the list command. Multiple members in the list.
Test case: edit 1 p/91234567 e/johndoe@example.com
Expected: Phone number and email of the first member are updated. Success message shows the updated member's details.
Test case: edit 1 t/ (clear tags)
Expected: All tags of the first member are removed.
Test case: edit 0
Expected: Error message indicating invalid index.
Finding members by keywords
Test case: find john
Expected: All members with "john" in their name or attributes are listed. Case-insensitive matching.
Test case: find vegetarian year 2
Expected: Members who are both vegetarian and in year 2 are shown.
Test case: find xyz123 (no matches)
Expected: Message indicating no members found. Empty list displayed.
Deleting a member while all members are being shown
Prerequisites: List all members using the list command. Multiple members in the list.
Test case: delete 1
Expected: First member is deleted from the list. Details of the deleted member shown in the status message. Timestamp in the status bar is updated.
Test case: delete 0
Expected: No member is deleted. Error details shown in the status message.
Other incorrect delete commands to try: delete, delete x, ... (where x is larger than the list size)
Expected: Error message shown.
Adding an event
Test case: addevent e/Orientation2025 dt/2025-08-15 desc/NUS Freshmen Orientation
Expected: New event is added to the event list. Success message confirms event creation.
Test case: Duplicate event ID
Expected: Error message indicating that an event with this ID already exists.
Test case: Invalid date format
Expected: Error message indicating invalid date format.
Deleting an event
Prerequisites: At least one event exists.
Test case: deleteevent e/Orientation2025
Expected: Event with ID "Orientation2025" is deleted. Success message confirms deletion.
Test case: deleteevent e/NonExistentEvent
Expected: Error message indicating event not found.
Adding attendance
Prerequisites: At least one event and one member exist.
Test case: addattendance e/Orientation2025 m/John Doe
Expected: John Doe is added to the attendance list for Orientation2025. Success message confirms addition.
Test case: Adding the same member twice
Expected: Duplicate is ignored. Success message indicates which members were added and which were duplicates.
Test case: Adding attendance for non-existent event
Expected: Error message indicating event not found.
Marking attendance
Prerequisites: Member has been added to attendance list using addattendance.
Test case: markattendance e/Orientation2025 m/John Doe
Expected: John Doe is marked as attended. Success message confirms marking.
Test case: Marking already marked member
Expected: Message indicates member was already marked. No error occurs.
Viewing attendees
Prerequisites: At least one event with attendees exists.
Test case: viewattendees e/Orientation2025
Expected: List of all attendees for the event is displayed with their attendance status.
Showing attendance summary
showattendance e/Orientation2025Adding a task
Test case: addtask Submit budget report dl/2025-11-01 23:59
Expected: New task is added to the task list. Success message shows task details with deadline.
Test case: addtask Buy supplies (without deadline)
Expected: Task is added without a deadline.
Marking a task
Prerequisites: At least one task exists.
Test case: marktask 1
Expected: First task is marked as done. Task status updates in the UI.
Unmarking a task
Prerequisites: At least one completed task exists.
Test case: unmarktask 1
Expected: First task is unmarked (marked as not done). Task status updates in the UI.
Deleting a task
deletetask 1Setting a budget
Test case: budgetset a/1000.00 from/2025-01-01 to/2025-12-31
Expected: Budget is set successfully. Success message confirms budget details.
Test case: Negative amount or invalid date range
Expected: Error message indicating invalid input.
Setting event expense
Prerequisites: At least one event exists.
Test case: setexpense 1 a/150.00
Expected: Expense for the first event is set to $150.00. Expense appears beside the event title in the event list panel.
Test case: setexpense 1 a/-50.00 (negative amount)
Expected: Error message indicating amount cannot be negative.
Test case: setexpense 1 a/150.555 (more than 2 decimal places)
Expected: Error message indicating amount must have at most 2 decimal places.
Budget report
Prerequisites: A budget has been set and at least one event exists.
Test case: budgetreport
Expected: Report showing total budget, total spent, remaining balance, and expenses per event is displayed.
Resetting budget
budgetresetUndoing a command
Prerequisites: At least one command that modifies data has been executed (e.g., add, edit, delete).
Test case: add n/Test Person y/2 s/T1234567A e/test@example.com p/12345678 d/None r/Member followed by undo
Expected: The added member is removed. System returns to state before the add command.
Test case: undo when no commands to undo
Expected: Error message indicating no commands to undo.
Redoing a command
Prerequisites: At least one undo command has been executed.
Test case: undo followed by redo
Expected: The undone command is reapplied. System returns to state after the original command.
Test case: redo when no commands to redo
Expected: Error message indicating no commands to redo.
Undo/Redo with multiple commands
add, edit, delete), then undo multiple timesundo reverts one command in reverse order.Exporting members
Prerequisites: At least one member exists.
Test case: export /to members.csv
Expected: CSV file is created with all member data. Success message confirms export.
Importing members
Prerequisites: A valid CSV file exists with member data.
Test case: import /from members.csv
Expected: Members from CSV file are imported. Success message shows import summary.
Test case: Import file with invalid format
Expected: Error message indicating file format issues.
Test case: Missing data file
Close the app.
Navigate to your project’s data/ folder and delete addressbook.json.
Re-launch the app by double-clicking the JAR file.
Expected: The app starts successfully with an empty member list.
No crash or error message appears.
Upon adding a new member or closing the app, a new valid addressbook.json file is created automatically.
Test case: Corrupted data file
Close the app.
Navigate to your project’s data/ folder and open addressbook.json in a text editor.
Delete or modify part of the file (e.g. remove a closing brace } or change a field name). Save and close the file.
Re-launch the app by double-clicking the JAR file.
Expected: The app displays a warning in the logs:
"Data file not in the correct format. Starting with an empty AddressBook."
The UI shows an empty list of members.
On exit, the corrupted file is replaced with a new, valid empty JSON file.