Create a Module
The scaffolder generates a complete FC/IS module quickly.
Interactive wizard (recommended)
bb scaffold
The wizard walks you through:
-
Module name (e.g.
product) -
Entity name (e.g.
Product) -
Fields with types and constraints
-
Shows a summary and the equivalent raw command
-
Runs the generator
Non-interactive
bb scaffold generate \
--module-name product \
--entity Product \
--field name:string:required \
--field sku:string:required:unique \
--field price:decimal:required \
--field description:string
# Preview without writing
bb scaffold generate --dry-run \
--module-name product \
--entity Product \
--field name:string:required
AI-assisted scaffolding
# Interactive confirm
bb scaffold ai "product module with name, price, and stock quantity"
# Non-interactive
bb scaffold ai "product module with name, price, and stock quantity" --yes
What gets generated
For a product module with three fields, the scaffolder creates:
-
8 source files: core, shell (persistence, service, http, web_handlers), ports, schema
-
3 test files: unit, integration, contract
-
1 migration file
-
Zero linting errors, complete FC/IS architecture
Integration steps
After scaffolding:
# 1. Apply the migration
clojure -M:migrate up
# 2. Wire the module into config.edn
# Add :boundary/product key to resources/conf/dev/config.edn
# 3. Register routes in module HTTP wiring and config
# 4. Reload the system
# In REPL: (reset)
Adding fields after the fact
bb scaffold field # Interactive: choose module, field name/type
This generates a new migration and updates schema.clj and persistence.clj.
Other scaffold commands
bb scaffold new # Bootstrap a new Boundary project
bb scaffold endpoint # Add an endpoint to an existing module
bb scaffold adapter # Generate a new adapter implementation
bb scaffold # Show all commands and help
See Scaffolder library for the full reference.