A local-first SQLite vault where the secrets are ciphertext the database cannot read: vaults as key boundaries, encrypted item fields, blind indexes for the few searches that must still work, TOTP seeds, password history, sharing and an audit log.
A small local-first SQLite schema for habit tracking: habits with date-versioned schedules, one row per completion, pauses that skip a streak instead of breaking it, reminders, and streaks derived from check-ins rather than stored as a counter.
A local-first SQLite notes database: notebooks and notes, wiki-style backlinks parsed from note bodies into a link graph, tags, attachments, a full-text search index, revision history and last-writer-wins sync with a conflict record.
How a calendar app models its data: calendars and sharing, events with their own time zones, RRULE recurrence with exception dates and per-occurrence overrides, attendees and RSVP, reminders, working hours and a free-busy index.
How a cloud drive models its data: a folder tree, versioned files, content-addressed blocks that deduplicate identical uploads to a single copy, shares and expiring public links, per-device sync cursors, trash retention and quota accounting.