← back to the sticker book
Swift Β· SwiftUI Β· SwiftData

LifeTracker

My own Notion. To-dos, my weekly schedule, calendar, budget, gym plans, classes and a photo diary, all in one native Mac app built on shared data. I use it every day.

SwiftSwiftUISwiftDataOAuth / Google Calendar

try it

Click around the app

Every page in the sidebar works. Tick off to-dos, add a budget entry, pick a gym day.

An HTML copy of the app's pages and colors, with sample data. The real thing is SwiftUI on macOS.

how it works

Seven pages, one set of data

Every page is its own SwiftUI module, but they all sit on shared SwiftData models. That's what makes it feel like one app instead of seven: exams from School and tasks from the Weekly Schedule show up on the Calendar next to regular events.

A week that resets itself

The Weekly Schedule clears itself at midnight every Sunday, so each week starts fresh. Anything marked "repeat" stays put.

Budget with a running balance

Each month has its own income and expenses, and the total balance carries over from month to month, so I always know where I actually stand, not just this month.

Google Calendar sync

It signs in with Google using OAuth (with PKCE) and read-only access, then pulls events from all of my calendars so everything is in one place.

A photo a day

Memories is a monthly grid where each day can hold a photo. Photos live inside the app's own SwiftData store, not scattered around the disk.

Gym templates

Push, Pull and Glutes days, plus Core, are saved templates with sets, reps and weight, so starting a workout is one click.

the tricky parts

The migration that ate my classes

I added one new required field to a SwiftData model, and on the next launch every row of that type was gone. SwiftData rebuilt the table, and the default value only existed in Swift code, so there was nothing to migrate the old rows to. I restored them from a backup with sqlite3, and now every new field is added as optional with a clean accessor on top.

Another app wiped my database

By default, SwiftData apps outside the sandbox all share one file path. One day a macOS system process opened that same file, migrated it to its own schema, and dropped all of LifeTracker's tables. The app now keeps its store in its own folder and makes an automatic backup on every launch and quit.