← Back to archive

Repo of the Day

SquaredR98/fieldcraft

Published: Jun 16, 2026

Open repository ↗

Contribute to SquaredR98/fieldcraft development by creating an account on GitHub.

Summary

FieldCraft is a TypeScript form engine that pairs a headless core package with a React renderer covering 41 field components. You describe forms as JSON schemas and get multi-step flows, conditional visibility, validation, and computed fields without hand-wiring every input. The maintainer describes it as a spare-time project with irregular releases and a published list of known gaps.

What it is useful for

FieldCraft fits when you need to ship many form-heavy surfaces in a React app — contact forms, surveys, job applications, employee onboarding, leave requests, bug reports — and want a single schema-driven runtime rather than bespoke UI per form. Schemas are typed TypeScript objects with sections, questions, and per-question type, label, and required fields, and the same schema can drive wizard stepped, all-at-once, or one-question-at-a-time conversational layouts.

It covers inputs you would otherwise build yourself: ratings, NPS, matrix grids, file uploads, signatures, payment, address, repeaters with aggregate functions (SUM, AVG, COUNT, MIN, MAX), and computed/scored fields. Conditional visibility, regex, min/max, and custom sync/async validators are built in. For storage, an adapters package handles HTTP, Postgres (via Drizzle with AES-256-GCM encryption), Supabase with field-level encryption and RLS, and Webhook delivery with HMAC-SHA256 signing and exponential backoff. The templates package ships 16 schemas such as contact, NPS, job application, event registration, employee onboarding, and leave request.

How engineers can use it

The documented install is npm install @squaredr/fieldcraft-core @squaredr/fieldcraft-react, plus the React package's styles import. A minimal contact form is a FormEngineRenderer with a schema object and an onSubmit callback. For non-HTTP backends, install @squaredr/fieldcraft-adapters and use the subpath imports such as @squaredr/fieldcraft-adapters/postgres, @squaredr/fieldcraft-adapters/supabase, or @squaredr/fieldcraft-adapters/webhook. Custom fields slot in through the documented field registry, and styling is driven by CSS custom properties that auto-inherit from the host page.

If you want to modify the source, the README lists Node.js 18+ and pnpm 9+ as prerequisites, with pnpm install, pnpm build, and pnpm test for the test suites (the README states 1,270 tests across the four packages). The README is explicit that releases are irregular and that contribution reviews are slow because this is a spare-time project, and it points to a "known gaps" page in the docs — worth reading before you adopt it.