tane/docs/design
vjrj 182c334883 feat(sync): encrypted device-to-device sync transport (core foundation)
The most foundational Block-2+ gap: the data model was built CRDT-ready
(HLC, tombstones, LWW, append-only Movement) and the import reconciler
proves the merge — but nothing replicated a device's inventory to your
OTHER devices. Only manual file backup/restore moved data between devices.

This lands the transport foundation in commons_core (seed-agnostic, on the
shared connection — the 'one connection, N interfaces' shape):

- SyncTransport: moves an opaque, encrypted snapshot blob between ONE
  identity's own devices. The core carries bytes + does the crypto; the app
  decides what the bytes are and how to merge them.
- NostrSyncTransport: NIP-78 app-data (kind 30078, addressable/replaceable
  per device via the d-tag), content NIP-44-encrypted TO SELF, discovery
  filtered to your own author key. Each device keeps one replaceable record.

Tests (MiniRelay, pure Dart): a snapshot replicates to the identity's other
device; the relay only ever sees ciphertext; another identity neither
receives nor could decrypt; re-push replaces; two devices keep their own.

Confirms the open-decisions §D.4 guarantee (sync leaks neither the key nor
plaintext). NEXT slice (app): a SyncService that serializes the inventory
(reusing ExportImportService), pushes on mutation, and runs the existing
idempotent importInventory on receive; a stable per-install device id;
wire sync into SocialSession.
2026-07-10 23:16:07 +02:00
..
backup-and-recovery.md Add VISION and design docs (backup/recovery, G1 integration, network trust, security/privacy, open decisions); update domain boundary and data notes 2026-07-07 10:49:44 +02:00
block1-status.md test(state): cover InventoryCubit and VarietyDetailCubit; refresh block1 status doc 2026-07-09 22:03:36 +02:00
core-domain-boundary.md Add VISION and design docs (backup/recovery, G1 integration, network trust, security/privacy, open decisions); update domain boundary and data notes 2026-07-07 10:49:44 +02:00
data-model.md feat(inventory): CSV/JSON export and JSON import with LWW reconciliation 2026-07-09 12:46:53 +02:00
data-notes.md Note optional Darwin Core / GBIF / ALA biodiversity-portal bridge as a deferred, opt-in intention (open-decisions C + data-notes 3-bis), with privacy guardrails; not a phase or model change 2026-07-07 11:38:51 +02:00
first-sprint.md Before code 2026-07-07 13:20:00 +02:00
g1-integration.md Fix naming (Seedks->Tanemaki) in PLAN; reconcile data-model with core/domain boundary (Plantare->Pledge, Movement->LedgerEntry notes); fix quantity_label type nit; note social layer as one indivisible block in VISION; add seedks.ttf asset 2026-07-07 11:06:38 +02:00
network-trust.md Add VISION and design docs (backup/recovery, G1 integration, network trust, security/privacy, open decisions); update domain boundary and data notes 2026-07-07 10:49:44 +02:00
open-decisions.md feat(sync): encrypted device-to-device sync transport (core foundation) 2026-07-10 23:16:07 +02:00
security-privacy.md Add VISION and design docs (backup/recovery, G1 integration, network trust, security/privacy, open decisions); update domain boundary and data notes 2026-07-07 10:49:44 +02:00
sharing-model.md Add design docs; update README/PLAN 2026-07-07 01:28:54 +02:00
spike-block2-findings.md spike(block2): de-risk web of trust — the last big unknown 2026-07-10 02:17:35 +02:00
testing.md Before code 2026-07-07 13:20:00 +02:00
usability-and-architecture.md Add design docs; update README/PLAN 2026-07-07 01:28:54 +02:00