0001: Local SwiftData store, CloudKit sync, no backend#

  • Status: Accepted

  • Date: 2026-05 (decided at project start, confirmed when v1.0 shipped on 2026-06-14)

Context#

Wake is a solo sailor’s logbook. Logging must work at the helm with no signal: one tap is one local save, and GPS is attached best-effort afterwards. The alpha (the owner and a few sailing friends) must start without sign-up or accounts. There is one developer and no budget or appetite for running a server. Apple-native frameworks avoid third-party dependencies.

Decision#

  • The on-device SwiftData store is the source of truth, and every event commits locally before any GPS or network work.

  • CloudKit private database sync (iCloud.com.svenfi.wake for Release, iCloud.com.svenfi.wake.dev for Debug) is a best-effort cross-device convenience and backup, never a precondition for logging.

  • There is no backend and there are no accounts; data belongs to the user’s Apple ID.

  • Models stay CloudKit-compatible: every stored property optional or defaulted, no unique attributes, .nullify relationships with inverses.

  • The production schema is add-only after the first release: never rename or remove a stored field, and treat new stored fields or @Model types as deliberate decisions (size:phase).

Consequences#

  • No server costs or operations, and logging works offline.

  • Data is tied to the user’s Apple ID, with no web access.

  • Multi-user crew entry (WAK-20, #36) and sharing voyages (WAK-22, #38) cannot be built on the private database alone and need a new ADR.

  • A boat gateway that logs while the phone is not aboard, or an anchor alarm that reaches the phone ashore, questions the no-backend part (WAK-24, #40, and the section “Later: boat data and passage planning” in the workflow overhaul plan) and needs a new ADR.

  • Sync regressions in iOS, such as the iOS 26 SwiftData sync bug in Apple Developer Forums thread 811675, are outside our control, so sync is tested on real devices and logging never waits for it.

  • Schema mistakes are permanent once shipped.