PROJECT: Personal Finance Tracker


Overview

This portfolio aims to document the contributions made by Johnson Ho Chong Xiang to the Personal Finance Tracker.

Personal Finance Tracker is a desktop finance tracker application used for tracking personal finances such as daily expenses, recurring expenses such as monthly electricity bills, budgets and debts owed to another party. The user interacts with it using a CLI, and it has a GUI created with JavaFX. It is written in Java, and has about 30 kLoC. The product was morphed from an Address Book over a period of 8 weeks under the constraints described here.

Summary of contributions

  • Major enhancement: added the ability to manage recurring expenses in the finance tracker application

    • What it does: allows the user to add, edit, delete recurring expenses, as well as easily convert these recurring expenses into expenses at appropriate times. Integrated to work with current undo/redo, history and list commands.

    • Justification: This feature improves the product significantly because a user can now easily and conveniently keep track of their recurring expenses, expenses that are periodic and have a fixed frequency and a defined number of occurrences. Examples of these recurring expenses are bills or subscription fees.

    • Highlights: Recurring expenses form a significant portion of a user’s expenses and thus tracking recurring expenses is a core feature of a finance tracker. It required adjustments and integration with the existing model, logic, UI components and builds the foundation for any future enhancements involving recurring expenses.

  • Code contributed: [code collated by reposense]

  • Other contributions:

    • Project management:

      • Check all pull requests done by group mates

      • Create issues for tracking in GitHub Issue Tracker

      • In charge of code in storage component

    • Documentation:

      • Update storage component in Developer’s Guide

      • Added the implementation of recurrings in Developer’s Guide (Pull Request #227)

      • In charge of UserGuide in general. (Pull Request #227)

    • Enhancement to existing features:

      • Refactored code to transform from AddressBook4 to FinanceTracker. (Pull Request #69)

      • Refactored code in storage to transform from AddressBook4 to FinanceTracker. (Pull Request #66)

Contributions to the User Guide

Given below are sections I contributed to the User Guide. They showcase my ability to write documentation targeting end-users.

Listing recurrings : listrecurring

Shows a list of recurrings in the finance tracker according to the view specified.
Format: listrecurring v/VIEW
Shortcut: lr v/VIEW

  • The VIEW specifies how the list of recurrings are displayed.

    • v/all: displays entire list of recurrings

    • v/day: displays list of recurrings with date within a day ago

    • v/month: displays list of recurrings with date within a month ago

    • v/year: displays list of recurrings with date within a year ago

    • v/CATEGORY: displays list of recurrings with CATEGORY

Adding a recurring: addrecurring

Adds a recurring payment to the finance tracker.
Format: addrecurring n/NAME $/AMOUNT c/CATEGORY [d/START_DATE] [r/REMARK] f/FREQUENCY o/OCCURRENCE
Shortcut: ar n/NAME $/AMOUNT c/CATEGORY [d/START_DATE] [r/REMARK] f/FREQUENCY o/OCCURRENCE

  • The NAME should only contain alphanumeric characters and spaces, and it should not be blank.

  • The AMOUNT should only contain positive numbers and reflect the value in dollars. Values accepted are in the range of $0.01 to $9,999,999.99. A maximum of 2 decimal places are allowed.

  • The CATEGORY is case insensitive and should only be one of the following: FOOD, TRANSPORT, SHOPPING, WORK, UTILITIES, HEALTHCARE, ENTERTAINMENT, TRAVEL, OTHERS.

  • The START_DATE should be in dd-mm-yyyy format.

  • If START_DATE is omitted, current date will be used.

  • If REMARK is omitted, no remarks will be stored.

  • The FREQUENCY should consists of D, W, M, Y for daily, weekly, monthly and yearly respectively.

  • The OCCURRENCE should be a number from 1 to 999 inclusive.

You can omit (optional) parameters by leaving them empty.

Examples:

  • addrecurring n/Phone Bill $/50.00 c/utilities d/23-02-2019 r/Signed a new 2 year contract. f/M o/24

  • ar n/Magazine Subscription $/20 c/utilities f/M o/12

Editing a recurring : editrecurring

Edits an existing recurring in the finance tracker.
Format: editrecurring INDEX [n/NAME] [$/AMOUNT] [c/CATEGORY] [d/STARTDATE] [r/REMARK] [f/FREQUENCY] [o/OCCURRENCE]
Shortcut: er INDEX [n/NAME] [$/AMOUNT] [c/CATEGORY] [d/STARTDATE] [r/REMARK] [f/FREQUENCY] [o/OCCURRENCE]

  • Edits the recurring at the specified INDEX.

  • The index refers to the index number shown in the displayed recurring list. The index must be a positive integer.

  • At least one of the optional fields must be provided.

  • Existing values will be updated to the input values.

You can omit (optional) parameters by leaving them empty. If all parameters are empty, no edits will occur.

Examples:

  • editrecurring 9 $/450 c/food
    Edits the amount and category of the 9th recurring to be 450 and food respectively.

Deleting a recurring: deleterecurring

Deletes the specified recurring from the finance tracker.
Format: deleterecurring INDEX
Shortcut: dr INDEX

  • Deletes the recurring at the specified INDEX.

  • The index refers to the index number shown in the displayed recurring list. The index must be a positive integer.

  • At least one of the optional fields must be provided.

You can omit (optional) parameters by leaving them empty. If all parameters are empty, no edits will occur.

Examples:

  • listrecurring v/all
    deleterecurring 2
    Deletes the 2nd recurring in the finance tracker.

Selecting a recurring : selectrecurring

Select the specified recurring from the finance tracker.
Format: selectrecurring INDEX
Shortcut: sr INDEX

  • Selects the recurring at the specified INDEX.

  • The index refers to the index number shown in the displayed recurring list. The index must be a positive integer.

Examples:

  • listrecurring v/all
    selectrecurring 2
    Selects the 2nd recurring in the finance tracker.

Clearing all recurrings: clearrecurring

Clears all recurrings from the finance tracker.
Format: clearrecurring
Shortcut: cr

Converting outstanding expenses from all recurrings: convertrecurring

Converts all outstanding expenses from all recurrings in the finance tracker.
Format: convertrecurring
Shortcut: cre

Contributions to the Developer Guide

Given below are sections I contributed to the Developer Guide. They showcase my ability to write technical documentation and the technical depth of my contributions to the project.

Recurring Feature

The Recurring feature consists of addrecurring, editrecurring, listrecurring, deleterecurring clearrecurring, and convertrecurring.

Recurring expenses are expenses that are periodic and have a fixed frequency and a defined number of occurrences. Examples of these recurring expenses are bills or subscription fees.

This feature allows users to add recurring expenses to the finance tracker and be able to constantly keep track of them. This is done by calling Logic#execute which creates an AddRecurringCommand. This command then calls Model#addRecurring, adding the specified recurring into the recurring list.

This feature also simplifies the deletion and editing of these recurring expenses, and they work in a similar manner.

Convert Recurring To Expense Feature

The purpose of this feature is to provide the convenience for users by adding outstanding expenses from all their recurring expenses into the expense list. After adding recurring expenses into the Finance Tracker, the user can call convertrecurring to make the conversion.

Current Implementation

Below is the UML sequence diagram and a step-by-step explanation of an example usage scenario for convertrecurring.

ConvertRecurringSequenceDiagram
  1. User enters the command convertrecurring, to add outstanding expenses from all their recurring expenses into the expense list. This command is executed by LogicManager, which calls FinanceTrackerParser#parseCommand("convertrecurring"). This creates a ConvertRecurringToExpenseCommand object and returned to the LogicManager.

  2. The LogicManager calls ConvertRecurringToExpenseCommand#execute, which will call Model#getFilteredRecurringList() to retrieve the list of recurrings in the financetracker.

  3. The programme then iterates through the recurring list, and for each recurring, checks the recurring’s lastConvertedDate, which is the last time the recurring has gone through a convertrecurring check.

  4. If the recurring’s lastConvertedDate is before the current date, this recurring will have to be checked again for outstanding expenses that can potentially be added.

  5. The programme then calls Recurring#getRecurringListofExpenses to retrieve the list of expenses that are supposed to be added by this recurring, and iterates through this expense list.

  6. If the expense’s date is before or equals to the current date, and after the lastConvertedDate, this recurring expense will have to be converted into an expense and added into the FinanceTracker. This is done by calling Model#addExpense(recurringListOfExpenses.get(j)).

  7. This is done for every expense that is supposed to be added by this recurring to determine which has to be added into the expense list. After the iteration, the recurring’s lastConvertedDate is set to the current date.

  8. This is done for each recurring in the list.

Advanced Delete and Edit Recurring (coming in v2.0)

This is still a work in progress.

Currently, deleterecurring does not delete expenses already added by the deleted recurring, and editrecurring does not edit expenses already added by the edited recurring.

The purpose of this feature is to make deleterecurring and editrecurring more advanced such that the expenses already added by the recurring to be deleted or edited will also reflect the new changes.