Comment on page
Modeling
ScaffoldHub offers an online modeling tool so you can model the entities, fields, relationships, and validations of your application.
The new option will clear the current project and start a new one.
The save option will download a JSON file on your machine with the project configuration.
The load option will allow you to select a previously downloaded JSON file and load it to the modeling tool.
The sample option loads a sample application project on the modeling tool.
The version select box allows you to change the scaffold version.

Defines if the payments for plans will be enabled. Read more at Features > Subscriptions and Payments.
Defines the codebase will include E2E and Unit Tests. Read more at Features > End-to-end and Unit Tests.
Defines the default language for the application.
Each entity will have its own menu, permissions, form, listing, import, and export.

The variable name that will refer to this entity inside the code. It follows the javascript variable naming rules.
Name Pural
The variable name that will refer to this entity inside the code in the plural format. It follows the javascript variable naming rules.
The label used for the menu and pages to refer to this entity.
On the pages that the entity is referred to in the plural format - like on the listing page - this label will be used.

The field that will be used as the label on the autocomplete related to this entity.
Audit Fields on List?
Flag that indicates if the listing page will include Created By, Created At, Updated By and Updated At fields.
Fields are the attributes of each entity.

The variable name that will refer to this field inside the code. It follows the javascript variable naming rules.
The label used to refer to this field on the pages.
The type of this field. Each type will be described in detail later.
Those properties are common across all the field types.

The placeholder that will be displayed on the form for this field.
The hint that will be displed on the form for this field.
Displays the field on the listing page.
Creates a filter for this field on the listing page.
Exports this field on the Export to CSV process.
Name | Option | Description |
HTML Type | Text | Creates an input field on the form. |
HTML Type | TextArea | Creates a text area field on the form. |
Name | Description |
Required | Requires the field to be informed. |
Unique | The field value should be unique
across the entity data. |
Min Length | The minimum length. |
Max Length | The maximum length. |
Email | The value must be an email. |
URL | The value must be an URL. |
Lower Case | The value will be transformed to lower case. |
Upper Case | The value will be transformed to upper case. |
Name | Description |
Required | Requires the field to be informed. |
Unique | The field value should be unique
across the entity data. |
Min | The minimum value. |
Max | The maximum value. |
Positive | The value must be positive. |
Negative | The value must be negative. |
Name | Description |
Required | Requires the field to be informed. |
Unique | The field value should be unique
across the entity data. |
Min | The minimum value. |
Max | The maximum value. |
Scale | The number of digits to the right of the decimal point. |
Positive | The value must be positive. |
Negative | The value must be negative. |
Date without time. Is displayed in the format YYYY-MM-DD and saved as a string on the database.
Name | Description |
Required | Requires the field to be informed. |
Unique | The field value should be unique
across the entity data. |
Date and time. Is displayed in the format YYYY-MM-DD HH:mm and saved as date and time at the database.
Name | Description |
Required | Requires the field to be informed. |
Unique | The field value should be unique
across the entity data. |
True or false.
Name | Option | Description |
HTML Type | Switch | Creates a switch field on the form. |
HTML Type | Checkbox | Creates a checkbox field on the form. |
HTML Type | Radio | Creates a radio group with Yes or No on the form. |
An enumerator is a field that must be set based on a list of options.
Name | Option | Description |
Options | | Comma-separated options. Those values are the ones that will be saved on the database. Labels should be defined on the Internationalization (I18n) file later. No spaces or special characters are allowed. Example: open,in_progress,closed |
HTML Type | Select | Creates a select box on the form with the options to be selected. |
HTML Type | Radio | Creates a radio group with the options to be selected. |
Name | Description |
Required | Requires the field to be informed. |
Unique | The field value should be unique
across the entity data. |
An enumerator (multiple) allows you to select several items from a list of options.
Name | Option | Description |
Options | | Comma-separated options. Those values are the ones that will be saved on the database. Labels should be defined on the Internationalization (I18n) file later. No spaces or special characters are allowed. Example: open,in_progress,closed |
Name | Description |
Required | Requires the field to be informed. |
Min | The minimum selected items. |
Max | The maximum selected items. |
Creates a File Upload field on the form, and a file list on the show pages.
Name | Description |
Required | Requires at least one file. |
Min | The minimum number of files. |
Max | The maximum number of files. |
Size in bytes | The maximum size of each file in bytes. |
Formats | Comma-separated valid formats. Example: doc, txt, csv. |
Creates an Image File Upload field on the form, and an image gallery on the show pages.
Name | Description |
Required | Require at least one image. |
Min | The minimum number of images. |
Max | The maximum number of images. |
Size in bytes | The maximum size of each image in bytes. |
Creates a JSON field in the database and a text area on the form to add it.
Validations
Name | Description |
Required | Require at least one image. |
Relationships are relations between entities.
Many-to-many relates many records to many others. Example: Categories (Many) <-> Posts (Many).
In a many to many relationship, both sides will have the same configuration.
Relates many records to one. Example: Posts (Many) <-> Author (One).
The Side A is the side that relates to one. In the example, it would be the Posts.
Side B
The Side B is the side that relates to many. In the example, it would be the Author.
Relates one record to another. Example: Profile (One - has Foreign Key) <-> User (one).
The Side A is the side that relates to one record and contains the foreign key. It's marked as unique, to prevent Side B from having multiple of it.
Side B
The Side B relates to one record.
Name | Description |
Entity | The entity that will contain the field. |
Field Name | The field name - must be a valid variable name. |
Field Label | The label that will reference the field in the UI. |
Editable | Indicates that the field will be included in the Entity form. At least one side must be editable. |
Relation Action | When the record is deleted, the other side can:
- Nullify: The record will be just removed from the relationship.
- Restrict: The app will stop the record from being deleted if it is related to another entity. |
List? | Displays the field on the listing page. |
Filter? | Creates a filter for this field on the listing page. |
Export to CSV? | Include the field in the exported CSV file. |
Notes: The Side B is the only side that can contain a Membership. Memberships are not editable by the modeling tool, so they just related to a Side A and are not editable.
Last modified 23d ago