Skip to documentation
Early accessOpen Fork
Docs/Build

Build

Fork Database

A persistent document database automatically scoped to the current space.

Scoped persistent storage

Every active space can use Fork’s managed document database. The service derives its scope from trusted network identity, so application code never submits a workspace ID or database credential. The default namespace is per space; deployments may intentionally configure project- or organization-level sharing.

Terminal
fork-data scope
fork-data tables
fork-data --help

Use the CLI

Use the preinstalled CLI for inspection, seed data, migrations, and one-off changes.

Terminal
fork-data create-table contacts
fork-data insert contacts '{"name":"Ada","status":"lead"}'
fork-data list contacts --limit 100
fork-data get contacts DOCUMENT_ID
fork-data patch contacts DOCUMENT_ID '{"status":"active"}'

Documents are JSON objects. Lists return an opaque next_cursor; pass it back with --afterfor the next page.

Use it from your backend

Server code reads the base URL from FORK_DATA_API_URL. Keep calls behind application-owned routes that validate the signed-in user and return only the records that user may access.

Node.js
const base = process.env.FORK_DATA_API_URL;
if (!base) throw new Error("Fork Database is unavailable");

const response = await fetch(`${base}/tables/contacts/documents`, {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ name: "Ada", status: "lead" }),
});

if (!response.ok) throw new Error(`Fork Database ${response.status}`);
const document = await response.json();

Inspect data in the control panel

People with control access can open the space’s read-only Database view to list tables and page through JSON documents. The browser never receives the underlying service URL or a database credential.

Fork documentationBuilt from the current control plane