Client foundation

Local-first validation

Seed browser-local SQLite from the server-rendered Records response, then verify that a permission revocation cannot be undone by stale cached data.

Authenticated sync transport
Live API
Pull the durable Record change log into persistent browser SQLite, queue schema-governed content without sending it, then explicitly publish the local outbox through the same authorization and type rules used by Feed.

Pull Records

Read-only. Applies unseen server changes to the local replica.

Queue commands

Offline-only. Notes, Comments, and Reactions share one ordered outbox.

Publish outbox

Writes to PostgreSQL, then pulls the authoritative Record back.

Offline outbox
Queue commands locally, inspect their exact order, discard them safely, or publish the batch. Comments and Reactions target the first compatible Note in the current server-rendered feed.
Discard changes only this browser database. Publish is the only action here that writes to PostgreSQL.
SSR seed
API unavailable
Rendered by the existing React Router loader before hydration.
Local database
Not initialized
PowerSync supplies browser-local SQLite; TanStack DB remains the reactive view layer.
Revocation guard
Ready
A newer tombstone must always beat an older cached upsert.
Validation sequence
A small end-to-end proof of the client boundary we can reuse from TanStack, Next.js, React Native, SwiftUI, or Kotlin clients.
01

Server-render the seed

The route loader reads the same typed API contract used by Feed.

02

Initialize local storage

The PowerSync adapter opens an isolated in-memory SQLite VFS only after hydration.

03

Commit a local replica

Records become versioned replica entities under the Network sync scope.

04

Prove safe removal

A newer revocation tombstone is committed, followed by a deliberately stale upsert.

Storage safety and the authenticated transport now share the same framework-neutral client runtime. The persistent live replica is separate from this resettable test.
Latest result
Browser-local values from this test run.
Seeded rows
Visible after revoke
Tombstone reason
Revoked entity
Total test time