@byronwade/adapter-json
v0.1.0
Published
File-backed JSON snapshot adapter for Fakebase
Maintainers
Readme
@byronwade/adapter-json
Part of Fakebase — a Supabase-shaped, local/dev-only development platform for Next.js prototypes. Not for production use.
A file-backed JSON adapter. Each table is persisted as a JSON file under .fakebase/ (synchronously flushed on every write), so your prototype data survives restarts while staying easy to inspect and diff.
Installation
pnpm add @byronwade/adapter-jsonInstall this optional adapter directly; it is not bundled with the top-level fakebase package.
Usage
import { createClient } from "@byronwade/fakebase";
import { createJsonKernel } from "@byronwade/adapter-json";
const kernel = createJsonKernel({ dir: ".fakebase" });
const db = createClient("http://localhost", "anon-key", { kernel });What's inside
createJsonKernel({ dir?, schema? })— a kernel that reads/writes JSON files (under<dir>/data).JsonAdapter— the raw adapter, plus typeJsonAdapterOptions.
Dev-only persistence — fine for prototypes, not a production datastore.
Documentation
License
MIT
