Monorepo Structure
Boundary is a monorepo of 22 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/ ← 22 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 example applications live in a separate repository:
-
boundary-examples — reference applications (ecommerce-api, blog-app, and more)
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
| Library | Purpose |
|---|---|
Foundation: validation, utilities, interceptor pipeline, feature flags |
|
Logging, metrics, error reporting (Datadog, 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: Stripe, Twilio, IMAP |
|
PDF, Excel, Word generation via |
|
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 |
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