# ahmed-rivet-convex

A client-only, local-first data runtime for the browser: a reactive query
layer over an IndexedDB-backed store, with optimistic writes and durable
reconciliation.

## Published Interface

Only the browser client is published:

- `ahmed-rivet-convex` — the client, schema builders, and client types.
- `ahmed-rivet-convex/react` — `ZeroProvider`, `useZero`, and `useQuery`.

Server, database, and CLI modules are not part of the npm artifact.

## Behaviour

Tables omitted from a backend response are untouched. A table present with an
empty array is authoritatively cleared. `pokeDirect()` resolves only after the
new head is durable in IndexedDB, and adapters call `markTablesReady()` only
after that authoritative reconciliation succeeds. `localHydrationComplete` is a
separate signal for warm-cache rendering.

Adapters that supply their own pokes must floor every `lastMutationIDChanges`
entry with `currentLastMutationIDs`. An entry below what is already durable —
for another tab's client especially — makes the local store unable to persist,
permanently. See the API docs on that accessor.

## Release checks

```sh
npm run check-adapter
npm run build
npm pack --dry-run
```

`npm run build` emits the client distribution under `dist/` and rejects
server-only declarations or entry points before npm can publish them.
