Skip to content

Instantly share code, notes, and snippets.

@StewartLynch
Created February 10, 2026 16:40
Show Gist options
  • Select an option

  • Save StewartLynch/2506140008e44e2b9bd84b7c0e031afb to your computer and use it in GitHub Desktop.

Select an option

Save StewartLynch/2506140008e44e2b9bd84b7c0e031afb to your computer and use it in GitHub Desktop.
Personal Finance Tracker Prompt

Create a SwiftUI Personal Finance Tracker app using SwiftData with the following features:

  1. Data Models:

    • Category: name, color, monthly budget amount, icon (SF Symbol name)
    • Transaction: amount, date, note, relationship to Category
    • Use SwiftData for persistence with proper relationships
  2. Main Dashboard:

    • List of categories showing: name, icon, color
    • For each category: amount spent this month vs budget
    • Progress bar or ring showing budget utilization
    • Visual warning (red) when over budget
    • Total spent this month across all categories
  3. Add Transaction:

    • Sheet to add new expense
    • Fields: amount (currency input), category picker, date picker, optional note
    • Quick "today" date default
    • Validation for required fields
  4. Category Management:

    • List of all categories
    • Add/edit categories with name, budget amount, color picker, SF Symbol picker
    • Include common defaults: Groceries, Dining, Transport, Entertainment, Shopping
  5. Transaction History:

    • List of recent transactions grouped by date
    • Show category icon, name, amount, note
    • Swipe to delete
    • Filter by category and date range
  6. Category Detail View:

    • Show all transactions for that category this month
    • Display chart showing spending over time (line or bar chart using Swift Charts)
    • Show remaining budget amount

Use modern SwiftUI patterns with proper MVVM separation. Follow SwiftData best practices for relationships and queries. Include sample data with 3-5 default categories and some test transactions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment