In this diagram I made a case for how we can structure the core library.
Template fragments are little pieces of Handlebar HTML files that are specifically named and have required fields. We can have fragments for fields, validations and so on. Users obviously can override those templates.
JSON Schema is the base schema for generating the form
Customizer object is the object that extends JSON Schema (or maybe with a whole different syntax. Doesn't really have to follow JSON Schema structure). This object can contain custom validators and other things that JSON Schema can't have
Full Schema is a single object that contain everything assembler needs to assemble a form
Assembler is the core piece here. It's doing the templating and event bindings
Form HTML is obviously the final result that have two components
Event dispatcher that handles events inside the form and expose it as an API for the user (a user in this case can be angular directive )
Data I/O a set of setter/getter functions for transferring data. The data can be an instance of standard FormData
In this diagram I made a case for how we can structure the core library.
FormData