learn and share notes on atproto (wip) 馃
malfestio.stormlightlabs.org/
readability
solid
axum
atproto
srs
Data Model Mapping#
This document maps the public AT Protocol Lexicon records to our internal SQL database schema.
Principles#
- Separation of Concerns We store "my view" of the world (private state) separate from "the network's view" (public records).
- Hydration We allow hydrating public records into local DB rows for efficient query/indexing, but the source of truth for the record itself is the signed commit in the repository.
- Private State User progress, scheduling, and local-only drafts live ONLY in the internal DB.
Mapping Table#
| Public Lexicon | Internal DB Table(s) | Notes |
|---|---|---|
org.stormlightlabs.malfestio.deck |
decks |
Public metadata. |
org.stormlightlabs.malfestio.card |
cards |
Content. |
org.stormlightlabs.malfestio.note |
notes |
Standalone notes. |
org.stormlightlabs.malfestio.source.* |
sources |
Metadata for articles/lectures. |
org.stormlightlabs.malfestio.collection |
collections |
|
org.stormlightlabs.malfestio.thread.comment |
comments |
|
| (None) | reviews |
Private. Logs of every review event. |
| (None) | study_progress |
Private. Current SRS state for a card (box/interval/ease). |
| (None) | user_settings |
Private. Daily goals, UI references. |
| (None) | drafts |
Private. Content being authored before publishing. |
Sync Strategy#
- Publishing:
Write to
drafts-> User clicks "Publish" -> Sign record -> Push to PDS -> Movedraftscontent todecks/cardstables (or mark as synced). - Consuming: Pull from PDS (firehose or direct sync) -> Validate signature -> Upsert into local tables.