Skip to main content

App Architecture

Tracker List

Difficulty: Medium

In this challenge, you'll build an expense tracking app that allows users to log expenses, categorize them, and view total spending per category and overall. Users can add, edit, and delete expenses, with all values updating dynamically. The exercise focuses on data organization, state management, and UI navigation.

App Structure

The app consists of the following screens:

Home Screen (Expense List)
  • Displays expense categories as sections.
    • Each section shows total spending and a list of expense items.
  • Users can tap an "Add" button in the top-right navigation bar to create a new expense.
  • At the very bottom, the overall spending total is displayed.
Expense Entry Screen
  • Used for both creating and editing an expense.
  • If editing an existing expense, fields are pre-filled with existing values.
  • A Delete button allows users to remove an expense.

Requirements

Adding an Expense
  • Users tap the "Add" button (top-right of the home screen) to create a new expense.
  • The expense entry screen should allow input for:
    • Amount
    • Category (selected from the preset list: "Food, Travel, Entertainment, Health, Bills").
    • Description (optional)
Displaying Expenses
  • The home screen starts empty and populates dynamically as expenses are added.
  • Expenses are grouped by category into sections.
  • Each section header displays:
    • Category name
    • Total spending for that category
  • Below each header, the expense line items display:
    • Expense amount
    • A description (if present)
Dynamic Updates
  • Tapping on an expense item opens the expense entry screen, pre-filled with the selected expense’s details.
    • The user can edit the expense and save changes.
    • A Delete button at the bottom allows the user to remove the expense.
    • If the last expense in a category is deleted, the category section should disappear from the home screen.
  • At the very bottom of the home screen, display the overall total spending across all categories, updating in real-time.

Above & Beyond

  • Persistent Storage – Save expenses so they persist across app restarts.