Skip to content

Arechii/Fafnir

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

16 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Fafnir

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.

Features

  • 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.

Tech

  • SwiftUI, single-module app, no view models β€” screens observe the database directly
  • GRDB for SQLite access; ValueObservation streams keep every screen live-updated as data changes
  • Schema is created and seeded via DatabaseMigrator migrations (in DEBUG the database is erased on schema change, so migrations can be edited freely during development)

Project layout

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

Running

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.

About

Personal expense tracker for iOS (SwiftUI + GRDB, local-only)

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages