Directories hold tables.
Create a table by naming it. DBOPFS opens or creates the matching OPFS directory and remembers its handle for the current page.
Browser-native persistence
DBOPFS maps tables to directories and records to files in the browser's Origin Private File System. It keeps the API small, the storage local, and each application's records in a stable namespace.
A legible storage model
DBOPFS is intentionally direct. The application ID chooses an app-owned directory, a table becomes a child directory, and every record is stored as one file.
Create a table by naming it. DBOPFS opens or creates the matching OPFS directory and remembers its handle for the current page.
Use .json for parsed structured values, .txt for text, or .ndjson for newline-delimited records.
A validated application ID places data below apps/<application-id>, reducing accidental cross-app reads and clears. It organizes trusted same-origin apps; it is not a hostile-code security boundary.
DBOPFS Studio Extension
DBOPFS Studio turns an origin's DBOPFS applications, tables, and records into a focused browser workspace. Connect from the extension toolbar or directly from DevTools (the Console) while inspecting a site.
Make the site active, select the DBOPFS Studio toolbar icon, verify the displayed origin, and open a Studio tab connected to that site.
Open DevTools on the site, select the dedicated DBOPFS Studio panel, and choose Open Studio window. The workspace connects to the page DevTools is inspecting.
Install and initialize
Install 1.0.0 from npm, or download the same verified tarball from the GitHub release for plain self-hosted browser JavaScript.
npm install dbopfs@1.0.0
curl -fL https://github.com/TheWizardNexus/DBOPFS/releases/download/v1.0.0/dbopfs-1.0.0.tgz -o dbopfs-1.0.0.tgz
mkdir -p vendor/dbopfs
tar -xzf dbopfs-1.0.0.tgz -C vendor/dbopfs --strip-components=1
<meta name="arcane-app-id" content="my-app">
<script type="module">
import '/vendor/dbopfs/arcane/modules/DBOPFS.js';
await window.dbopfs.readyPromise;
await window.dbopfs.set(
'users',
'alex.json',
{name:'Alex',role:'admin'}
);
const user=await window.dbopfs.get(
'users',
'alex.json'
);
</script>
One browser import for either source. With npm, expose node_modules/dbopfs/ as /vendor/dbopfs/. The GitHub Release commands extract the same verified package directly into vendor/dbopfs/. Keep the complete directory layout in both cases.
Serve it over HTTPS or localhost. OPFS is a secure-context browser API. Opening the page directly from a file: URL will not provide the required storage surface.
Designed for application code
Set, get, enumerate, filter, count, delete, and clear records. Batch methods return settled results so one rejected record does not hide the rest.
Read a browser File, inspect modification metadata, write strings or bytes, and append when the selected record format supports it.
Export the current app database as a deflate-compressed PNG payload and restore it into the same application scope.
In Arcane, the native application binding is authoritative. In an ordinary browser, a stable metadata declaration supplies the application ID.
Learn when to await immediately, when independent operations can overlap, and why sequencing is not the same as a transaction.
Know the boundary
DBOPFS does not create a server, account, synchronization layer, encryption boundary, or cross-origin database. Applications may build secure preload and synchronization services around it; browser site-data controls, quota, and eviction policy still apply.
The playground performs structured operations against its own dbopfs-playground namespace and shows the exact code for each action.