How do you design an offline-first architecture?
The point
Offline-first: the app always works with the local database as the source of truth, and the network is merely a way to synchronize. The UI reads from SwiftData/Core Data/SQLite (GRDB) and never waits for the server; a write first lands in local storage, then in a queue for sending. The user sees no difference between "online" and "offline" except a sync indicator.
The rest of this answer, with code and interview follow-ups, is in the DevPrep app.
Read the full answer in DevPrep