Wagoe is a batteries-included Clojure web framework that enforces the Functional Core / Imperative Shell (FC/IS) pattern: pure business logic in core/, side effects in shell/, and clean interfaces through ports.clj protocols.
Status: stable since 1.0. The public surface follows Semantic Versioning: a breaking change needs a major version, after a deprecation of at least one minor release and 90 days. A few libraries are incubating — usable, outside that guarantee, and marked as such in wagoe list modules. See Stability.
Questions go to GitHub Discussions; bugs and feature requests to Issues.
Install the Wagoe CLI — it handles all prerequisites (JVM, Clojure CLI, Babashka, bbin) automatically:
curl -fsSL https://get.wagoe.org | bash
Fallback if get.wagoe.org is unavailable:
curl -fsSL https://github.com/wagoebv/wagoe/releases/latest/download/install.sh | bash
Supports macOS, Debian/Ubuntu, Fedora/RHEL, Arch Linux, and WSL2.
# 1. Create a new project
wagoe new my-app
cd my-app
# 2. Add optional modules (e.g. cache, jobs, search)
wagoe add cache
wagoe list modules # see all optional modules
# 3. Run database migrations
bb migrate up
# 4. Start the REPL (prompt + nREPL server on port 7888)
source .env # wagoe new wrote it, with a generated JWT_SECRET
bb repl
At the prompt — or from your editor (or the Wagoe MCP server) connected to port 7888 — eval:
(go) ; start the system — http://localhost:3000
(reset) ; reload changed namespaces and restart
(halt) ; stop the system
You get: SQLite database (zero-config, and your data survives a restart), HTTP server on port 3000, a complete Integrant system, and REPL-driven development.
wagoe doctor # checks the project and prints the one thing to fix
bb guide # topic guides: scaffold, testing, database, fcis, config, seed
bb guide error WGE-201 # what an error code means and how to fix it
wagoe doctor runs the environment, config, command and project-setup checks in
one pass and ends with a single next action. The bb tasks behind it still
exist and CI calls them directly; you do not need to know which is which.
For developers: 34 independently-publishable libraries on Clojars — use just wagoe-core for validation utilities, or go full-stack with JWT + MFA auth, auto-generated CRUD UIs, background jobs, multi-tenancy, real-time WebSockets, and more. Every library follows the same FC/IS structure, making any Wagoe codebase instantly familiar.
Ship faster: The scaffolder generates fully structured modules (entity + routes + tests) in seconds. The admin UI auto-generates CRUD interfaces from your schema — no manual forms. Built-in observability, RFC 5988 pagination, and declarative interceptors mean you write business logic, not plumbing. AI tooling (bb scaffold ai, and the experimental bb ai gen-tests and bb ai sql) handles the repetitive parts.
Ship with confidence: Reference deployment configs (systemd, nginx, Fly.io, Render), an OWASP-aligned security checklist, scaling guides, health check endpoints, and zero-downtime migration patterns.
Zero lock-in: Each library is a standard deps.edn dependency. Swap what doesn't fit.
Projects created with wagoe new are agent-ready out of the box: they
include a CLAUDE.md, an AGENTS.md, and a Claude Code skill at
.claude/skills/wagoe/SKILL.md that teaches the agent to use Wagoe's
scaffolder and AI tooling instead of hand-writing boilerplate. Open Claude
Code in a fresh project and ask:
add a product module with name, price, and stock
The agent will reach for bb scaffold and generate a complete FC/IS module
with tests and migrations.
For existing projects (or to get updates without regenerating), install the plugin from this repo's marketplace:
/plugin marketplace add wagoebv/wagoe
/plugin install wagoe@wagoe
See claude-plugin/README.md for details.
| Resource | Description |
|---|---|
| Documentation | Architecture guides, tutorials, library reference (Antora) |
| AGENTS.md | Commands, conventions, common pitfalls, debugging |
| CONTRIBUTING.md | How to contribute: the flow to main, reviews, pull requests |
| RELEASING.md | When and how a version is released |
| dev-docs/adr/ | Architecture Decision Records |
| Deployment Patterns | systemd, nginx, Fly.io, Render reference configs |
| Migrations Guide | Zero-downtime schema change patterns |
| Security Checklist | OWASP Top 10 aligned production checklist |
| Scaling Guide | JVM, HikariCP, Redis, and HTTP tuning |
Each library also has its own AGENTS.md with library-specific documentation.
Wagoe is a monorepo of 34 independently publishable libraries, application and development tooling alike:
| Library | Description |
|---|---|
| config | Aero-based configuration loading and typed accessors |
| core | Foundation: validation, utilities, interceptor pipeline, feature flags |
| observability | Logging, metrics, error reporting (Datadog, Sentry) |
| platform | HTTP, database, CLI infrastructure |
| platform-sql | JDBC adapters, migrations, seeding and leases, without the HTTP stack |
| user | Authentication, authorization, MFA, session management |
| admin | Auto-generated CRUD admin UI (Hiccup + HTMX) |
| storage | File storage: local filesystem, S3 and GCS |
| scaffolder | Interactive module code generator |
| cache | Distributed caching: Redis and in-memory |
| jobs | Background job processing with retry logic |
| Email delivery: SMTP, async, jobs integration | |
| tenant | Multi-tenancy with PostgreSQL schema-per-tenant isolation |
| realtime | WebSocket / SSE for real-time features |
| external | External service adapters: SMTP, IMAP, Twilio, FTPS, SOAP |
| payments | Payment provider abstraction: Stripe, Mollie, Mock |
| reports | PDF, Excel, and Word (DOCX) generation via defreport |
| calendar | Recurring events, iCal export/import, conflict detection |
| workflow | Declarative state machine workflows with audit trail |
| search | Full-text search: PostgreSQL FTS with LIKE fallback for H2/SQLite |
| geo | Geocoding (OSM/Google/Mapbox), DB cache, Haversine distance |
| ai | Framework-aware AI tooling: NL scaffolding, error explainer, test generator, SQL copilot, docs wizard |
| i18n | Marker-based internationalisation with translation catalogues |
| push | Multi-platform push notifications: FCM (Firebase) + APNs (Apple) |
| audience | Rule-based audience segmentation with SQL + predicate pipeline |
| webhooks | Outbound webhooks: signed, retried, per-tenant delivery of bus events |
| ui-style | Shared UI style bundles, design tokens, CSS/JS assets |
| shared-ui | Shared Hiccup primitives: forms, tables, layouts, modals, icons |
| devtools | Dev-only: error pipeline, dev dashboard, REPL power tools, guidance engine |
| tools | Dev-only: deploy, doctor, setup, scaffolder integration, quality checks |
| wagoe-cli | The wagoe command: new, add, list modules, doctor, upgrade |
| wagoe-mcp | MCP server over stdio for editor agents |
Wagoe enforces the Functional Core / Imperative Shell pattern throughout:
libs/{library}/src/wagoe/{library}/
├── core/ # Pure: no reads, writes, clock or state; no logging yet; no exceptions
├── shell/ # All side effects: persistence, services, HTTP handlers
├── ports.clj # Protocol definitions (interfaces for dependency injection)
└── schema.clj # Malli validation schemas
Dependency rules (strictly enforced):
This keeps business logic fast to test (no mocks needed), easy to reason about, and safe to refactor.
Case conventions — a frequent source of bugs:
| Wagoe | Convention |
|---|---|
| Clojure code | kebab-case (:password-hash, :created-at) |
| Database | snake_case |
| API (JSON) | kebab-case — except wagoe-user's own API, which is camelCase |
Use wagoe.core.utils.case-conversion for conversions. Never convert manually.
# Testing (Kaocha, default test profile uses H2 in-memory DB)
clojure -M:test:test/all # All tests
clojure -M:test :core # Single library
clojure -M:test:test/all --focus-meta :unit # Unit tests only
clojure -M:test:test/all --focus-meta :integration # Integration tests only
clojure -M:test --watch :core # Watch mode
JWT_SECRET="dev-secret-at-least-32-characters-long" WAG_ENV=test clojure -M:test:test/all
# Linting
clojure -M:clj-kondo --lint src test libs/*/src libs/*/test
# REPL (nREPL on port 7888)
clojure -M:repl-clj
# In REPL: (go) | (reset) | (halt)
# Build
clojure -T:build clean && clojure -T:build uber
# Database migrations
clojure -M:migrate up
# Scaffolding
bb scaffold # Interactive module wizard
bb scaffold ai "product module with name, price, stock" # NL scaffolding via AI (interactive confirm)
bb scaffold ai "product module with name, price, stock" --yes # Non-interactive generation
# AI tooling
bb ai explain --file stacktrace.txt # Explain error (experimental)
bb ai gen-tests libs/user/src/wagoe/user/core/validation.clj # Generate tests (experimental)
bb ai sql "find active users with orders in last 7 days" # HoneySQL from NL (experimental)
bb ai docs --module libs/user --type agents # Generate AGENTS.md
# Operations
wagoe doctor # One diagnostic pass, one next action (start here)
bb doctor # Just the config checks
bb doctor --env all --ci # Check all envs, exit non-zero (CI)
bb guide next # What to do next in this project
bb install-hooks # Once per clone: a push to main runs bb check first
bb setup # Interactive config setup wizard
bb setup ai "PostgreSQL with Stripe payments" # AI-powered config setup
bb deploy --all # Deploy all libraries to Clojars
bb deploy --missing # Deploy only unpublished libraries
See AGENTS.md for the complete command reference, common pitfalls, and debugging strategies.
The default test profile runs against in-memory H2. To run against PostgreSQL:
resources/conf/test/config.edn.resources/conf/test/config.edn, move :wagoe/postgresql from :inactive to :active
and move :wagoe/h2 out of :active.WAG_ENV=test JWT_SECRET="dev-secret-at-least-32-characters-long" clojure -M:migrate up
WAG_ENV=test JWT_SECRET="dev-secret-at-least-32-characters-long" clojure -M:test:test/all
resources/conf/test/config.edn after the run.bb check runs every quality gate CI runs; the FC/IS and ports checks also run as a pre-commit hook. A few of them:
bb check:fcis # Core namespaces must not import shell, I/O, logging, or DB
bb check:placeholder-tests # No (is true) placeholders masking missing coverage
bb check:deps # Library dependency direction + cycle detection
clojure -M:test:test/all --focus-meta :security # Error mapping, CSRF, XSS, SQL parameterization
See ADR-021 (FC/IS rules) and ADR-022 (error handling conventions) for rationale.
See RELEASING.md. In short, from a clean, up-to-date main:
bb release 1.3.0
It moves [Unreleased] in the changelog to the version, bumps it everywhere,
pushes the release commit, waits for CI on main to pass and pushes the tag;
publish.yml publishes to Clojars after a release manager approves.
;; Validation utilities only
{:deps {com.wagoe/wagoe-core {:mvn/version "1.3.0"}}}
;; Full web application stack
{:deps {com.wagoe/wagoe-platform {:mvn/version "1.3.0"}
com.wagoe/wagoe-user {:mvn/version "1.3.0"}
com.wagoe/wagoe-admin {:mvn/version "1.3.0"}}}
Build the uberjar and deploy to any platform:
clojure -T:build clean && clojure -T:build uber
WAG_ENV=prod java -jar target/wagoe-*-standalone.jar
Reference configurations are provided under resources/deploy/:
| Template | Description |
|---|---|
| systemd | Service unit + environment file for bare-metal/VM |
| nginx | Reverse proxy with TLS, WebSocket support, static caching |
| Fly.io | Auto-scaling, health checks, Amsterdam region |
| Render | Blueprint with managed PostgreSQL |
Health endpoints: /health (liveness), /health/ready (readiness with DB/cache checks), /health/live (container orchestrator).
See the Deployment Patterns guide for full instructions.
Copyright 2024–2026 Thijs Creemers.
Distributed under the Eclipse Public License 2.0.
Can you improve this documentation? These fine people already did:
Thijs Creemers & thijscreemersEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |