Forward-looking plans only — not a mirror of src/. Doc index: README.md. Design / seams: architecture.md. Shipped features live in src/ and the root README.md — not enumerated here.
- Multi-package split — layers-shaped monorepo; zero-peer
@stainless-code/persistinpackages/core+ opt-inpersist-*/<fw>-persistpackages; hard cut at 0.5.0 (v1 later = stability). Plan:plans/multi-package-split.md. - Remaining ROI work — actionable items not yet shipped: TanStack Query bridge,
examples/workspace, real-browser + SSR + framework-runtime test matrix, React ergonomics layer, OPFS/SQLite/Cloudflare adapters, playground. Plan:plans/remaining-roi.md. - Upstream TanStack Persist collaboration — pitch the
persistSourcemiddleware model (structuralPersistableSource+ first-class hydration lifecycle) to the TanStack Persist maintainers as a merge target, after the stainless-code publish stabilises. Draft:plans/upstream-tanstack-pitch.md.
| Layer | Role |
|---|---|
Core (persist-core + hydration) |
Zero-dep middleware: persistSource, createStorage, codecs, registry, hydration signal. No value imports (gate-test enforced). |
| Codec / backend subpaths | Own their optional peer (seroval, idb-keyval); compose into createStorage. |
| Source adapters | One entry per store library (./sources/<lib>); thin persistSource wrappers, shape-named. |
| Transport | Cross-tab transport adapters (./transport/crosstab — BroadcastChannel bridge). |
| Framework adapters | One entry per framework (./frameworks/<fw>); each is ~30–45 lines over HydrationSignal. |
- No barrel — subpath import is the dependency opt-in; a root barrel would pull every optional peer.
- No store lock-in —
PersistableSourcestays structural; a@tanstack/store-only API would restate zustand persist. - No silent
maxAgeexpiry — prefs shouldn't disappear;maxAgeis opt-in, not default-on (deliberate divergence from Query-persister defaults). - No async-only API — one API; sync backends stay sync on the read path so hydration settles pre-paint when it can.