Monorepo Structure
Wagoe is a monorepo of 33 independently publishable libraries under libs/.
Each library can be published to Clojars as a standalone dependency.
Top-level layout
wagoe/
├── src/ ← Main application source tree
├── libs/ ← 33 independently publishable libraries
│ ├── core/
│ ├── observability/
│ ├── platform/
│ ├── user/
│ └── ...
├── docs/ ← Documentation (this site)
├── dev-docs/ ← Internal: ADRs, decisions, presentations
├── resources/conf/ ← Aero-based configuration
│ ├── dev/
│ ├── test/
│ ├── acc/
│ └── prod/
├── deps.edn ← Root deps with all aliases
└── tests.edn ← Kaocha test suite definitions
Example applications live under examples/, and CI runs both on every commit:
-
examples/shop— a generated application:wagoe newplus one scaffolded module, committed as generator output and re-verified bybb example:regen --check -
examples/todo— functional core / imperative shell with no framework at all
The former wagoe-examples repository is archived; these two are the examples.
Library structure
Each library under libs/ follows the same pattern:
libs/{library}/
├── src/wagoe/{library}/
│ ├── core/ ← Pure functions
│ ├── shell/ ← Side effects
│ ├── ports.clj ← Protocol definitions
│ └── schema.clj ← Malli schemas
├── test/wagoe/{library}/
│ ├── core/ ← Unit tests (^:unit)
│ └── shell/ ← Integration + contract tests
└── AGENTS.md ← Library-specific dev guide
Library overview
| Library | Purpose |
|---|---|
Foundation: validation, utilities, interceptor pipeline, feature flags |
|
Logging, metrics, tracing, error reporting (Datadog, Prometheus, OTLP, Sentry) |
|
HTTP, database, CLI infrastructure |
|
Shared UI style contract: central CSS/JS bundles and tokens |
|
Authentication, authorization, MFA, session management |
|
Auto-generated CRUD admin UI (Hiccup + HTMX) |
|
File storage: local filesystem and S3 |
|
Interactive module code generator |
|
Distributed caching: Redis and in-memory |
|
Background job processing with retry logic |
|
Email: SMTP, async, jobs integration |
|
Multi-tenancy with PostgreSQL schema-per-tenant isolation |
|
WebSocket / SSE for real-time features |
|
Internationalisation: marker-based translation, locale chain, EDN catalogues |
|
External service adapters: SMTP, IMAP, Twilio, FTPS, SOAP |
|
PDF, CSV, Excel and Word export via the |
|
Recurring events, iCal export/import, conflict detection |
|
Declarative state machine workflows with audit trail |
|
Full-text search: PostgreSQL FTS with LIKE fallback |
|
Geocoding (OSM/Google/Mapbox), DB cache, Haversine distance |
|
Framework-aware AI tooling: NL scaffolding, error explainer, test generator |
|
Aero config loading and the typed accessors libraries read through |
|
Rule-based audience segmentation: SQL plus predicate evaluation |
|
Cross-process event bus: in-memory and Redis Streams |
|
Outbound webhooks: signed, retried, per-tenant delivery of bus events |
|
Push notifications via FCM and APNs |
|
Payment provider abstraction: Stripe, Mollie, Mock |
|
Shared Hiccup UI primitives: forms, tables, layouts |
|
Test kit for apps: test system, Ring client, deterministic jobs and events |
|
Development only: error pipeline with WGE codes, dev dashboard, REPL helpers |
|
Babashka developer tooling: scaffolding, doctor, quality gates, deploy |
|
The |
|
MCP server for AI coding agents working in a Wagoe project |
Running tests per library
clojure -M:test :core
clojure -M:test :user
clojure -M:test:test/pg :admin
# etc.
Configuration
Aero-based configuration with environment profiles in resources/conf/{env}/config.edn.
The active environment is controlled by the WAG_ENV environment variable.
export WAG_ENV=dev # loads resources/conf/dev/config.edn
export WAG_ENV=test # loads resources/conf/test/config.edn
export WAG_ENV=production # loads resources/conf/prod/config.edn