Dawnlet · under the hood

How Dawnlet actually works

These pages describe the design of each part of the app — the data it keeps, the rules it enforces, and the decisions that shaped it. They're blueprints, not source code: enough to understand the mechanism and argue with it, without reproducing the implementation.

SwiftUI · iOS 17+ Supabase · Postgres No push server 9 write-ups

Start here

If you only read one, read Architecture — the rest assume its vocabulary (repositories, view models, the module pattern every feature repeats).

The shape of the whole thing

Dawnlet is a native SwiftUI app talking to a Supabase Postgres database. There is no backend service of ours in between: the app authenticates against Supabase directly and queries tables over PostgREST, with row-level security doing the work a server-side authorization layer would otherwise do.

LayerWhat it isWhat it deliberately isn't
ClientSwiftUI. An iPhone and iPad app, Home Screen widgets, an Apple Watch app and its complications — four targets, one codebase Not cross-platform and not a web view. The Watch app is the only target that talks to the database itself; the widgets and complications draw a file the app wrote, because an extension cannot see the app's keychain.
DataSupabase Postgres, one table per concept, RLS on every one No API service of ours, so no endpoint to secure separately or keep in sync with the client.
AuthSign in with Apple, exchanged directly for a Supabase session No password and no custom token minting. Identity is limited to the account ID, the email Apple supplies, and a name only if you share one.
Privileged workOne Edge Function, for account deletion Not a general-purpose API. It exists because deleting an auth user needs a key that must never ship in an app.
NotificationsComputed and scheduled entirely on the device No APNs, no push payloads, no notification server.
PurchasesStoreKit, two subscription products in one group No server-side record of who pays: the entitlement is read from StoreKit on the device, never mirrored into the database.
Why so little server

Every piece of server-side machinery is a thing that can break, leak, or need paying for. The parts of Dawnlet that genuinely need a server — durable storage and cross-device sync — use one. The parts that don't, like deciding whether to remind you about a habit tonight, run where the data already is.

A note on honesty

The app is under active development, and these pages describe what's built, not what's planned. Widgets and the Watch app were listed here as unbuilt until they shipped, and this paragraph changed only once they had. Where something is still a placeholder, the relevant page says so rather than describing it in the present tense.