Liking cljdoc? Tell your friends :D

Quickstart

Bootstrap a new project

The bootstrap script is the quickest way to get started. It pulls down only the starter essentials:

curl -fsSL https://raw.githubusercontent.com/thijs-creemers/boundary-starter/main/scripts/bootstrap.sh | bash
cd boundary-starter
bb setup

This gives you:

  • SQLite for zero-config development

  • HTTP server on port 3000

  • A complete Integrant system

  • REPL-driven development workflow

  • A production-ready Dockerfile

Start the system

export JWT_SECRET="change-me-dev-secret-min-32-chars"
export BND_ENV="development"
clojure -M:repl-clj

In the REPL:

(go)
;; => System started. Visit http://localhost:3000

;; Later, after changing code:
(reset)

;; If you changed a defrecord, do a full restart:
(halt)
(go)

Scaffold your first module

The interactive wizard is the standard way to create a module:

bb scaffold

If you want the same result without prompts, use the generated command directly. For example, a product module:

bb scaffold generate \
  --module-name product \
  --entity Product \
  --field name:string:required \
  --field sku:string:required:unique \
  --field price:decimal:required

bb scaffold integrate product

# Apply the generated migration
clojure -M:migrate up

Then reload the system so the new routes are live:

(reset)
;; => Visit http://localhost:3000/admin/products

Run tests

clojure -M:test:db/h2
clojure -M:test:db/h2 :product
clojure -M:test:db/h2 --focus-meta :unit

Next steps

  • Your First Module - see what the scaffolder generated

  • Key Concepts - learn the rules once, then reuse them everywhere

  • Functional Core / Imperative Shell - the pattern behind everything

  • Testing - unit, integration, and contract tests

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