@yydb/yydb
v0.0.1
Published
YYDB for TypeScript/Node — one package; engine binary managed for you
Maintainers
Readme
@yydb/yydb
TypeScript / Node product surface for YYDB. One dependency:
import { Database } from "@yydb/yydb";
const db = await Database.open("app.yydb");
await db.ensureSchema(1, "table Setting { @@id: uuid, key: utf8, value: utf8 }");
await db.put("theme", "dark");
await db.close();You do not download yydb.exe, configure PATH, or call serve yourself.
This package starts a loopback engine process behind the API (same Rust kernel
as backends/yydb). Platform binaries ship as optionalDependencies
(@yydb/yydb-<platform>-<arch>); npm installs only your OS’s package.
| Package | Role |
| --- | --- |
| @yydb/yydb | High-level Database.open (this package) |
| @yydb/yydb-client | Low-level YY wire (also used by WebUI) |
| @yydb/yydb-<os>-<arch> | Prebuilt yydb binary (publish pipeline) |
Local monorepo/dev: falls back to target/release|debug/yydb or YYDB_BIN.
Browser: still use @yydb/yydb-client against a host that already runs
the engine (e.g. Electron main used @yydb/yydb, renderer talks WS).
Security: engine binds loopback only. No ACL — do not expose the port.
