Skip to content

feat(form-builder): visual form builder module with AI-assisted block config#104

Draft
Gervwyk wants to merge 1 commit into
mainfrom
form-builder
Draft

feat(form-builder): visual form builder module with AI-assisted block config#104
Gervwyk wants to merge 1 commit into
mainfrom
form-builder

Conversation

@Gervwyk

@Gervwyk Gervwyk commented Jul 13, 2026

Copy link
Copy Markdown
Member

Summary

  • New form-builder module: users visually build parts of a form (a workflow step, extra profile fields, a custom section) as Lowdefy block config, stored in MongoDB (dynamic-elements), and rendered back into consumer apps through the server-resolved Dynamic block via the module's dynamic-element component.
  • New FormBuilder block in @lowdefy/modules-mongodb-plugins: drag-and-drop palette of curated blocks-antd/blocks-basic types, a canvas rendering the real block components (including Tabs/Collapse dynamic per-tab/panel slots), and a YAML editor, with live operator preview against mock state/requests/global/user/url_query.
  • A per-block AI assistant (AgentChat via an AIGatewayAgent, Vercel AI Gateway) helps model a block's config conversationally — scoped to only the selected block's own fields unless asked otherwise — and calls a get-block-docs tool to verify property shapes against the official Lowdefy docs before writing config. One conversation thread per (element, block), persisted to dynamic-element-conversations.
  • Requires lowdefy 0.0.0-experimental-20260710121634+ (server-resolved Dynamic page content); demo app bumped accordingly.
  • Design doc: designs/form-builder/design.md. Consumer docs: docs/form-builder/index.md.

Marked draft: depends on an unreleased lowdefy experimental build and an upstream AgentChat fix (streaming tool-input truncation + restored-history event replay) that hasn't shipped in a lowdefy release yet.

Test plan

  • pnpm --filter @lowdefy/modules-mongodb-plugins build (SWC) — clean
  • pnpm --filter @lowdefy/modules-demo ldf:b (config + client build) — clean
  • pnpm docs:gen / pnpm docs:check — clean
  • Manual smoke test with real MONGODB_URI + AI_GATEWAY_API_KEY: build a form on /form-builder/edit, save, confirm the doc in dynamic-elements, verify it renders via dynamic-element-demo, and exercise the assistant round-trip (needs the upstream lowdefy fixes for streaming/restore, not yet released)

🤖 Generated with Claude Code

…lock config

New form-builder module lets app users build parts of a form — a workflow
step, extra profile fields, a custom section — as Lowdefy block config,
stored in MongoDB and served back into apps via the server-resolved Dynamic
block. Includes a FormBuilder plugin block (drag-and-drop palette + canvas +
YAML editor, with operator preview against mock data) and a per-block
AIGatewayAgent assistant that verifies config against the official Lowdefy
docs before writing it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant