Fixture to contract workflow
File-backed JSON data, from fixture to production contract.
Start with db/*.json, infer useful schema metadata, serve local REST and viewer routes, then graduate each resource behind stable operation refs when production constraints appear.
install
Start from a package install.
pnpm add @async/db
pnpm exec async-db sync
pnpm exec async-db serve
Keep serve running, then open http://127.0.0.1:7331/__db.
[
{
"id": "u_1",
"name": "Ada",
"plan": "founder"
}
]
01 fixture
Editable source files in `db/`.
02 contract
Inferred or explicit resource schema.
03 local API
REST, GraphQL metadata, and viewer state.
04 graduate
Registered operations and store choices.
Advanced pages for the settings that change production behavior.
The public docs now have separate pages for the settings developers need after the first fixture works: config, schema strictness, runtime stores, server exposure, operations, mocks, and generated artifacts.
Configuration map
Folders, outputs, route bases, resource overrides, and strictness.
storesRuntime stores
Default JSON state, source-file writes, SQLite, Postgres, KV, Redis, and custom stores.
operation refsRegistered operations
Allowlisted REST or GraphQL templates, generated refs, and route lockdown.
.db + generatedGenerated files
What stays ignored, what can be committed, and which examples do it.
Keep local routes local, then expose reviewed operations.
Use fixture-like routes while the data shape is moving. When the app-facing contract settles, move browser traffic to registered operation refs, app-owned auth, and explicit route exposure rules.
Operation refs are allowlist identifiers, not secrets. They keep route shape reviewable while normal app policy still owns authentication, authorization, limits, and monitoring.
Example paths stay visible.
The docs point readers toward concrete repo examples instead of abstract feature claims.