A small, personal expense tracker for iOS. Log expenses in a couple of taps, set budgets per category or for the whole month, and see at a glance how the month is going. Everything lives in a local SQLite database on the device β no accounts, no sync, no network.
Amounts are stored as integer ΓΈre and displayed in NOK.
- Home β monthly overview with a summary card and per-category cards showing spend vs. budget. Tap a category to quick-log an expense; long-press to edit it, set its budget, view its expenses, or delete it. Browse back through previous months.
- Ledger β the full expense list, with editing.
- Wishlist β things you're considering buying, filed under a category.
- Subs β recurring subscriptions (monthly or yearly), with monthly-equivalent cost.
- Categories β user-defined, with optional emoji icon and color, one level of subcategories, and manual reordering. Deleting a category that still has expenses, subscriptions, or wishlist items archives it instead of destroying history.
- Budgets β a default budget per category plus per-month overrides, and an overall month budget with the same default/override scheme.
- SwiftUI, single-module app, no view models β screens observe the database directly
- GRDB for SQLite access;
ValueObservationstreams keep every screen live-updated as data changes - Schema is created and seeded via
DatabaseMigratormigrations (in DEBUG the database is erased on schema change, so migrations can be edited freely during development)
Fafnir/
βββ FafnirApp.swift # entry point, injects database + router
βββ ContentView.swift # tab bar
βββ Router.swift # tab selection & cross-tab navigation
βββ Database/
β βββ AppDatabase.swift # connection, migrations, seed data, write API
β βββ Models.swift # Category, Expense, Budget, Subscription, β¦
β βββ Queries.swift # read queries used by the screens
β βββ AppDatabase+Environment.swift
βββ Screens/ # HomeView, LedgerView, WishlistView, SubscriptionsView
βββ Sheets/ # quick entry, category form, budget, reorder
βββ Components/ # shared views & helpers
Open Fafnir.xcodeproj in Xcode and run the Fafnir scheme (iOS 27+). GRDB is resolved automatically via Swift Package Manager. The database file is created under Application Support (Database/fafnir.sqlite); in DEBUG builds its path is printed to the console on launch.