`@noy-db/in-*` — Host-runtime integrations
Where your code runs. Each
in-*package is a thin binding that adapts the public surface of@noy-db/hub— noy-db's core encrypted document store — into a host runtime or protocol: a framework, an LLM tool-calling loop, REST, Yjs. Every binding is a peer dependency, so you don't pay for what you don't use.
The in- prefix reads as "runs in a host" — each package re-expresses
the hub's existing surface in a host's idiom (a React render loop,
TanStack's cache lifecycle, an LLM tool-calling loop, REST, Yjs) without
adding a capability the hub didn't already have. in-* packages are
optional ergonomics: you can always use @noy-db/hub directly and write
your own binding for a runtime not listed here — most of these packages
are small enough to read in one sitting.
One repository since 0.10.0-pre.0
Every in-* package publishes from the noy-db/in repository as of 0.10.0-pre.0. Before that,
four — rest, relay, devtools and
devtools-tui — published from noy-db/core, alongside @noy-db/hub, so
the 0.9.x releases of those four are on core's version line.
That matters when you pin across that boundary: each repository cuts on its own clock, and a
version number is not a reliable way to tell who published it. Ask npm — npm view @noy-db/in-rest repository.url — rather than inferring from the in- prefix, which describes the layer a package
sits in and never who publishes it.
Catalog
Frameworks
| Package | What it does |
|---|---|
| vue | Vue 3 composables — useNoydb, useCollection, useSync, useBlobURL — via a NoydbPlugin. Works outside Nuxt too. |
| react | React hooks — useNoydb, useVault, useCollection, useQuery, useSync — built on useSyncExternalStore. |
| solid | SolidJS signal primitives — createCollectionSignal, createQuerySignal, createSyncSignal; no DOM dependency, works in SSR and tests. |
| svelte | Zero-dependency Svelte stores — collectionStore, queryStore, syncStore — no svelte peer dependency. |
| nuxt | Nuxt 4 module — one noydb config block auto-imports the in-vue / in-pinia composables and wires an SSR-safe client plugin. |
| nextjs | Next.js App Router helpers — cookie-session server helpers, plus a /client re-export of in-react's hooks. |
Shells
Where the app is running, rather than what it is built with. One SPA can be opened in all three shells, and they do not share storage — see liff for the handoff matrix.
| Package | What it does |
|---|---|
| liff | LIFF boot layer — initLiffApp() detects the shell, enforces LINE Login, reads the ID token for on-oidc, and ingests a share-link deep link. |
| pwa | Installed-app plumbing — storage persistence, a fail-closed eviction guard, install-prompt capture, display-mode detection, an online watcher. |
State
| Package | What it does |
|---|---|
| pinia | Pinia store factory — defineNoydbStore<T>() with a chainable query() and optional schema validation. |
| zustand | Zustand adapter — createNoydbStore() mirrors defineNoydbStore for Zustand, auto-syncing from change events. |
Data & query
| Package | What it does |
|---|---|
| tanstack-query | Framework-free { queryKey, queryFn } / mutation option factories, plus bindInvalidation() for auto-invalidation on change events. |
| tanstack-table | Bridges TanStack Table state (sort / filter / pagination) onto the query DSL and back. |
| rest | createRestHandler({ store, user }) — a framework-neutral REST handler with Hono / Express / Fastify / Nitro adapters. |
| relay | createRelayHandler({ store }) — a transport-neutral frame dispatcher over a narrowed store profile; whole-vault replace and vault enumeration are absent from the type. |
Realtime
| Package | What it does |
|---|---|
| yjs | yjsCollection() stores Yjs Y.Doc CRDT state encrypted at rest — collaborative rich-text fields, offline merging. |
AI
| Package | What it does |
|---|---|
| ai | buildToolset(vault) emits permission-scoped LLM tool definitions (OpenAI / Anthropic / Vercel AI / JSON-Schema); invokeToolCall() dispatches and re-checks permissions. |
Devtools
| Package | What it does |
|---|---|
| devtools | createInspector(db) — a read-only, framework-agnostic inspector: vaults, schema, stats, records, live writes. |
| devtools-tui | Terminal front-end for in-devtools, built on ink — ships the noydb-inspect binary. |
Compare
| Package | Kind | Reactive API | SSR |
|---|---|---|---|
| vue | framework | composable | ✗ |
| react | framework | hook | ✗ |
| solid | framework | signal | ✓ |
| svelte | framework | store | ✗ |
| nuxt | framework | plugin | ✓ |
| nextjs | framework | hook | ✓ |
| liff | shell | n/a | — |
| pwa | shell | n/a | — |
| pinia | state | store | — |
| zustand | state | store | — |
| tanstack-query | data | n/a | — |
| tanstack-table | data | n/a | — |
| rest | data | n/a | — |
| relay | data | n/a | — |
| yjs | realtime | n/a | — |
| ai | ai | n/a | — |
| devtools | devtools | n/a | — |
| devtools-tui | devtools | n/a | — |
No binding fits your runtime?
@noy-db/hub ships a stable event system (db.on('change', …),
collection.subscribe(…) — the subscription returns an unsubscribe
function) that any framework can drive a reactive wrapper against. Inspect
one of the bindings above to learn the pattern and write your own for
anything not yet covered (Qwik, Astro, Alpine, …).
See also
@noy-db/hub— the core client library every binding re-expresses in its host's idiom.- Permissions & keyring — the per-user ACL that gates
in-ai's tool generation and the inspector's read-only views.