CouchSet documentation
A typed Couchbase model layer with explicit operational primitives.
CouchSet is a Couchbase model layer for TypeScript and Node.js. It keeps key-value and SQL++ capabilities visible while adding model metadata, typed reads, validation, relationships, transactions, Search, Eventing, and operational planning.
Choose the entrypoint deliberately
The package root, couchset, is the compatibility-oriented legacy API. New applications should normally import from couchset/next, which contains the modern singleton API and client-owned primitives described here.
What CouchSet is (and is not)
| CouchSet does | CouchSet does not |
|---|---|
| Typed models, safe filters, codecs, hooks | Hide Couchbase behind a magic ORM |
| Explicit collection / index / Search / Eventing plans | Create resources merely because you imported a model |
| Client-owned registries and transactions | Claim authorization from soft-delete or defaultWhere filters |
| Search, geo, time-series, Eventing helpers | Auto-drop indexes or Eventing functions |
Start here
Install and choose an API
Create a model and perform the first write and read.
Connect
Lifecycle, environment variables, health, and shutdown.
Define models
Definitions, registries, keys, collections, and indexes.
Read and write
CRUD, safe filters, projections, pagination, and SQL++.
Capability map
| Need | Read |
|---|---|
| Validation, dates, and transforms | Validation and codecs |
| Typed relationships and document methods | Relationships and hydration |
| Collections, indexes, transactions, and CAS | Provisioning and transactions |
| Plugins, hooks, scopes, bulk, and instrumentation | Extensions |
| Full-text, vector, hybrid, and geo | Search and geospatial |
| Eventing plan/apply lifecycle | Eventing |
| Time-series chunks and ranges | Time series |
| CLI plan/apply commands | Operations and CLI |
| Exports and concise signatures | API reference |
Suggested path
- Getting started → first insert/get
- Models + CRUD → day-to-day data access
- Provisioning → make keyspaces and indexes real
- Pick capabilities as needed: relationships, Search, Eventing, time series
CouchSet does not create collections or indexes merely because a model was imported or bound. Provisioning, replacement, cleanup, and Eventing deployment are explicit.