Docs
The engine primitives the AI composes and the AppSpec shape it emits.
How it works
You describe an app in plain English. The AI (DeepSeek) calls typed tools to extend an AppSpec — a JSON document that lists your tables, pages, workflows, integrations, and permissions. Codegen turns the spec into a real Vite + React app; the platform runs a per-project Postgres (PGlite) and exposes a PostgREST-shaped HTTP API.
Every AI patch runs through a verify-repair loop (tsc on the generated template). Every apply creates a new immutable spec version — you can roll back at any time from the History tab.
Engine primitives
Compose these inside a page's composition array. The AI is taught to prefer them over writing raw code.
DataTableLists rows of a table. Handles paging/loading.- resource— table name
- columns— [{ key, label?, format? }]
DataFormCreate-row form. Auto-validates and submits.- resource— table name
- fields— [{ name, type: text|email|number|select|textarea|date, required?, options? }]
StatCardSingle metric — count, sum, or average of a column.- resource— table name
- metric— count | sum | avg
- column— for sum/avg
- label— human label
KanbanBoardRows grouped into lanes by a column (e.g. status).- resource— table name
- groupBy— column name
- titleField— text column to show on cards
- lanes— optional fixed lane order
DataChartBar or line chart with xKey + yKey.- resource— table name
- type— bar | line
- xKey— x-axis column
- yKey— y-axis column (numeric)
Workflow steps
Workflow triggers: event (e.g. deals.updated), cron, or webhook.
emailSend an email.- to— recipient
- template— template id
slackPost a Slack message. Real if integration.webhookUrl is set.- integrationId— id of a slack integration
- channel— #chan
- message— text; {colName} interpolates row values
dbUpdatePatch a row.- resource— table
- id— row id
- patch— {col: value}
apiCallPOST to any URL.- url— target
- method— GET|POST|PUT|DELETE
- body— optional
delaySleep.- duration— e.g. 30s, 1h
Prompt guide
- Be specific about the domain (contacts + deals, not "stuff").
- Mention what integrations should fire (e.g. Slack on new deal).
- Say "use a Kanban board" if you want status columns as lanes.
- Refinements work — after building, say things like "add a comments field to deals".
Test suites
pnpm --filter @app/codegen exec tsx src/e2e-test.ts # codegen determinism + shape pnpm --filter @app/tenant-api test # PGlite + PostgREST-shaped HTTP pnpm --filter @app/provisioner test # versioning + rollback pnpm --filter @app/agent test # verify-repair pnpm --filter @app/platform-api test # multi-project + tenant mount