scaffolder
Generates new Boundary modules with FC/IS structure, tests, and migrations.
Commands
bb scaffold # Show help and all commands
bb scaffold generate # Generate a new module (interactive wizard)
bb scaffold new # Bootstrap a new Boundary project
bb scaffold field # Add a field to an existing entity
bb scaffold endpoint # Add an endpoint to an existing module
bb scaffold adapter # Generate a new adapter implementation
Generating a module
Interactive wizard (recommended)
bb scaffold generate
The wizard guides you through the options, shows a summary, prints the equivalent raw command, then 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
# 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, stock"
# Non-interactive
bb scaffold ai "product module with name, price, stock" --yes
What gets generated
For a module with three fields:
-
8 source files: core, shell (
persistence,service,http,web_handlers), ports, schema -
3 test files: unit (
^:unit), integration (^:integration), contract (^:contract) -
1 SQL migration file
-
Zero linting errors and a complete FC/IS architecture
Key namespaces
| Namespace | Purpose |
|---|---|
|
CLI entrypoint |
|
Pure generation logic and naming/field transforms |
|
File templates and output orchestration |
Gotchas
-
Regenerated files can drift if templates change without matching test fixtures
-
Generated field names use kebab-case internally; convert only at HTTP/DB boundaries
Testing
clojure -M:test:db/h2 :scaffolder