Liking cljdoc? Tell your friends :D

scaffolder

Generates new Boundary modules with complete 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

bb scaffold generate

The wizard guides you through all 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 3 fields:

  • 9 source files: core, shell (persistence, service, http, module-wiring), ports, schema

  • 3 test files: unit (^:unit), integration (^:integration), contract (^:contract)

  • 1 SQL migration file

  • Zero linting errors, complete FC/IS architecture

Key namespaces

NamespacePurpose

boundary.scaffolder.shell.cli-entry

CLI entrypoint

boundary.scaffolder.core.*

Pure generation logic and naming/field transforms

boundary.scaffolder.shell.templates.*

File templates and output orchestration

Gotchas

  • Regenerated files can drift if templates are updated without updating test fixtures

  • Generated field names use kebab-case internally; convert only at HTTP/DB boundaries

Testing

clojure -M:test:db/h2 :scaffolder

Can you improve this documentation?Edit on GitHub

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close