Examples

Every example follows the same pattern: install the SDK, configure the handler, register a factory for every model the dashboard can create, and expose a single POST endpoint. Each factory carries an input schema (Pydantic in Python, Zod in TypeScript, Ecto/serde/etc. elsewhere) so the SDK can describe the model to the dashboard and validate the create payload before invoking your code. There is no SQL introspection and no SQL fallback.

Available Examples

All examples live in the SDK repository. Each one has a README with prerequisites, quick start, project structure, and how it works.

LanguageFrameworkSchema libSource
TypeScriptExpressZodexpress
TypeScriptNext.js (App Router)Zodnextjs
TypeScriptHonoZodhono
PythonFastAPIPydanticfastapi
PythonFlaskPydanticflask
PythonDjangoPydanticdjango
ElixirPhoenixEcto schemasphoenix
JavaSpring BootBean Validationspring-boot
RubyRailsdry-validationrails
RustAxumserde + validatoraxum
GoGingo-playground/validatorgin
PHPLaravelSymfony Validatorlaravel

Configuration Reference

Every example configures the same handler fields:

FieldDescription
scopeFieldThe column that scopes all models to a tenant (e.g. organizationId). The SDK uses this to isolate test data and ensure teardown only removes records belonging to the test run.
sharedSecretShared between your server and Autonoma. Used to verify incoming requests via HMAC-SHA256. Generate with openssl rand -hex 32.
signingSecretPrivate to your server only. Used to sign the refs token that tracks which records were created, so teardown can only delete what was created. Generate with openssl rand -hex 32. Must be different from sharedSecret.
factoriesOne factory per model the dashboard can create. Each factory declares an input_model / inputSchema (Pydantic, Zod, etc.) plus a create function that calls your real service/repository, and an optional teardown. The SDK introspects the schema to drive discover and validates payloads through it before invoking create.
authCalled after entity creation during up. Returns credentials (cookies, headers, tokens) so Autonoma can make authenticated requests as the test user.
Link copied