CAPABILITY / DATABASE & DOCUMENT LIFECYCLE
A real database lifecycle, observable end to end.
A versioned workbook database over real browser IndexedDB: append-only commits, atomic base-version checks, idempotent retries, bounded tails, compaction, and reload recovery — with every read, write, and byte on a live gauge.
- Storage
- Browser IndexedDB
- Commits
- Append-only DocumentOp[]
- Versioning
- Atomic base-version compare
- Durability
- Pending queue survives reload
VERIFIED IN THIS SCENARIO
Every behavior above is the public contract.
- Atomic sequencing
Each commit compares its base version against the stored head inside one serialized adapter queue — stale writers get a recoverable conflict, never a lost update.
- Idempotent retries
Lose an acknowledgement and retry with the same mutation id: the server answers duplicate with the original version and applies nothing twice.
- Bounded storage
The operation tail is capped by record count and bytes; crossing either bound folds the tail into one compacted snapshot record — watch the gauges.
- Reload recovery
Close and reopen the session (or reload this page): committed state and the durable pending queue come back from IndexedDB exactly once.
OWNERSHIP BOUNDARY
What Sheetwrite provides — and what your host owns.
This showcase runs the full persistence protocol against a real browser database so you can inspect it. The pieces a product must own stay explicitly yours.
- Persistence contract
PersistenceAdapter: snapshot load plus append-only DocumentOp[] commits with applied / duplicate / conflict acknowledgements.
- Durable offline queue
IndexedDbPendingCommitStorage keeps unacknowledged local commits durable across reloads, with bounded restore.
PersistenceAdapter
- Server database
The IndexedDB adapter on this page is demo-only. Production documents live in your database behind your own PersistenceAdapter.
- Authentication & authorization
Sheetwrite never sees credentials. Identity, session, and per-document permissions are enforced by your backend before a commit is sequenced.
- Transport & deployment
HTTP, WebSocket, queues, regions, backups: the adapter interface is transport-neutral by design and ships no network code.