Skip to content

Core

The runtime platform for generated Jardis domains, from the service Koffer to the HTTP response.

Jardis Core is the foundation the Builder-generated domain code runs on. It provides two clearly separated building blocks: Kernel packs all infrastructure services into an immutable Koffer that every generated domain receives via constructor injection. App implements the HTTP-delivery layer around this Koffer: router, middleware pipeline and the canonical envelope mapper.

Overview

Two packages, two jobs:

  • Kernel (jardiscore/kernel) — the Koffer (DomainKernel): an immutable container with eleven service accessors, plus an optional ENV packer that builds it from .env. The generated domain takes it in its constructor: new Ecommerce($kernel).
  • App (jardiscore/app) — the HTTP delivery: FastRoute behind its own RouterInterface, a PSR-15 middleware pipeline and the one canonical DomainResponse → PSR-7 mapper ({status, data, errors, meta}).

GitHub: jardisCore

Kernel decoupling (2026-07)

DomainApp, BoundedContext, ServiceRegistry and the response-trio classes are no longer part of Kernel. The Builder now generates them per domain as {Domain}Context and {Domain}\Response\*. Kernel keeps only the Koffer and the ENV packer.

Packages

Kernel

The immutable Koffer: DomainKernel with eleven constructor-injected services (DB, cache, logger, events, HTTP, mailer, filesystem, …) and an optional BuildDomainKernelFromEnv packer that assembles it from an .env cascade. Builds nothing itself, reads no ENV: a pure, unchangeable consumer.

bash
composer require jardiscore/kernel

App

The HTTP-delivery layer for generated domains: a Routes collector, a FastRoute Router behind its own interface, a PSR-15 pipeline (global outside, route inside) and the App orchestrator that translates every DomainResponse into the {status, data, errors, meta} envelope. Boundary errors (404/405/500) respond in the same envelope.

bash
composer require jardiscore/app

Relationship between the packages

BuildDomainKernelFromEnv (Kernel, optional)
    ↓ builds
DomainKernel — the Koffer (Kernel)
    ↓ constructor injection
new Ecommerce($kernel) — generated domain (Builder output)
    ↓ reads read()/process()/exposed rules
App — HTTP delivery (App)
    ↓ DomainResponse → PSR-7 envelope
{status, data, errors, meta}

The Koffer is the seam between infrastructure and domain: Kernel fills it, the generated domain consumes it, App ships the results as HTTP. No generated domain ever imports jardiscore/app: the delivery layer is replaceable (a Symfony front controller can satisfy the same envelope).