Liking cljdoc? Tell your friends :D

Monorepo Structure

Boundary is a monorepo of 20 independently publishable libraries under libs/. Each library can be published to Clojars as a standalone dependency.

Top-level layout

boundary/
├── src/                   ← Main application source tree
├── libs/                  ← 20 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

The starter template and example applications live in separate repositories:

Library structure

Each library under libs/ follows the same pattern:

libs/{library}/
├── src/{library}/
│   ├── core/              ← Pure functions
│   ├── shell/             ← Side effects
│   ├── ports.clj          ← Protocol definitions
│   └── schema.clj         ← Malli schemas
├── test/{library}/
│   ├── core/              ← Unit tests (^:unit)
│   └── shell/             ← Integration + contract tests
└── AGENTS.md              ← Library-specific dev guide

Library overview

LibraryPurpose

core

Foundation: validation, utilities, interceptor pipeline, feature flags

observability

Logging, metrics, error reporting (Datadog, Sentry)

platform

HTTP, database, CLI infrastructure

ui-style

Shared UI style contract: central CSS/JS bundles and tokens

user

Authentication, authorization, MFA, session management

admin

Auto-generated CRUD admin UI (Hiccup + HTMX)

storage

File storage: local filesystem and S3

scaffolder

Interactive module code generator

cache

Distributed caching: Redis and in-memory

jobs

Background job processing with retry logic

email

Email: SMTP, async, jobs integration

tenant

Multi-tenancy with PostgreSQL schema-per-tenant isolation

realtime

WebSocket / SSE for real-time features

external

External service adapters: Stripe, Twilio, IMAP

reports

PDF, Excel, Word generation via defreport macro

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

geo

Geocoding (OSM/Google/Mapbox), DB cache, Haversine distance

ai

Framework-aware AI tooling: NL scaffolding, error explainer, test generator

Running tests per library

clojure -M:test:db/h2 :core
clojure -M:test:db/h2 :user
clojure -M:test:db/h2 :admin
# etc.

Configuration

Aero-based configuration with environment profiles in resources/conf/{env}/config.edn. The active environment is controlled by the BND_ENV environment variable.

export BND_ENV=development   # loads resources/conf/dev/config.edn
export BND_ENV=test          # loads resources/conf/test/config.edn
export BND_ENV=production    # loads resources/conf/prod/config.edn

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