Khuram
06/22/2026, 5:39 PM@Serializable
data class GameSave(val level: Int = 1, val coins: Int = 0)
val save = Documents.document<GameSave>("slot-1")
save.set(GameSave(level = 5, coins = 120)) // write the whole document
save.set { copy(coins = coins + 50) } // copy-style partial update
save.flow().collect { hud.render(it) } // reactive — the UI follows the store
Each document is stored as one key per field, so updating one field writes just that key.
It's not published yet — I'm honestly asking whether it's worth publishing. If the concept doesn't land, or there's already a good answer to this that I've missed, I'd rather know now than keep polishing. If people find it useful, I'll take it the rest of the way.
Repo (early, unpublished): https://github.com/nomemmurrakh/documentsJuan Hurtado
06/23/2026, 6:38 AM