Form Builder Internals
The form builder uses Zustand for state management and a registry pattern for field rendering.
Architecture Overview
Zustand Store
Field Registry
Instead of a giant switch statement, we use a registry:Adding a New Field Type
- Define the schema in
src/types/schema.ts - Create the renderer in
src/components/engine/fields/ - Add to registry in
src/components/engine/registry.tsx - Add toolbox entry in
src/components/form-builder/toolbox.tsx - Add properties panel in
src/components/form-builder/properties-panel.tsx
Schema Design
Form schema structure
Logic Engine
Conditional visibility