Loading

Guides

Introduction › Guides

  • Model your data — Define classes and attributes, relate them with domains, write and read documents, and choose the class flags that change what a class…
  • Validate & react with triggers — Attach small pieces of JavaScript to a class that run before or after a write, stored as data and hydrated at runtime.
  • Background jobs & scheduling — Define jobs as documents, run them on demand or from a trigger, and let the scheduler run an allow-listed set unattended under the…
  • Query with SQL — Run SELECT statements with joins, aggregation, subqueries and positional parameters against local documents, stream large results, and know…
  • Encrypt fields — Flag an attribute as encrypted, supply the document key the application owns, work with a locked stack, rotate keys, and know what reaches…
  • Scope your data — Seal content under attribute policies with access scopes: mint a scope and issue attribute keys where you control them, label documents…
  • Act as a session — Open a stack as one principal sees it: a session view narrows reads to the scopes a session may open, refuses writes into any other…
  • Write transactions — Stage a multi-document change in memory, read your own staged state, and commit it as one batch through the full authoring pipeline, with…
  • Evolve the schema with patches — Ship your data model as versioned patch documents that apply once per device, merge into existing classes, carry seed data and one-shot…
  • Sync to a remote — Replicate a stack to any PouchDB-compatible remote with one call, show honest sync state, sync many databases at once, and understand the…
  • Google Drive — Sync and back up a stack to the user’s own Google Drive with the published adapter; your application owns the OAuth token, DocStack owns…
  • Filter what replicates — Narrow replication by class or with a predicate, understand why changing a filter re-replicates, and what filters deliberately do not do.
  • React bindings — Mount the provider that owns the database lifecycle and use hooks that are live by default, so components re-render when the data they read…