Skip to content

User Guide

The user documentation is now split into focused subpages so the package can be learned in layers instead of one long document.

Suggested Reading Order

  1. Getting Started for installation, runtime expectations, and the shortest working example.
  2. E2eeBackend for the all-in-one stateful API that manages password auth, browser storage, and client lookup.
  3. Modeling Entities for field definitions, encrypted field flags, validation, and custom services.
  4. Adapters and Transports for protocol integration over GraphQL or REST.
  5. External Datasources for provider modules that call third-party APIs such as task systems.
  6. Crypto, Auth, and Compatibility for crypto strategy selection, auth helpers, and legacy blob migration.
  7. Advanced Usage if you need to bypass the higher-level orchestration layer.

Prefer E2eeBackend for browser applications that want the package to manage password-derived key state, browser persistence, and context injection.

Use defineEntityModel(...) plus createEntityClient(...) directly when you want the same repository and model-building behavior without the stateful orchestration layer.

That path gives you:

  • one place to declare local and remote field mapping
  • runtime validation before encrypting and after decrypting
  • per-model repository generation from a single models object
  • an easy upgrade path to custom model-specific service surfaces or a higher-level root backend object

Reach for direct createEntityRepository(...) wiring only if you need lower-level control than the factory API allows.

If your app also talks to third-party APIs with decrypted integration config, use createExternalE2eeApiClient(...) rather than the repository factory. That pattern is documented in External Datasources.