@byronwade/adapter-sqlite
v0.1.0
Published
SQLite file-backed adapter for Fakebase — WAL mode, durable persistence
Downloads
160
Maintainers
Readme
@byronwade/adapter-sqlite
Part of Fakebase — a Supabase-shaped, local/dev-only development platform for Next.js prototypes. Not for production use.
A durable, single-file SQLite adapter (WAL mode) backed by better-sqlite3. The most production-like local option when you want realistic, durable persistence for your prototype.
Installation
pnpm add @byronwade/adapter-sqliteInstall this optional adapter directly; it pulls in the native better-sqlite3 dependency and is not bundled with fakebase.
Usage
import { createClient } from "@byronwade/fakebase";
import { createSqliteKernel } from "@byronwade/adapter-sqlite";
const kernel = createSqliteKernel({ dbPath: ".fakebase/fakebase.db" });
const db = createClient("http://localhost", "anon-key", { kernel });What's inside
createSqliteKernel({ dbPath?, schema?, storageDir? })— a fully wired SQLite-backed kernel (data + auth + storage).SqliteAdapter— the raw adapter, plus typeCreateSqliteKernelOptions.- Type-mapping helpers:
mapColumnType,serializeValue,deserializeValue.
Dev-only — durable for local work, not a production database.
Documentation
License
MIT
