Skip to content

Latest commit

 

History

History

schema-manifest

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 
 
 
 
 
 
 

README.md

Schema Manifest Example

What This Teaches

Use this when an app wants committed schema metadata for admin, CMS, or form-building screens. It demonstrates outputs.schemaManifest and schemaManifest.customizeField().

Files To Inspect

Run It

From the repository root, use the repo-internal CLI path:

pnpm run db -- sync --cwd ./examples/schema-manifest
pnpm run db -- schema manifest --cwd ./examples/schema-manifest --out ./src/generated/db.schema.json
pnpm run db -- serve --cwd ./examples/schema-manifest

Expected Result

sync writes both generated TypeScript types and a committed schema manifest. In the manifest, projects.status uses segmented-control, and users.bio uses markdown.

REST Request To Try

Leave serve running and run this from another terminal:

curl 'http://127.0.0.1:7331/db/projects.json?expand=owner&select=id,name,status,owner.name'

Features To Notice

Cleanup

Generated .db/ output is ignored by git. The files under src/generated/ are intentionally committed for this example.

More Docs