form0-core

[!WARNING]
form0 is in active, very early development. Do not use in production. Expect breaking
changes and unstable behavior.
form0-core is the schema-driven engine that powers form0 open-source ecosystem. It is framework-agnostic and runs in any JavaScript runtime (Node.js, browsers, React Native, etc.)
🚀 Start with the CLI (recommended)
The entry point for most users is form0-cli. Follow the quickstart to create a project and preview
your schema.
🗂️ Documentation
Direct usage (advanced)
If you are integrating the engine directly:
npm install form0-core
form0-core owns behavioral schema concerns such as fields, conditions, calculations,
events, and AI metadata. Applications may still attach optional top-level metadata such as
id (unique form identifier), status (publication state), version (schema version),
scope fields like main_org_id, and media or location settings. Operational counters like
record_count and record_last_change_at should stay platform-owned and be injected at
application or API boundaries, not treated as engine-authored schema. A top-level
form.version may still exist, but the engine does not bump or consume it.
Record-side contract
form0-core intentionally uses two different choice-value shapes:
- Live engine / renderer values use renderer shape:
- single / boolean:
{ choice, other }
- multi:
{ choices, other }
- Structured records use canonical stored shape:
- single / boolean:
{ choice_value, other_value }
- multi:
{ choices_value, other_value }
Record-side utilities follow this contract:
createStructuredRecord() outputs canonical stored records
normalizeStructuredRecord() consumes and returns canonical stored records
buildFormRecordSnapshot() consumes canonical stored records and returns renderer snapshot values
projectDatasetRowValues() consumes canonical stored rows
- Choice
FIELD_SPECS keep separate validators by context:
valueValidator validates live engine / renderer values
recordValueValidator validates canonical stored record values
Record status remains top-level as @status; it is not stored inside form_values.
Security
See SECURITY.md for security modes and configuration.
Requirements
Related repositories
Contributing
Contributions are welcome! Please feel free to submit issues and pull requests.