Expo
Silt brings the MongoDB-compatible API into your Expo application. Documents live in the local SQLite database, and queries and aggregations execute there. The application can use the same supported collection code on the device and on a Node server.
Set up SQLite
Install Silt using local package tarballs while the packages are unpublished. The repository's Expo fixture provides a working source setup.
Install the Expo SQLite version matching your SDK:
Follow the official Expo SQLite setup for your platform.
Open the client
Call this once during application initialization and retain the returned client and database. Use ordinary MongoDB collection methods on db; await client.close() when that database owner is disposed. Avoid opening a new client on each component render.
The package's platform exports select Expo SQLite under the react-native and browser conditions. The shared query engine needs no Node built-ins or mandatory custom SQLite extension. SQLite controls transaction ownership, so concurrent application work should use Silt's client consistently.
Configure the web build
Expo SQLite web requires Metro to handle WASM assets and hosting headers that enable SharedArrayBuffer. Follow Expo's web setup. The repository fixture uses Cross-Origin-Opener-Policy: same-origin and Cross-Origin-Embedder-Policy: require-corp.
Browser storage also has ownership constraints across tabs. Use a single database owner for the origin, and read the advanced browser guide before adding multiple tabs or independent database workers.
Understand the local boundary
The data stays on that device or browser origin. Using the same API on a server does not automatically synchronize local documents with that server.
Actual Expo web execution and native bundle checks are covered by the test fixtures. iOS and Android device runtime validation is still pending. Expo web is itself alpha, and the tested SQLite version has documented numeric limits; see platform evidence and compatibility.
Applications using ShareDB or Teamplay can follow the separate integration guides.