Entity Builder - Configuration Guide
Overview
Entity Builder is the foundational module for creating data structures in the GovAssist platform. Entities are the containers that hold your data—think of them as custom database tables. Before you can build forms, create automations, or configure views, you must first define your entities and their fields.
Entity Builder Capabilities
| Feature | Description |
|---|
| Entity Creation | Define custom data containers (e.g., "Building Permits", "Inspections") |
| Field Configuration | Add 28+ field types with validation, defaults, and formatting |
| Section Organization | Group related fields into logical sections |
| Folder Hierarchy | Organize entities in nested folder structures |
| Field Relationships | Create associations between entities |
| Computed Fields | Add formula fields for automatic calculations |
Prerequisites
Before configuring entities, ensure:
Section 1: Entity Fundamentals
1.1 What is an Entity?
An Entity is a data container that represents a real-world object or concept in your organization. Examples:
| Entity | Purpose | Example Fields |
|---|
| Building Permit | Track permit applications | permit_number, property_address, status |
| Inspection | Record inspection results | inspection_date, inspector, result |
| Contractor | Store contractor information | company_name, license_number, contact |
| Fee Schedule | Define fee structures | fee_type, amount, effective_date |
1.2 Entity Structure
| Component | Description | Contains |
|---|
| Entity | Top-level container | Settings, Sections, Forms, Views |
| Settings | Entity configuration | name, description, icon |
| Sections | Field groupings | One or more sections |
| Section | Logical field group | Multiple fields (e.g., "Basic Information" with text, dropdown, date fields) |
| Forms | Data entry interfaces | Built on entity fields |
| Views | Display configurations | Grid, Kanban, Dashboard |
1.3 Creating an Entity
- Navigate to Entity Manager from the sidebar
- Click + New Entity or right-click a folder → New Entity
- Enter entity details:
| Setting | Description | Validation |
|---|
| Name | Internal identifier (used in code/APIs) | Required, unique |
| Label | Display name shown in UI | Optional (defaults to name) |
| Description | Purpose documentation | Optional |
| Folder | Parent folder for organization | Optional |
- Click Create to save the entity
Section 2: Field Types Reference
The Entity Builder supports 28 field types organized into categories.
2.1 Text & Content Fields
| Field Type | Key | Description | Use Case |
|---|
| Text | text | Single-line text input | Names, titles, IDs |
| Textarea | textarea | Multi-line text input | Descriptions, notes |
| Rich Text | richtext | Formatted text with styling | Detailed documentation |
| Email | email | Email with validation | Contact emails |
| URL | url | Website link with validation | External references |
| Phone | phone | Phone number with formatting | Contact numbers |
2.2 Numeric Fields
| Field Type | Key | Description | Use Case |
|---|
| Number | number | Numeric input with optional units | Quantities, amounts |
| Formula | formula | Auto-computed values | Calculations, totals |
| Payment | payment | Payment information field | Fee collection |
Number Field Configuration
Numbers support unit configuration:
| Unit | Display | Position |
|---|
$ | Dollar | Left or Right |
€ | Euro | Left or Right |
£ | Pound | Left or Right |
% | Percentage | Left or Right |
custom | User-defined | Left or Right |
Additional Options:
allowIncrementDecrement: Show +/- buttons for easy adjustment
2.3 Date & Time Fields
| Field Type | Key | Description | Use Case |
|---|
| Date | date | Calendar date picker | Due dates, birthdays |
| Date Range | date_range | Start and end date | Project periods |
| Time | time | Time of day selector | Appointments |
| Time Range | time_range | Start and end time | Business hours |
Date Field Configuration
| Setting | Options | Description |
|---|
show_time | true / false | Include time picker |
format_date | us, eu, local, friendly, iso | Date display format |
format_time | 24_hours, 12_hours | Time display format |
Date Format Examples:
| Format | Example |
|---|
us | 01/15/2026 |
eu | 15/01/2026 |
iso | 2026-01-15 |
friendly | January 15, 2026 |
2.4 Selection Fields
| Field Type | Key | Description | Use Case |
|---|
| Dropdown | dropdown | Single select from list | Status, category |
| Combobox | combobox | Searchable dropdown | Large option lists |
| Radio | radio | Single visible option | Yes/No/Maybe |
| Checkbox | checkbox | Multiple selections | Tags, features |
| Boolean | boolean | Yes/No toggle | Flags, switches |
Selection Field Options
Options require at least 2 entries:
| Label | Value |
|---|
| Pending | pending |
| Approved | approved |
| Denied | denied |
Display Settings:
| Setting | Description |
|---|
multi_select | Allow multiple selections (dropdown/combobox) |
show_as_badge | Display as colored badges |
color_code_options | Assign colors to each option |
Boolean Field Configuration
| Display Mode | Description |
|---|
switch | Toggle switch (default) |
checkbox | Traditional checkbox |
2.5 File & Media Fields
| Field Type | Key | Description | Use Case |
|---|
| File | file | Document/attachment upload | PDFs, documents |
| Image | image | Image upload with preview | Photos, logos |
| Signature | signature | Digital signature capture | Approvals |
File Field Restrictions
| Setting | Description | Example |
|---|
allowedTypes | Permitted file extensions | PDF, DOCX, XLSX |
maxSizeValue | Maximum file size | 10 |
maxSizeUnit | Size unit | KB, MB, GB |
maxFiles | Maximum number of files | 5 (empty = unlimited) |
Common File Type Presets:
| Preset | Extensions |
|---|
| Documents | .pdf, .doc, .docx, .txt |
| Spreadsheets | .xls, .xlsx, .csv |
| Images | .jpg, .jpeg, .png, .gif |
| All Files | * |
2.6 Relationship Fields
| Field Type | Key | Description | Use Case |
|---|
| Association | association | Cross-entity relationships | Permit → Contractor |
| User | user | User assignment/reference | Assigned inspector |
Association Field Configuration
| Setting | Description |
|---|
reference.entity_id | Target entity ID |
reference.alias | Display alias |
reference.fields | Lookup fields to display |
associatedFormField | Fields to show in lookup |
Allowed Lookup Field Types:
text, number, email, textarea, formula
Excluded from Lookup:
User Field Configuration
| Setting | Description |
|---|
user_filter.is_active | Enable user filtering |
user_filter.ids | Specific user IDs to include |
user_filter.users | User objects |
2.7 Special Fields
| Field Type | Key | Description | Use Case |
|---|
| Location | location | Address/coordinates | Property location |
| APO | apo | Address, Parcel, Owner (GIS) | Property lookup |
| JSON | json | Structured JSON data | Complex data |
| Output Field | output_field | Read-only computed display | Calculated summaries |
| Repeatable Group | repeatable_group | Repeatable field group | Multiple contacts |
Section 3: Field Configuration
3.1 General Field Settings
Every field supports these base settings:
| Setting | Field | Description | Required |
|---|
| Label | label | Display name | Yes |
| Name | name | Internal key (API/code) | Auto-generated |
| Description | description | Help text shown to users | No |
| Placeholder | placeholder | Input placeholder text | No |
| Default Value | default_value | Pre-filled value | No |
3.2 Validation Rules
| Validation | Applies To | Description |
|---|
required | All fields | Field must have a value |
unique | Text, email, number | Value must be unique across records |
min_length | Text, textarea | Minimum character count |
max_length | Text, textarea | Maximum character count |
min_value | Number | Minimum numeric value |
max_value | Number | Maximum numeric value |
pattern | Text, email | Regex pattern validation |
index | Any | Create database index |
3.3 Protected and Private Fields
| Flag | Description |
|---|
is_protected | System field, cannot be deleted |
is_private | Hidden from certain users/views |
Section 4: Section Configuration
4.1 What are Sections?
Sections group related fields within an entity. They provide logical organization and improve the user experience when viewing or editing records.
4.2 Section Settings
| Setting | Description | Validation |
|---|
| Title | Section heading | Max 50 chars, alphanumeric + basic punctuation |
| Order | Display sequence | Integer 1-1000 |
Allowed Characters in Title:
- Letters (a-z, A-Z)
- Numbers (0-9)
- Spaces (no consecutive)
- Apostrophes, parentheses, brackets, braces, ampersand
4.3 Default Section
Every entity has a default section with ID: default-section
New fields are added to this section unless otherwise specified.
4.4 Creating Sections
- Open the entity in Entity Builder
- Click + Add Section or drag the Section component
- Enter section title
- Drag fields into the section
4.5 Reordering Sections and Fields
Use drag-and-drop to reorder:
| Drag Type | Description |
|---|
Section | Move entire section with its fields |
Field | Move field within or between sections |
Row | Move a row of fields |
Section 5: Folder Organization
5.1 Creating Folders
- In Entity Manager, right-click the entity list
- Select New Folder
- Enter folder name
- Optionally select a parent folder for nesting
5.2 Moving Entities to Folders
- Drag and drop entities into folders
- Or right-click entity → Move to Folder
5.3 Folder Hierarchy
Folders support unlimited nesting levels. Example structure:
| Level 1 | Level 2 | Level 3 (Entities) |
|---|
| Entities | | |
| Permitting | |
| | Applications: Building Permits, Fire Permits, Zoning Permits |
| | Inspections: Building Inspections, Fire Inspections |
| Licensing | |
| | Business Licenses, Contractor Licenses |
| System | |
| | Permit Menu, Fee Schedule |
Section 6: Color Configuration
6.1 Available Colors
The system provides 16 preset colors for badges, statuses, and visual indicators:
| Color | Hex Code | Use Case |
|---|
| Black/Gray | #303132 | Neutral, default |
| Orange | #F79009 | Warning, pending |
| Green | #299764 | Success, approved |
| Red | #B42318 | Error, denied |
| Purple | #8B5CF6 | Special, priority |
| Blue | #1D4ED8 | Information |
| Light Purple | #C084FC | Accent |
| Orange Variant | #F97316 | Highlight |
| Dark Blue | #00235A | Corporate |
| Bright Blue | #3B82F6 | Links, actions |
| Brown | #967668 | Earthy, historic |
| Pink | #F472B6 | Creative |
| Light Green | #22C55E | Positive |
| Light Red | #F87171 | Alert |
| Sky Blue | #60A5FA | Calm |
| Slate | #64748B | Subtle |
| Teal | #6EE7B7 | Fresh |
6.2 Applying Colors to Options
For dropdown, radio, and checkbox fields with color_code_options enabled:
- Edit the field
- Enable Color-code options
- Click the color swatch next to each option
- Select a color from the palette
Section 7: Formula Fields
7.1 Formula Basics
Formula fields automatically compute values based on other fields.
formula: [
{ is_field: true, field: 'quantity' },
{ is_field: false, field: '*' }, // Operator
{ is_field: true, field: 'unit_price' }
]
7.2 Supported Operations
| Operator | Description |
|---|
+ | Addition |
- | Subtraction |
* | Multiplication |
/ | Division |
7.3 Formula Field References
Formulas can reference:
- Fields in the same entity
- Fields from associated entities (via
reference_field)
Section 8: Permitting Solution Patterns
8.1 Recommended Entity Structure
For a Permitting solution, create these core entities:
| Entity | Purpose | Key Fields |
|---|
| Permit Menu | Portal visibility control | application_type, entity_id, form_id, process_id |
| Building Permit | Building permit records | permit_number, property_address, status, applicant |
| Fire Permit | Fire permit records | permit_number, occupancy_type, status |
| Inspection Codes | Inspection type definitions | code, description, category |
| Permit-Inspection Mapping | Links permits to inspection types | permit_entity_id, inspection_code_id, calendar_id |
| Contractors | Licensed contractors | license_number, company_name, expiration_date |
8.2 Common Field Patterns
Status Field (Dropdown)
| Setting | Value |
|---|
| Field | status |
| Type | dropdown |
| Options | Submitted (submitted), Under Review (under_review), Approved (approved), Denied (denied), Expired (expired) |
| Color-coded | Yes |
| Show as badge | Yes |
Permit Number (Text)
| Setting | Value |
|---|
| Field | permit_number |
| Type | text |
| Required | Yes |
| Unique | Yes |
| Pattern | ^[A-Z]{2}-\d{4}-\d{6}$ |
| Placeholder | e.g., BP-2026-000001 |
Property Address (APO)
| Setting | Value |
|---|
| Field | property_address |
| Type | apo |
| Description | Start typing to search by address, parcel, or owner |
Application Date (Date)
| Setting | Value |
|---|
| Field | application_date |
| Type | date |
| Default | Current date |
| Format | us |
| Show time | No |
8.3 Entity Relationship Pattern
| Entity | Role | Association Field | Links To | Display Fields |
|---|
| Building Permit | Parent | inspections | Building Inspection | inspection_date, result, inspector |
| Building Inspection | Child | permit | Building Permit | permit_number, property_address |
Section 9: Best Practices
9.1 Naming Conventions
| Element | Convention | Example |
|---|
| Entity name | snake_case | building_permit |
| Entity label | Title Case | Building Permit |
| Field name | snake_case | permit_number |
| Field label | Title Case | Permit Number |
| Section title | Title Case | Property Information |
9.2 Field Organization
- Start with identification - Permit number, record ID at the top
- Group by category - Use sections for logical grouping
- Required fields first - Place required fields prominently
- Calculated fields last - Formula fields after their source fields
9.3 Performance Considerations
| Recommendation | Reason |
|---|
| Use indexes on frequently searched fields | Improves query performance |
| Limit file upload sizes | Reduces storage costs |
| Use dropdowns over text for constrained values | Better data quality |
| Add descriptions to complex fields | Improves user understanding |
Section 10: Troubleshooting
10.1 Common Issues
| Issue | Cause | Solution |
|---|
| Cannot delete field | Field is protected | Check if system field |
| Duplicate key error | Field name already exists | Rename the field |
| Options not saving | Less than 2 options | Add at least 2 options |
| Formula not calculating | Reference field missing | Verify field names |
| File upload fails | Size exceeds limit | Check file restrictions |
10.2 Validation Errors
| Error | Field | Fix |
|---|
| "Section title too long" | Section | Max 50 characters |
| "Invalid characters" | Section title | Use only allowed characters |
| "Duplicate option label" | Dropdown/Radio/Checkbox | Make labels unique |
| "Entity ID required" | Association | Select target entity |
Appendix: Code Reference
Source Files
| Component | Path |
|---|
| Field Types | packages/govt-assist-shared/src/const/fieldTypeConstants.ts |
| Entity Constants | entity-manager-app/src/const/entityConstants.ts |
| Field Configuration | entity-manager-app/src/components/EntitySidebar/const.ts |
| Section Validation | entity-manager-app/src/pages/Entity/ConfigureEntity/EntityBuilder/validationSchema.ts |
| Color Options | entity-manager-app/src/pages/Entity/ConfigureEntity/EntityBuilder/components/EntityBuilderSidebar/const.ts |
Query Keys
INVALIDATE_QUERY_KEYS = {
ENTITY_SECTIONS: 'entity-sections',
FIELDS: 'fields',
ENTITY_RECORD: 'entityRecord',
RECORDS: 'records',
ENTITY_FIELDS: 'entity-fields',
GET_ENTITY_LIST: 'get-entity-list',
}
This guide is aligned with the entity-manager-app codebase as of January 2026.