Skip to main content

CRUD walkthrough

End-to-end path from a multi-entity .aip to Preview artifacts. Canonical example: examples/blog-crud.aip. Related: inventory-crud.aip (stock moves + workers) · mysql-minimal.aip (MySQL).

1. App + auth


2. Entities and CRUD

Define the graph, then declare crud for each resource you want as an HTTP resource:

3. Validation, policy, index, API

OpenAPI paths become /v1/authors, /v1/posts, /v1/comments (and /{id} variants).

4. Seed + light Behavior


5. Validate and emit

Expect PostgreSQL tables for authors/posts/comments, indexes, a seed INSERT, and OpenAPI CRUD under /v1. For MySQL:
For jobs/queues (inventory example):

Checklist

  • One app with database (+ auth if needed)
  • Entities with relations + crud per resource
  • validation / policy / index / api as needed
  • Optional seed, workflow, event
  • aip validate green before emit
  • Review Preview artifacts before shipping
Next: Get started here · First emitters · Security · Workflows