| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
A headless, pure TypeScript form engine with a React renderer. Define forms as JSON schemas, render them with 41 pre-built field components, and get multi-step flows, conditional visibility, validation, and computed fields out of the box.
I built this to learn how to publish and maintain npm packages. It works and I use it, but it's a spare-time project — releases are irregular and there are known gaps. MIT, so it's yours if it's useful.
| Package | Description | Version |
|---|---|---|
| @squaredr/fieldcraft-core | Headless TypeScript engine — schema, validation, conditional visibility, state management | |
| @squaredr/fieldcraft-react | React renderer — 44 field components (34 input + 10 structural), hooks, theming, pluggable field registry | |
| @squaredr/fieldcraft-adapters | Submission adapters — HTTP, Postgres, Supabase, Webhook | |
| @squaredr/fieldcraft-templates | 16 free form templates — general, HR, and more |
npm install @squaredr/fieldcraft-core @squaredr/fieldcraft-reactimport { FormEngineRenderer } from "@squaredr/fieldcraft-react";
import "@squaredr/fieldcraft-react/styles.css";
const schema = {
id: "contact",
version: "1.0.0",
title: "Contact Us",
submitAction: { type: "callback" },
sections: [
{
id: "main",
title: "Contact Info",
questions: [
{ id: "name", type: "short_text", label: "Full Name", required: true },
{ id: "email", type: "email", label: "Email", required: true },
{
id: "subject",
type: "dropdown",
label: "Subject",
options: [
{ value: "general", label: "General Inquiry" },
{ value: "support", label: "Support" },
{ value: "feedback", label: "Feedback" },
],
},
{ id: "message", type: "long_text", label: "Message" },
],
},
],
};
function App() {
return (
<FormEngineRenderer
schema={schema}
onSubmit={async (response) => {
console.log(response);
}}
/>
);
}| Category | Types |
|---|---|
| Text | short_text long_text email phone phone_international url legal_name |
| Numeric | number slider rating nps likert opinion_scale |
| Selection | single_select multi_select dropdown boolean country_select ranking |
| Date/Time | date date_range time appointment |
| Media | file_upload signature image_capture |
| Advanced | address payment matrix repeater calculated hidden scoring |
| Structural | consent info_block section_header page_break |
| Content | welcome-screen thank-you-screen rich-text image video divider spacer |
Persist form submissions, drafts, and schemas to any backend. All adapters ship in a single package with subpath imports:
npm install @squaredr/fieldcraft-adaptersimport { createPostgresAdapter } from '@squaredr/fieldcraft-adapters/postgres'
import { createSupabaseAdapter } from '@squaredr/fieldcraft-adapters/supabase'
import { createWebhookAdapter } from '@squaredr/fieldcraft-adapters/webhook'| Adapter | Highlights |
|---|---|
| HTTP | Built into core — POST to any endpoint with timeouts and custom headers |
| Postgres | Drizzle ORM, AES-256-GCM encryption, draft persistence |
| Supabase | Field-level encryption, RLS, schema CRUD |
| Webhook | HMAC-SHA256 signing, exponential backoff retries |
16 production-ready form schemas included in @squaredr/fieldcraft-templates:
npm install @squaredr/fieldcraft-templatesContact form, feedback survey, NPS, job application, event registration, bug report, employee onboarding, leave request, and more.
fieldcraft/ ├── packages/ │ ├── core/ # Form engine (pure TypeScript) │ ├── react/ # React renderer + 44 field components │ ├── adapters/ # Submission adapters (HTTP, Postgres, Supabase, Webhook) │ └── templates/ # 16 free form schemas ├── website/ # Docs site (fieldcraft.squaredr.tech) └── tooling/ # Shared configs (TypeScript, Tailwind, ESLint)
# Prerequisites: Node.js 18+, pnpm 9+
# Install
pnpm install
# Build all packages
pnpm build
# Run tests (824 core + 288 react + 56 adapters + 102 templates = 1,270 passing)
pnpm test
# Start docs site
pnpm --filter @squaredr/fieldcraft-website devContributions are welcome. This is a spare-time project, so reviews can be slow — please open an issue first to agree on the approach before writing code. See CONTRIBUTING.md.
| Back | FazBrowse Home | New Git URL |