stable

Run the showcases

Clone the docs repo and run the full showcase suite — every feature demonstrated as a vitest test that reads top-to-bottom as a tutorial.

Every capability documented on this site is backed by a showcase — a vitest test that exercises the feature end-to-end against the published @noy-db/* packages and reads top-to-bottom as a tutorial. Each file doubles as test, demo, and copy-paste source. If a claim on these pages matters to your decision, you can run its proof yourself in a couple of minutes.

Clone and run

git clone https://github.com/noy-db/docs
cd noy-db-docs
pnpm install
pnpm --filter @noy-db/showcases test

The full suite runs green with no credentials and no cloud account — every store and auth method is exercised locally. The handful of real-provider showcases (AWS, Google/Apple/LINE OIDC, SMTP) skip cleanly unless you set their variables in showcases/.env; see showcases/README.md for the list.

Run a single showcase by file:

cd showcases
pnpm vitest run src/16-with-crdt.showcase.test.ts

Catalog

132 files — 117 numbered showcases plus 15 recipe walkthroughs. Numbering is sparse by design (retired numbers are not reused).

Numbered showcases

#What it demonstratesFile
00Hello, vault00-hello-vault.showcase.test.ts
01Storage: in-memory01-storage-memory.showcase.test.ts
02Storage: JSON files on disk02-storage-file.showcase.test.ts
03Storage: IndexedDB (browser)03-storage-browser-idb.showcase.test.ts
05Storage: routing across two backends05-storage-routing.showcase.test.ts
06Multi-user: grant, revoke, role tiers06-multi-user.showcase.test.ts
07withHistory()07-with-history.showcase.test.ts
08withBlobs()08-with-blobs.showcase.test.ts
09withI18n()09-with-i18n.showcase.test.ts
10withReduce()10-with-aggregate.showcase.test.ts
11withIndexing()11-with-indexing.showcase.test.ts
12Joins (always-core today)12-with-joins.showcase.test.ts
13Live queries (always-core today)13-with-live.showcase.test.ts
14withCrdt() (Yjs interop)14-with-crdt.showcase.test.ts
15withSync()15-with-sync.showcase.test.ts
16withShadow() (read-only frames)16-with-shadow.showcase.test.ts
17withHistory() time-machine reads (vault.at(t))17-with-history-time-machine.showcase.test.ts
18withPeriods()18-with-periods.showcase.test.ts
19withConsent()19-with-consent.showcase.test.ts
20withTransactions() (atomic multi-record ops)20-with-transactions.showcase.test.ts
21Bundle (.noydb container format)21-with-bundle.showcase.test.ts
22Secret unlock (always-on)22-on-secret.showcase.test.ts
23WebAuthn passkey unlock23-on-webauthn.showcase.test.ts
24OIDC split-key unlock24-on-oidc.showcase.test.ts
25Magic-link delegated access25-on-magic-link.showcase.test.ts
26Printable recovery codes26-on-recovery.showcase.test.ts
27Shamir secret sharing for KEK recovery27-on-shamir.showcase.test.ts
28TOTP (RFC 6238) second factor28-on-totp.showcase.test.ts
29Email OTP with transport abstraction29-on-email-otp.showcase.test.ts
30Session-resume PIN30-on-pin.showcase.test.ts
31Lockout, duress, honeypot31-on-threat.showcase.test.ts
32as-csv (plaintext export)32-as-csv.showcase.test.ts
33as-xlsx (Excel multi-sheet export)33-as-xlsx.showcase.test.ts
34as-json (structured multi-collection export)34-as-json.showcase.test.ts
35as-zip (composite records + attachments)35-as-zip.showcase.test.ts
36as-noydb (encrypted .noydb bundle)36-as-noydb.showcase.test.ts
37in-vue (Vue 3 composables)37-in-vue.showcase.test.ts
38in-pinia (defineNoydbStore)38-in-pinia.showcase.test.ts
39in-yjs (Y.Doc-typed collections)39-in-yjs.showcase.test.ts
40in-svelte (zero-dep Svelte stores)40-in-svelte.showcase.test.ts
41in-react (hooks)41-in-react.showcase.test.tsx
42in-solid (Signal-based reactivity)42-in-solid.showcase.test.ts
43in-zustand (StateCreator factory)43-in-zustand.showcase.test.ts
44in-tanstack-query (collectionListOptions etc.)44-in-tanstack-query.showcase.test.ts
45in-tanstack-table (table-state ↔ Query DSL bridge)45-in-tanstack-table.showcase.test.ts
46in-ai (LLM tool-calling adapter)46-in-ai.showcase.test.ts
47in-rest (HTTP ciphertext relay)47-in-rest.showcase.test.ts
48in-nextjs (cookie-session helpers)48-in-nextjs.showcase.test.ts
49by-tabs (BroadcastChannel multi-tab transport)49-by-tabs.showcase.test.ts
50as-json import (preview + apply with three policies)50-as-json-import.showcase.test.ts
51as-blob / as-xml / as-xlsx readers51-as-readers-import.showcase.test.ts
52.noydb bundle: per-recipient expiry + record filters52-as-noydb-bundle-extras.showcase.test.ts
55Storage: meter (drop-in metrics wrapper)55-storage-meter.showcase.test.ts
56Storage: probe (5-axis suitability check)56-storage-probe.showcase.test.ts
70User envelope: per-principal profile + preferences70-user-envelope.showcase.test.ts
71on-password tier-2 capability matrix71-on-password-tier2.showcase.test.ts
72on-webauthn real-provider via Playwright virtual authenticator72-on-webauthn-virtual.showcase.test.ts
73OIDC vault unlock via Sign in with Google (IdP bridge)73-on-oidc-google.showcase.test.ts
74OIDC vault unlock via Sign in with Apple (IdP bridge)74-on-oidc-apple.showcase.test.ts
75OIDC vault unlock via LINE Login (IdP bridge)75-on-oidc-line.showcase.test.ts
76TOTP (RFC 6238) interop with Google Authenticator76-on-totp-google-authenticator.showcase.test.ts
77on-email-otp delivered via real SMTP77-on-email-otp-smtp.showcase.test.ts
78on-magic-link delivered via real SMTP78-on-magic-link-smtp.showcase.test.ts
79withGuard (accounting end-to-end)79-with-guard.showcase.test.ts
80withDerivation (Dim 14)80-with-derivation.showcase.test.ts
81withMaterializedView, eager refresh (Dim 14 v2)81-with-mv-eager.showcase.test.ts
82withMaterializedView, lazy lifecycle (Dim 14 v2)82-with-mv-lazy.showcase.test.ts
83withOverlayedView (Dim 14 v2)83-with-overlay.showcase.test.ts
84declaredDeterministicPredicates (Dim 14 v2)84-with-mv-predicates.showcase.test.ts
85multi-key groupBy85-with-multikey-groupby.showcase.test.ts
86UNION MV (withMaterializedView reads multiple sibling collections)86-with-union-mv.showcase.test.ts
87noy-db describe audit pipeline87-noydb-describe.showcase.test.ts
88Transferable partition bundles (extract → adopt → own)88-transferable-partition.showcase.test.ts
89Document attestation: revocation publishing89-attestation-revocation.showcase.test.ts
90in-devtools (createInspector)90-in-devtools.showcase.test.ts
91in-devtools records paging + write monitor91-in-devtools-records-monitor.showcase.test.ts
92Cross-join query primitive92-with-cross-join.showcase.test.ts
93Snapshot lifecycle (withSnapshots)93-with-snapshots.showcase.test.ts
94i18n hardening (per-layer onMissing, substitute, script, dictKey parity)94-with-i18n-hardening.showcase.test.ts
95in-pinia reactive i18n95-in-pinia-i18n.showcase.test.ts
96automatic snapshot cadence (rolling auto key)96-snapshots-auto-cadence.showcase.test.ts
97AWS credential broker: enroll, rolling credentials, store wiring97-broker-aws.showcase.test.ts
98Storage: Google Drive (real provider, appDataFolder + bundle)98-storage-drive.showcase.test.ts
99Storage: iCloud Drive (real provider, macOS only)99-storage-icloud.showcase.test.ts
100erasable blobs (per-blob CEK crypto-shred)100-with-erasable-blobs.showcase.test.ts
101transitionGuard (state-machine lifecycle)101-transition-guard.showcase.test.ts
102formatted sequences (fiscal numbering)102-formatted-sequence.showcase.test.ts
103refArray (many-to-many integrity)103-ref-array.showcase.test.ts
104reverse-denormalization (FK derivation triggers)104-reverse-denorm.showcase.test.ts
105rollups (aggregate onto a parent field)105-rollup.showcase.test.ts
106in-pinia dynamic vault resolver (federation routing)106-in-pinia-dynamic-vault.showcase.test.ts
107vault.link (managed many-to-many junction)107-vault-link.showcase.test.ts
108staticDict() code-provided dictionary (#291)108-with-static-dict.showcase.test.ts
111Scan-mode full-text search (collection.search)111-scan-search.showcase.test.ts
112debug-plaintext store mode (#413)112-debug-plaintext-mode.showcase.test.ts
113external (direct-serve) blob fields (#412)113-external-blobs.showcase.test.ts
114as-xlsx smart workbook (#414 P1)114-as-xlsx-smart.showcase.test.ts
115as-xlsx global LANG cell (#414 P2)115-as-xlsx-lang-cell.showcase.test.ts
116as-xlsx groupBy summary sheets (#414 P3)116-as-xlsx-summary.showcase.test.ts
117as-xlsx smart import (#414 P4)117-as-xlsx-smart-import.showcase.test.ts
118as-xlsx Google-Sheets QUERY dialect (#414 P5)118-as-xlsx-sheets-query.showcase.test.ts
119as-xlsx schema inference (#414 P4 Mode B)119-as-xlsx-infer-schema.showcase.test.ts
120Client-initiated portability + withdrawal (#199)120-client-portability-withdrawal.showcase.test.ts
121densifyOnWrite + i18n:script-violation event (#435)121-with-i18n-densify.showcase.test.ts
122Client-side lexical retrieval (collection.retrieve) — #308 L1122-with-retrieve.showcase.test.ts
123Persisted lexical index (textIndexPersist) — #308 L1.5123-persisted-index.showcase.test.ts
124Semantic / vector retrieval (collection.retrieve mode:'semantic' + similarTo) — #308 L2124-semantic-retrieve.showcase.test.ts
125Hybrid retrieval (collection.retrieve mode:'hybrid' + fuseRetrieval) — #308 L3125-hybrid-retrieve.showcase.test.ts
126collection.describe() + fieldMeta: two consumers, one source (#483)126-describe-field-metadata.showcase.test.ts
127withArchive() cold-storage sweep127-with-archive.showcase.test.ts
128classified fields (seal, digest, reveal)128-with-classified.showcase.test.ts
129withCustody() — full operation, no ownership129-with-custody.showcase.test.ts
130withForget() crypto-shred130-with-forget.showcase.test.ts
131withLazy() bounded-memory reads131-with-lazy.showcase.test.ts
132deferred numbering (gap-free without CAS)132-deferred-numbering.showcase.test.ts
133withSealedRecord() single-record disclosure133-sealed-record.showcase.test.ts
134AWS credential broker rollover: rolling credentials across a session134-broker-aws-rollover.showcase.test.ts

Recipe walkthroughs

#What it demonstratesFile
·Offline document-attestation verifierrecipe-attestation-verifier.recipe.test.ts
·AWS-KMS PDF attestation (generation side, CI-safe slice)recipe-aws-kms-pdf-attestation.recipe.test.ts
·Browser durabilityrecipe-browser-durability.recipe.test.ts
·Confidential HR records (record tiers end-to-end)recipe-confidential-hr.recipe.test.ts
·Passwordless tier-2 auth via a managed OIDC provider (AWS Cognito)recipe-passwordless-oidc.recipe.test.ts
·User preferences (the reference UserEnvelope shape)recipe-user-preferences.recipe.test.ts
1Personal encrypted notebookrecipe-personal-notebook.recipe.test.ts
2Accounting applicationrecipe-accounting-app.recipe.test.ts
3Real-time collaborative apprecipe-realtime-crdt.recipe.test.ts
4Analytics-heavy queryingrecipe-analytics.recipe.test.ts
8React invoice apprecipe-react-invoices.recipe.test.tsx
9Unlock ceremoniesrecipe-unlock-ceremonies.recipe.test.ts
10Export & portabilityrecipe-export-portability.recipe.test.ts
11Search & RAGrecipe-search-rag.recipe.test.ts
12Production cloud storerecipe-cloud-store.recipe.test.ts

See also

  • Recipes overview — the end-to-end application recipes, each paired with a recipe-* walkthrough above.
  • Start here — the four-step golden path, if you haven't run anything yet.