| OnBoarding | User Name | Preferred Currency |
|---|---|---|
![]() |
![]() |
![]() |
| Add Account | Add Transaction | Add Budget |
|---|---|---|
![]() |
![]() |
![]() |
| Details | Correct Balance | Transfer Balance |
|---|---|---|
![]() |
![]() |
![]() |
| Home | Exchange Rates |
|---|---|
![]() |
![]() |
Trackify is a simple yet powerful iOS expense tracking app designed to help you take control of your finances. Built with SwiftUI and SwiftData, Trackify showcases a clean architecture and modern iOS development practices.
Trackify is built with a focus on clean, scalable, and maintainable code, leveraging cutting-edge iOS technologies and best practices:
-
Clean Architecture:
- Designed with a modular structure to separate concerns and enhance scalability.
- Layers include Data Sources, Repositories, Services and Views, adhering to Clean Architecture principles.
-
RESTful API Integration:
- Fetch currency exchange rates from a RestAPI
-
Dependency Injection:
- Implements dependency injection using the
Swinjectpackage to ensure flexibility and testability. - Utilizes
GRDBQueryto instantiate view models with injected dependencies, streamlining data flow and reducing coupling.
- Implements dependency injection using the
-
Database Integration:
-
SwiftData: The app uses SwiftData as the persistent data solution for seamless management of accounts, transactions, and budgets.
-
Relationships:
- One-to-many relationships:
- Accounts have many transactions and many budgets.
- Categories have many transactions.
- Many-to-one relationships:
- Each transaction belongs to a specific account and category.
- Each budget can be associated with one preferred account but may link to many accounts.
- Many-to-many relationships:
- A budget can be linked to many accounts, and an account can have many budgets.
- One-to-many relationships:
-
Custom database methods eliminate the use of the built-in @Query wrapper, providing more control and flexibility over database queries and reducing boilerplate code.
-
-
Reports and Insights (Planned):
- Utilizes SwiftCharts to present financial data in a visually engaging and interactive way.
- Includes bar charts, pie charts, and line charts to provide an in-depth analysis of income, expenses, and budget trends.
- Customizes chart designs to align with the app's clean and intuitive user interface.
- Implements dynamic filtering to allow users to view data based on specific categories, accounts, or time periods.
-
CloudKit Integration (Planned):
- Implements CloudKit to provide secure and seamless data synchronization across devices.
- Ensures user data, such as accounts, transactions, and budgets, is backed up and accessible on any iOS device.
- Handles conflict resolution and offline caching to ensure data integrity and usability, even in low-connectivity scenarios.
- Multi-Account Support: Manage multiple accounts effortlessly, each in a different currency.
- Multi-Currency Support: Fetch real-time exchange rates and view your net worth in the currency of your choice.
- Budget Management: Set monthly budgets and track your spending to stay on top of your financial goals.
- Transaction Tracking: Categorize your income, expenses, and transfers with predefined or custom categories.
- Insightful Reports: Visualize your financial data through charts and detailed reports.
- User-Friendly Interface: Built with simplicity and ease of use in mind.
- Dark and Light Mode Support: Seamlessly switch between dark and light modes to suit your preference and environment.
The app uses SwiftData to manage its persistent data layer. Below are the key database tables and their relationships:
The Account model represents a user's financial account, which holds information like the account name, balance, currency, and a unique identifier.
- Fields:
accountId(UUID): Unique identifier for each account.name(String): The name of the account.balance(Double): The current balance of the account.currency(Currency): The currency in which the account balance is denominated.createdAt(Date): The date the account was created.updatedAt(Date): The date the account was last updated.hexColor(String): A color associated with the account for user interface representation.
- Relationships:
- Transactions (
[Transaction]): A one-to-many relationship with theTransactionmodel, where transactions linked to an account are deleted if the account is removed. - Budgets (
[Budget]): A one-to-many relationship with theBudgetmodel, where budgets linked to an account are deleted if the account is removed.
- Transactions (
The Budget model tracks user-defined budgets, including the budget type (weekly, monthly, or yearly), the associated amount, and the accounts it applies to.
- Fields:
budgetId(UUID): Unique identifier for each budget.name(String): The name of the budget.type(BudgetType): The type of the budget (weekly, monthly, yearly).amount(Double): The budgeted amount.startDate(Date): The start date for the budget.currency(Currency): The currency used for the budget.preferredAccount(Account): The preferred account for the budget.accounts([Account]): The list of accounts associated with the budget.
- Relationships:
- Preferred Account (
Account): A one-to-one relationship linking to the preferred account for this budget. - Accounts (
[Account]): A many-to-many relationship linking to accounts associated with this budget.
- Preferred Account (
The Category model defines categories for transactions, allowing users to categorize their financial activities.
- Fields:
name(String): The name of the category.isCustom(Bool): A flag indicating whether the category is custom or predefined.
- Relationships:
- Transactions (
[Transaction]): A one-to-many relationship with theTransactionmodel, where transactions belonging to a category are deleted if the category is removed.
- Transactions (
The Transaction model represents individual financial transactions linked to accounts and categories.
- Fields:
transactionId(UUID): Unique identifier for each transaction.accountId(UUID): The account associated with this transaction.name(String): The name of the transaction.type(String): The type of the transaction (expense, income, transfer).amount(Double): The amount involved in the transaction.date(Date): The date the transaction occurred.notes(String?): An optional field for additional notes or descriptions about the transaction.
- Relationships:
- Account (
Account): A many-to-one relationship linking each transaction to a specific account. - Category (
Category): A many-to-one relationship linking each transaction to a specific category.
- Account (
- One-to-Many:
- Accounts have many transactions.
- Accounts have many budgets.
- Categories have many transactions.
- Many-to-One:
- Transactions belong to a specific account.
- Transactions belong to a specific category.
- Many-to-Many:
- Budgets can be associated with multiple accounts, and accounts can be linked to multiple budgets.
This project is licensed under the MIT License - see the LICENSE file for details.
Copyright (c) 2025 Mohamad Mohamad










