The same view. A new place to run it.

Your browser.
Your live database.

CouchDB-inspired map/reduce, running right here. An AssemblyScript view maps your documents and reduces each group in WebAssembly. No server required.

Local workspaceStarting WebAssembly worker…
0retained documents
0live groups
0committed sequence
Readyreplay verification
01

Bring your documents

Drop a JSON or JSONL file A document array, or one document per line. Up to 1,024 small documents per import. Files stay in this browser.
Add a measurement
Paste JSON or JSONL
02

Watch your views update

metrics@1map → group → reduce
Live metrics computed by the WebAssembly view
MetricCountMeanMinMax
Loading the example…
Observed rangemin max · dot = mean

Loading the shared view module.

AssemblyScript → WebAssembly → dedicated worker Inspect the module
View
Loading…
SHA-256, verified before execution
Loading…
Storage
In memory. Export documents before reloading this page.
Isolation
No host imports. Maximum 16 MiB of WebAssembly memory. Worker requests have a deadline.

JavaScript retains documents and groups emitted keys. The AssemblyScript module performs every map and reduction. This is the same compiled artifact used by the native engine.

Write a view once. Run it here or in Python.

The metrics module accepts documents with a string metric and a finite numeric value. Its map emits the metric as a key. Its reducer maintains count, sum, minimum, and maximum; finalization computes the mean. Other document shapes are ignored by the map.

Numbers use double precision in both environments. Keep large identifiers as strings. Strings must be valid Unicode; each module request is limited to 256 KiB of encoded JSON.

Browser · no backend
import { BrowserDatabase } from "./portable/client.js";

const db = await BrowserDatabase.connect();
await db.add({ metric: "latency_ms", value: 42 });
const rows = await db.rows();
console.log(rows[0].result);
db.close();
Python · the same metrics.wasm
from foldlitedb import Database, View

view = View.bundled("metrics")
with Database("metrics.fold", view) as db:
    db.add({"metric": "latency_ms", "value": 42})
    row = list(db.rows())[0]
    print(row.result)

Your documents are the source of truth

Try the live stream, add a few measurements, then select Rebuild & verify. A fresh in-memory database replays every retained document through the same module and compares its complete view states and results. Existing views keep their cursors.

Exported JSON includes document identities, sources, positions, and payloads. Importing it again is an identical replay: each retained document counts once. Changing an existing identity or position fails the whole batch. Use those same records to rebuild the native database.

A portable computation preview. This browser database keeps documents and view history in memory. Export them to keep your work. The live stream is simulated locally; this page makes no requests containing your documents. Python provides the persistent Rust document-log engine with a disposable view cache.