@dryv/react-crud-formsv0.1.0
Pure Handlebars React forms driven by create/update operations and their input DTO semantics.
dryv pack add @dryv/react-crud-formsReact CRUD Forms
Generates typed React forms for HTTP create and update operations. The pack contributes forms to an existing project; it does not create a React application shell.
Forms use the operation's input DTO and client bindings. Generated controls reflect input semantics, including email fields, numeric bounds, string lengths, enum choices and booleans. An index exports the generated forms. Read operations do not generate forms.
Composition
Bind both schema.types and operation.client to a compatible provider. For example, compose the TypeScript API client with this pack:
client:
source: { $ref: "#/sources/packs/local", path: unit/clients/ts-api-client }
destination: { $ref: "#/destinations/app" }
inputs:
package_name: my-api-client
forms:
source:
{ $ref: "#/sources/packs/local", path: inject/frontend/react-crud-forms }
destination: { $ref: "#/destinations/app" }
bind:
schema.types: { $ref: "#/packs/client" }
operation.client: { $ref: "#/packs/client" }
Place these entries under packs in a project that declares the referenced pack source, destination and authored or Runtime IR input. The fixture in tests/fixture/dryv.yaml demonstrates the composition using the repository's shared Runtime IR.
Verification
From the repository root, run bun scripts/test-pack.ts --keep inject/frontend/react-crud-forms. The fixture typechecks the generated TypeScript and checks form selection, exports, controls and operation bindings.