Skip to content

Bounded Contexts in PHP. Physically separated, not just conceptual.

Bounded Contexts are the core concept of Domain-Driven Design, yet the boundaries rarely exist in code. Jardis generates each as a standalone PHP package with its own structure, entities, and rules.

Bounded Contexts sound simple. Clean implementation is not.

Most teams draw domain boundaries on whiteboards. In code, they do not exist.

Boundaries exist only on paper

The architecture diagram shows clear domains. In code, the billing service reads user tables directly, and the order module accesses inventory entities. Boundaries erode with every feature because nothing enforces them physically.

Domain logic spreads everywhere

Without real separation, business logic migrates wherever it is needed. Pricing rules appear in checkout, validation lands in controllers. After a year, nobody knows which logic belongs to which domain.

Teams work against each other instead of in parallel

Three teams, one monolith, the same namespaces. Every change to one domain risks side effects in another. Deployments become coordination overhead because there are no real boundaries.

How Jardis Implements Bounded Contexts.

Each Bounded Context becomes a standalone PHP package. No conventions, physical separation.

PHYSICAL ISOLATION

One package per domain, with its own structure

Jardis generates each Bounded Context as a standalone PHP package with its own directory structure: entities, commands, queries, events, API contracts, and repository pipeline. No BC imports classes from another. The separation is the folder structure itself.

DEFINED CONTRACTS

Communication only via contracts and events

Bounded Contexts do not talk to each other directly. Jardis generates API contracts and domain events as defined interfaces between domains. When a BC changes, contracts break before silent failures reach production.

COMPLETE ARTIFACTS

Everything a Bounded Context needs, from one definition

Define the schema, start the builder. Jardis generates 3-layer entities, commands and queries (CQRS), domain events, API contracts, and the repository pipeline. 80% of the technical foundation is ready instantly. Your team writes the business logic.

See what three files turn into.

Three definition files in, a complete bounded context out. Browse the generated code.

E-Commerce / Sales
schema.yaml
# Database Schema — Sales Bounded Context
# This file defines the persistent storage structure.

schema:
  domain: ECommerce
  boundedContext: Sales

tables:
  order:
    columns:
      id:
        type: integer
        primary: true
        autoIncrement: true
      public_id:
        type: uuid7
        unique: true
      customer_email:
        type: string
        length: 255
      status:
        type: string
        length: 32
        default: "draft"
      total_amount:
        type: integer
      currency:
        type: string
        length: 3
        default: "EUR"
      created_at:
        type: datetime
      updated_at:
        type: datetime
        nullable: true

  order_item:
    columns:
      id:
        type: integer
        primary: true
        autoIncrement: true
      order_id:
        type: integer
        foreignKey:
          table: order
          column: id
          onDelete: cascade
      product_name:
        type: string
        length: 255
      sku:
        type: string
        length: 64
      quantity:
        type: integer
      unit_price:
        type: integer
      line_total:
        type: integer
Files
Definitions (Input)
Generated Code (Output)
BUILDER OUTPUT
80%
Infrastructure per BC generatedEntities, commands, queries, events, API contracts, and repository pipeline. Per Bounded Context, from a single schema definition.
3x
faster creation of new domains
0
cross-domain access possible
ARCHITECTURE
100%
Domain isolationEvery generated Bounded Context is a standalone package. No shared namespaces, no hidden dependencies between domains.

Why Teams Choose Jardis for Bounded Contexts.

Because DDD does not fail because of theory. It fails because of technical implementation.

> Domain Ownership

Each team owns its Bounded Context

Billing, ordering, inventory: each domain is a standalone package. Teams develop and deploy independently. No coordination over shared namespaces, no merge conflicts in foreign domains.

> Structural Clarity

The architecture explains itself

New team members open the project and immediately see: which domains exist, where the boundaries are, how BCs communicate. No architecture documentation needed. The structure is the documentation.

> Safe Evolution

Change domains without side effects

Refactoring a domain without breaking others. That only works with real boundaries. Jardis enforces isolation at the filesystem level. Internal changes to one BC cannot affect other BCs.

Bounded Contexts that hold up in code?

Join the Waitlist

Structure costs less than chaos.

Free Trial

Try Jardis 7 Days Free

Point Jardis at your real domain. Discovery, structure, and your first platform build.

Join Waitlist
20 Discovery Runs
5 Structure Builds
1 Platform Build
All Jardis packages as open source
Jardis Base
€29per month

The complete DDD architecture with all classes and contracts. Your team ships features, not infrastructure.

Join Waitlist
Unlimited Discovery Runs
Unlimited Structure Builds
All 26 Jardis packages included
PHPStan Level 8 from day one
Jardis Pro
€180per month

The complete business logic with handlers, validation, and pipelines. What used to be a sprint is now a build.

Join Waitlist
Everything from Jardis Base
Commands, queries, and events fully implemented
Platform code in seconds instead of weeks
Additional Runs for €89 each
Enterprise

More than 20 Platform Builds per month?

Let's talk

Be there when Jardis launches.

Sign up. You'll get access as soon as we go live. Including a free trial.

100+ developers are already waiting for launch

Curious how Jardis works?

Discover Jardis

Frequently Asked Questions

Answers about Bounded Contexts with Jardis.

Per Bounded Context, Jardis generates a standalone PHP package with its own directory structure. Included: the entity hierarchy, CQRS infrastructure, domain events, and API contracts for communication with other BCs. Each package is self-contained. No BC imports classes from another.