localdata demo

Everything runs in this tab. Nothing is uploaded; the only network requests are for this page's own files.

Sprint 5 (18 Nov 2026): Working: a documents API (putDocument, queryChunks returning chunk text and source page, deleteDocument; all-or-nothing, with clear(ns) removing a document namespace physically), prototype-safe keys and values, size-checked OPFS reads, a sweep of unreferenced records on open, all on OPFS, IndexedDB and memory in Chrome on an Apple M5 Pro with 48 GB (not measured on 8 GB). Not yet: HNSW, quantisation, compaction, encryption at rest, an 8 GB measurement.

Local build local

Browser requirements

All Airplane Mode Labs demos share one browser origin (airplanemode-labs.github.io): storage, quota, estimate() and persist() are shared between them. This demo writes only under airplanemode-localdata (namespace demo-fill for the quota fill).

What this demo does not do yet

Store

No store open.

set / get / delete

Open a store first.

navigator.storage (live, refreshed every 2 s and after each action)

estimate().usage -
estimate().quota -
usage / quota -
persisted() -

storage.* events (live)

This page registers an EventSink with createStore({ events }) and lists every event it receives, newest first, last 50 only. Each event carries the namespace, the driver, an outcome, a byte count and a duration. It never carries a key, a prefix or a value.

0 event(s) received

    Vector index

    Deterministic synthetic vectors (dimension 384) with 256-byte synthetic chunks, written with putVectors into the namespace demo-vectors on OPFS (IndexedDB when OPFS is missing). No real documents and no model.

    100k rows use about 183 MB of this browser's storage (shared with other Airplane Mode Labs demos on this origin); Delete index removes it.

      Measured in this tab on this device. The README figure is from an Apple M5 Pro 48 GB; not measured on 8 GB.

      Documents

      Three synthetic documents of four chunks each (fixed made-up sentences with seeded vectors of dimension 384; no real document and no model), stored with putDocument in the namespace demo-docs and found again with queryChunks, which returns each chunk's text and the page it came from. The page uses its own store (OPFS, else IndexedDB) and closes it after every action, so Reload page followed by List documents is a genuine reopen.

        Delete hides a document's chunks in one commit; Clear namespace removes every file or record of the namespace, and the line above shows the browser's own count afterwards. Measured in this tab; not measured on 8 GB.

        Quota fill

        Writes 4 MiB chunks of random bytes (crypto.getRandomValues, synthetic) as keys fill-000001, fill-000002, ... under namespace demo-fill until the SDK soft quota or the browser reports quota_exceeded, Stop is pressed, or the ceiling is reached.

        Hard ceiling 512 MiB per run; this consumes quota the runtime demo also uses; use Clear fill afterwards