Philosophy
Goodie Forms is built on a simple premise:
Forms are state machines โ not UI framework state.
Most form libraries tightly couple their logic to a specific framework. Goodie Forms does not. Instead, it separates concerns clearly:
- A framework-agnostic core handles state, validation, paths, and events.
- UI bindings (React, Vue, or any future adapter) act purely as subscription layers.
The form engine exists independently from how it is rendered.
๐ง Headless by Design
At the center of Goodie Forms is the FormController. It is:
- Framework-independent
- Event-driven
- Deterministic
- Fully typed
It does not depend on hooks.
It does not assume a rendering model.
It does not mirror state into any framework.
This ensures:
- The core remains portable across ecosystems
- Business logic is testable without UI
- Behavior stays consistent regardless of rendering strategy
- New framework adapters can be implemented without rewriting the engine
UI integrations are intentionally thin bridges โ nothing more.
๐๏ธ The Controller Owns the State
In many form systems, UI frameworks become the state container. This often leads to:
- Duplicated state
- Excessive re-renders
- Tight coupling between rendering and data
- Implicit mutation flows
Goodie Forms flips that model. The controller owns the data. Frameworks subscribe to it. There is:
- โ No mirrored framework state
- โ No hidden synchronization layers
- โ No dependency on a specific rendering paradigm
Rendering is an effect of subscription โ not the driver of state.
๐งโโ๏ธ Explicit Reactivity Over Implicit Magic
Magic abstractions feel productive early on. They become fragile at scale. Goodie Forms favors:
- Explicit subscriptions
- Clear mutation flows
- Predictable event boundaries
- Deterministic validation timing
If something updates, you know why.
If validation runs, you know when.
If a component reacts, it does so intentionally.
- โ No hidden proxies.
- โ No implicit dependency tracking.
- โ No runtime heuristics.
Just events and subscriptions.
๐งฉ Isolation is the Default
Large forms fail when:
- State changes cascade unpredictably
- Validation leaks across unrelated fields
- Performance degrades as complexity grows
Goodie Forms isolates by architecture. Each field:
- Has its own state slice
- Emits scoped events
- Can be observed independently
- Cleans up safely when detached
Whether you render 3 fields or 300, the behavior remains predictable.
Scalability is structural โ not achieved through patchwork optimizations.
๐ Type Safety is Structural
Type safety is not a layer added on top. It is embedded into the architecture. Goodie Forms provides:
- Deep path inference
- Compile-time path validation
- Accurate nested type resolution
- Strongly typed controller APIs
Types guide the design rather than decorate it.
This reduces runtime errors and eliminates entire classes of invalid state transitions.
๐งช Validation is a Lifecycle
Validation is treated as a structured lifecycle, not an incidental side-effect. It is:
- Scheduled intentionally
- Triggered by explicit strategies
- Emitted through structured events
- Separated from rendering concerns
This avoids race conditions, inconsistent timing, and duplicated validation logic.
Validation becomes predictable โ even in complex flows.
๐ Determinism Over Convenience
Goodie Forms avoids patterns that:
- Hide complexity behind convenience
- Duplicate state across layers
- Blur responsibility boundaries
Instead, it embraces:
- Single source of truth
- Stable controller instances
- Explicit APIs
- Event-driven updates
The goal is not fewer lines of code.
The goal is fewer surprises.
๐ Framework-Agnostic by Architecture
Because the engine is independent:
- It can power multiple UI bindings
- It can be tested without rendering
- It can run outside component trees
- It can integrate with non-UI workflows
The UI layer is optional. The state machine is fundamental.