eb
Entity Builder is a visual entity architecture management tool for Drupal 11.
Design, preview, and deploy content types, fields, and displays using an Excel-like spreadsheet interface or flat YAML format. Entity Builder handles dependency resolution automatically, so you never need to worry about operation ordering.
How it works
Entity Builder uses a definition-centric workflow: you create definitions (via UI or YAML), preview the changes, then apply them to your site. Definitions are reusable config entities that can be applied multiple times with smart sync - new items are created, changed items are updated, and unchanged items are skipped.
Under the hood, Entity Builder converts your definitions into atomic operations (create bundle, create field, configure display, etc.) and automatically resolve dependencies. You can define a field that references a taxonomy that's also being created in the same file - Entity Builder figures out the correct order.
Entity Builder Guide
Full documentation is available in the module's docs/ directory and covers:
- Quick start guide with example definitions
- Complete YAML format reference
- All available operations
- Extension development guide
- Drush command reference
User interface
Entity Builder Core provides the processing engine and YAML import. The included sub-module eb_ui adds a browser-based interface, and the extension module Entity Builder AG-Grid (strongly recommended) provides a full spreadsheet experience with AG-Grid.
Spreadsheet Interface
The AG-Grid interface offers:
- Tabbed sheets for Bundles, Fields, Field Groups, Displays, and Menus
- Excel-like keyboard navigation (Ctrl+Z undo, Tab between cells)
- Auto-generation of field names from labels
- Inline dropdowns for entity types, field types, widgets, and formatters
- Settings modals with native Drupal form rendering
- Real-time validation with error highlighting
- Source view toggle for direct YAML editing
Features
- Visual UI: Spreadsheet-like grid interface - no YAML knowledge required
- Flat YAML Format: One row per item, easy to edit in Google Sheets or Excel
- Automatic Dependencies: No manual operation ordering needed
- Smart Sync: Idempotent imports - run the same definition multiple times safely
- Two-Stage Validation: Operation-specific validation plus cross-cutting validator plugins
- Full Rollback Support: Undo any applied definition
- Audit Logging: Track all changes with session-level and operation-level logs
- Runtime Discovery: Auto-detect available field types, widgets, and formatters
- Complete CLI: Drush commands for automation and CI/CD pipelines
- Extensible: Plugin system for adding custom integrations
Included Sub-module
Entity Builder Core has no dependencies other than Drupal Core (field, field_ui, user). The UI functionality is provided by an included sub-module:
- eb_ui: Base UI module with definition management interface and shared API endpoints
Extension Modules
Additional functionality is provided by separate extension modules (each has its own Drupal project page):
- Entity Builder AG-Grid: AG-Grid spreadsheet interface (strongly recommended for the best editing experience) - requires AG-Grid library via Asset Packagist
- Entity Builder Field Group: Support for tabs, fieldsets, details, and HTML elements (requires Field Group)
- Entity Builder Pathauto: URL alias pattern configuration (requires Pathauto)
- Entity Builder Auto Entity Label: Automatic entity label generation (requires Auto Entity Label)
Supported Operations
Entity Builder supports 14+ operation types across bundles, fields, displays, and menus:
- Bundles: Create, update, delete content types, vocabularies, media types
- Fields: Create, update, delete, hide, reorder fields
- Displays: Configure form widgets and view formatters per display mode
- Menus: Create custom menus and menu links
- Field Groups: Create tabs, fieldsets, details, accordions (via eb_field_group)
- URL Patterns: Configure pathauto patterns (via eb_pathauto)
- Auto Labels: Configure automatic entity labels (via eb_auto_entitylabel)
Installation
Get started with Entity Builder in minutes:
# Install Entity Builder with recommended modules
composer require drupal/eb drupal/eb_aggrid drupal/eb_field_group drupal/eb_pathauto drupal/eb_auto_entitylabel
# Install AG-Grid library (requires Asset Packagist - see documentation)
composer require npm-asset/ag-grid-community:33.0.0
# Enable modules (include extensions as needed)
drush en eb eb_ui eb_aggrid eb_field_group eb_pathauto eb_auto_entitylabel field_group pathauto auto_entitylabel -y
# Clear cache
drush cr
Then navigate to Configuration > Development > Entity Builder to start creating definitions.
Quick Start
- Create a definition - Click "Add definition" and enter a label
- Add bundles - Use the Bundles tab to add content types or vocabularies
- Add fields - Use the Fields tab to add fields to your bundles
- Preview - Click Preview to see planned operations
- Apply - Click Apply to execute
For a complete example, import the included Job Board Platform demo:
drush eb:import web/modules/custom/eb/tests/fixtures/examples/job_board_platform.yml
drush eb:apply job_board_platform
This creates 7 taxonomies, 4 content types, 60+ fields, 40+ field groups, URL patterns, and auto-generated labels.
Drush Commands
drush eb:import [file]- Import a YAML definitiondrush eb:apply [id]- Apply a definitiondrush eb:rollback [id]- Rollback a definitiondrush eb:generate [id]- Export site architecture to YAMLdrush eb:list- List all definitionsdrush eb:validate [file]- Validate a YAML file
Related Projects
- Entity Builder AG-Grid - Spreadsheet interface
- Entity Builder Field Group - Field group support
- Entity Builder Pathauto - URL alias patterns
- Entity Builder Auto Entity Label - Automatic labels