Skip to main content

Sitemap

Every page of the Strata Storage docs, grouped and searchable.

  • sitemap.xmlThe same list, in the format search engines read.
  • feed.xmlNew release notes, for your feed-reader app.
  • RSS feedThe same posts as feed.xml, at the release notes’ address.
  • Atom feedThe same posts in Atom.
  • llms.txtA plain-text summary of the docs, with a link to every page.

Docs

  • Introduction

    Strata Storage provides one key/value API for browser and Capacitor storage adapters, with explicit setup for native paths and optional features.

  • Installation

    Install Strata Storage and verify a browser or Capacitor adapter with the package's current entry points.

  • Quick Start

    Install Strata Storage and write, read and remove your first value using the built-in web adapters.

  • Configuration

    Configure Strata Storage adapters, default storage type, encryption, compression, TTL, and namespacing.

  • Strata Storage migration guide

    Move to the current web factory and opt-in Capacitor adapter registration.

    • migration
    • capacitor
    • web
  • For AI Agents & LLMs

    A single-page, machine-friendly map of strata-storage — entry points, every adapter and feature, framework bindings, and copy-paste integration recipes for AI coding agents.

Guides

  • Guides

    Task-oriented guides for Strata Storage features, platforms, and patterns.

  • Compression Guide

    Guide for using compression features in Strata Storage to optimize storage space.

  • Encryption Guide

    Complete guide for using encryption features in Strata Storage.

  • Migrations Guide

    Guide for implementing data migrations and schema updates in Strata Storage.

  • Query Guide

    Guide for using MongoDB-like queries to search and filter data in Strata Storage.

  • Cross-tab sync

    Enable Strata Storage change notifications across browser tabs and handle remote updates.

    • sync
    • web
  • Time-to-live guide

    Expire Strata Storage keys with a relative TTL, an absolute date, or sliding expiration.

    • ttl
    • expiry
  • Android platform guide

    Use Strata Storage's native Preferences, Secure, SQLite and Filesystem adapters in a Capacitor Android app.

    • android
    • capacitor
  • Capacitor platform guide

    Register Strata Storage's native adapters in a Capacitor app and use the same key-value API on web, iOS and Android.

    • capacitor
    • ios
    • android
  • Device Verification Guide — Native Storage (v2.6.0)

    Audience: The package author (or a contributor who has Xcode and Android Studio available).

  • Firebase Sync Guide

    Sync Strata Storage across devices and users with Firebase — either Cloud

  • iOS platform guide

    Use Strata Storage's native Preferences, Secure, SQLite and Filesystem adapters in a Capacitor iOS app.

    • ios
    • capacitor
  • Web platform guide

    Strata Storage's browser adapters give one key/value API over several browser storage facilities. The adapter you choose still determines persistence, quota and availability.

  • Caching patterns

    Cache serializable values with Strata Storage, a TTL, and explicit invalidation.

    • cache
    • ttl
    • web
  • Session state patterns

    Store temporary client-side session state with Strata Storage while keeping authentication on the server.

    • session
    • ttl
    • web
  • Custom adapter registration

    Register an adapter manually on a Strata instance and understand the current StorageType typing limit.

    • adapters
    • advanced

Examples

  • Examples

    Copy-pasteable examples covering CRUD, frameworks, encryption, sync, and more.

  • Strata Storage Examples

    This directory contains practical examples demonstrating how to use Strata Storage in various scenarios.

  • Advanced Encryption Examples

    Strata's encryption manager runs only when the instance has encryption.enabled true on an instance without that configuration does not turn encryption on. These examples use the async API and a password supplied by the calling application.

  • Queue consented analytics events

    Keep a bounded local analytics outbox with Strata Storage and send it to your own validated endpoint.

    • examples
    • analytics
  • Angular storage service

    Wrap the supported Strata Storage API in an Angular service for local drafts and subscriptions.

    • examples
    • angular
  • Basic CRUD Operations

    Learn how to perform Create, Read, Update, and Delete operations with Strata Storage.

  • Basic Usage Examples

    Simple examples to get started with Strata Storage.

  • Cache management examples

    A cache is useful only when a miss can be recovered. These examples cache JSON data in a browser adapter and let TTL remove stale entries. Strata's Cache adapter stores JSON-serializable key/value data; it is not the browser's Request/Response cache.

  • Capacitor App Examples

    A Capacitor app can use the same set() and get() calls on web, iOS and Android after it registers the native adapters. A browser build exercises the web adapters; native persistence needs device testing.

  • Compression Examples

    Strata's bundled LZ codec runs when the instance has compression.enabled true option on an unconfigured instance does not initialize the compressor.

  • Configuration Examples

    Use defineStorage() for a web-ready instance. It registers the standard web adapters and initializes on the first operation.

  • Cross-tab change examples

    Strata can notify another browser tab about a change to a supported shared adapter. A notification helps a view refresh; it does not make two concurrent writes atomic or synchronize an authenticated session.

  • Sync a local outbox

    Queue browser writes with Strata Storage and replay them to an idempotent server endpoint.

    • examples
    • sync
  • Encryption Examples

    Strata uses Web Crypto for encrypted values. Create an instance with encryption enabled, then provide a password at the operation or instance level. A plain defineStorage() instance does not initialize the encryption manager, even if a later set() passes encrypt: true.

  • Handle storage errors

    Handle failed Strata Storage writes and reads using the public error classes and explicit fallback behavior.

    • examples
    • errors
  • Firebase Sync Examples

    Copy-pasteable examples for syncing Strata Storage through Firebase (Cloud

  • Persist a form draft

    Save, restore and discard a small form draft with Strata Storage without promising an upload or submission.

    • examples
    • forms
  • Angular Framework Examples

    Using Strata Storage with Angular applications.

  • React Framework Examples

    Examples of using Strata Storage with React applications.

  • Vue Framework Examples

    Using Strata Storage with Vue 3 applications.

  • Ionic Capacitor example

    Prepare one Strata Storage instance for an Ionic app and register native adapters before the first operation.

    • ionic
    • capacitor
    • angular
  • Migration Examples

    Examples of implementing data migrations in Strata Storage.

  • Multi-Storage Examples

    A Strata instance can select from its registered adapters. The default list chooses the first available adapter at initialization; a later write error is not automatically retried elsewhere.

  • Offline support examples

    Strata can keep a local draft while the network is unavailable. Sending that draft to a server is an application protocol: the server must accept an idempotency key and return a successful HTTP status before the client removes its queued write.

  • Measure storage work

    Measure Strata Storage reads, writes and local query costs without invented benchmarks or unsupported indexes.

    • examples
    • performance
  • Query stored values

    Query decoded Strata Storage values with supported operators and result options.

    • examples
    • query
  • React Hooks Examples

    Examples of using Strata Storage with React hooks integration.

  • React Native support

    Strata Storage 3.1.4 does not register React Native storage adapters. The native adapters exported from strata-storage/capacitor use Capacitor plugins and require a Capacitor runtime. A React Native app cannot use them by selecting secure, sqlite or preferences in defaultStorages.

  • Local shopping cart

    Keep a small browser cart with Strata Storage while leaving prices and checkout to the server.

    • examples
    • cart
  • Expire local values

    Use Strata Storage TTL, absolute expiry and expiry inspection without treating client expiry as server authentication.

    • examples
    • ttl
  • User Authentication Example

    Strata Storage holds client-side key-value data. It does not authenticate a user, issue a session, or enforce server authorization. The host application must do those jobs. For a browser app, keep the session credential in a server-issued HttpOnly cookie; JavaScript and Strata's cookie adapter cannot create one.

  • Vue storage composable

    Keep a small Vue value in browser storage and clean up the Strata Storage subscription on unmount.

    • examples
    • vue
  • Web Application Examples

    These examples use Strata Storage for client-side key-value state. The server still owns authentication, payments and shared records.

API Reference

  • API Reference

    Reference for the Strata core, adapters, and feature modules.

  • Error Classes

    Strata Storage provides custom error classes for better error handling and debugging.

  • Strata Class API

    The main class for interacting with Strata Storage.

  • Type Definitions

    Complete TypeScript type definitions for Strata Storage.

  • Storage adapters

    Strata Storage presents the same key/value operations to different storage backends. The selected adapter determines where values live and which platform can read them.

  • Filesystem Adapter

    Native file-system storage for iOS and Android via Capacitor.

  • Preferences Adapter

    Store small app settings in native iOS and Android preferences through Capacitor.

  • Secure Storage Adapter

    Store sensitive values through Strata Storage's native secure adapter in a Capacitor app.

  • SQLite adapter

    The optional Capacitor SQLite adapter stores Strata key/value records in a native SQLite database on iOS and Android. Strata's public API remains key/value based: it does not expose raw SQL, indexes or atomic SQL transactions through storage.

  • Cache Adapter

    Store Strata key-value data in the browser Cache API.

  • Cookie Adapter

    Store small, non-sensitive values in browser cookies.

  • IndexedDB Adapter

    Store structured key-value data in the browser's IndexedDB database.

  • LocalStorage Adapter

    Persistent browser storage using the localStorage API.

  • Memory adapter

    The memory adapter keeps values in a JavaScript Map. Its values disappear when the page or process is reloaded. Use it for data you can regenerate, short-lived previews and tests.

  • SessionStorage Adapter

    Session-scoped browser storage using the sessionStorage API.

  • URL Adapter

    Persists state in the page URL — shareable, bookmarkable, reload-surviving UI state.

  • Compression API

    Automatic data compression to reduce storage size and optimize performance.

  • Encryption API Reference

    API documentation for the encryption feature in Strata Storage.

  • Migration API

    Data migration and versioning utilities for evolving your storage schema.

  • Query API

    Advanced querying and filtering capabilities for stored data.

  • Recovery & Integrity

    Overview

  • Synchronization API

    Real-time cross-tab synchronization for browser-based applications.

  • TTL (Time-To-Live) Management

    Overview

  • API Reference

    Complete API documentation for Strata Storage.

Reference

Release notes

  • Strata Storage release notes

    Every Strata Storage release, newest first: what changed and what to do about it.

  • Feed

    Strata Storage release notes, newest first, with RSS and Atom links for your feed-reader app.

  • Strata Storage 3.1.3

    Documentation only: the README drops its CI badge, because releases are built and verified locally.

    • Release
  • Strata Storage 3.1.2

    No API change: the install script is gone, the CLI moved to bin/, and Android SDK fallbacks are 36.

    • Release
  • Strata Storage 3.1.1

    Same-key raw imports keep the migrated value (ISSUE-14).

    • Release
  • Strata Storage 3.0.1

    Android: consuming apps on current AGP configure strata-storage again (ISSUE-12).

    • Release
  • Strata Storage 3.1.0

    importRawSync adopts one foreign localStorage or sessionStorage entry; sessionStorage keys are prefixed again (ISSUE-13).

    • Release
  • Strata Storage 3.0.0

    The web adapters now prefix their keys with strata:, with automatic migration of existing data.

    • Release