dimah-formv0.6.1

Introduction

Backend-first questionnaire infrastructure for TypeScript servers and React clients.

dimah-form is backend-first questionnaire infrastructure for product-embedded forms. It owns the typed protocol, per-response definition snapshots, drafts, and submit validation. Your application owns authentication and rendering and supplies the persistence adapter.

Use it when a questionnaire belongs inside your product and must keep its original definition after the live form changes. It is not a visual builder, hosted survey service, authentication system, or analytics warehouse.

Start here: complete Quickstart, then prepare for production with Integration, Security, and Persistence. Use Forms and Responses for the data model.

The model

One response
  1. AuthorDefine or save a form
  2. StartFreeze the definition
  3. FillDraft and validate
  4. SubmitValidate the snapshot

When a response starts, the server stores a copy of the active form in response.definition. Later edits to the live questionnaire do not affect that draft or submitted response.

What you install

NeedPackage
Server instance, handler, and adapters@dimah-form/server
React client and fill session@dimah-form/react
Production SQL adapter@dimah-form/db
Optional shadcn renderer@dimah-form/ui
Optional scoring, export, and summaries@dimah-form/scoring, @dimah-form/dataset, @dimah-form/insights

database is required on dimahForm(). SQL is optional: use memoryAdapter() for tests and local development, or a persistent ResponseStore such as db() from @dimah-form/db in production.

Choose the right tool

For coding agents, fetch llms.txt for the decision sheet or llms-full.txt for the complete Markdown corpus.

On this page