Skip to main content
ElastiCORE 3.0 is a release candidate: 3.0.261022-rc1 on Maven Central. Projects on the 2.2 line: see the 2.2 documentation.
Version: 3.0

ElastiCORE 3.0

For business systems that have to last: the business rules in a few lines of YAML, the Spring Boot code generated from them - the same code every time.

ElastiCORE takes your domain model and business rules - who may do what, how an order moves along, how a value is decided - as a short DSL, and generates the Spring Boot application: JPA entities, DTOs, services, REST APIs, access checks, state transitions, and a TypeScript client for the screens. The rules stay in one place, which a developer or an AI assistant changes and a reviewer reads; the build carries them into every layer of the server, and ./gradlew elcore3ts into the TypeScript client.

  blueprint/shop/model/*.yml  ──►  Java  · Kotlin  · TypeScript
(business rules) layered · DDD · hexagonal
Spring Boot 3 · Spring Boot 4
+ your team's rules (ruleset)

Built for business systems that live for years and pass through many hands - orders, billing, contracts, back offices - where access rules and lifecycles must hold at every entry point. Not for a UI-first application, a system whose persistence is not relational or not JPA, or logic that does not fit a declarative model.

What 3.0 is​

A rule engineGeneration in 3.0 is assembled from rulesets. The same model can be read as layered, DDD or hexagonal code, in Java or Kotlin, for Spring Boot 3 or 4 - and your team can plug in rules of its own. See The rule engine.
BundlesA bundle is a named set of rulesets: jpa-springboot (the 2.x output), jpa-springboot-v3, ddd-springboot, hexagonal-springboot, their Kotlin editions and ts-model. Two words in build.gradle (architecture, language) pick one.
Opt-inNew behaviour is switched on by the DSL or a setting, never by default. A project that declares nothing gets what it got before.
2.x compatibilityA project whose elasticore { } block declares no architecture, language or rules runs the 2.x generator. On every pull request the rule engine's jpa-springboot output is compared with 2.x's over the reference project: of the 229 files 2.x generates, 224 are identical, one differs only in import order, and four differ by a 2.x bug fix listed in the history.

New since 2.2​

  • Business rules that generate their enforcement - per-operation access (@access), row ownership (@owner), passwords and sign-in (@password, @login, @signin), lifecycles (states:), derived values (@snapshot, @compute), invariants and domain events. A request that breaks one gets a defined HTTP answer (401, 403, 404, 409, 422).
  • Three architectures - layered, DDD (aggregates, sealed roots, events) and hexagonal (inbound ports, repository ports, adapters). See Architectures.
  • Kotlin and TypeScript - the same model as Kotlin sources, and a typed TypeScript client with the server's validation messages. See Languages.
  • Spring Boot 4 next to Spring Boot 3 - the generator reads the Boot version and writes, for example, enums for Jackson 3. See Spring Boot 3 and 4.
  • Value types money and quantity, timestamp, json, clob, blob.
  • Error answers as application/problem+json with a code on every refusal, in the request's language. See API and error answers.
  • Business measures (metrics:) and an Apache Ossie semantic model for BI and AI tools. See Metrics, Apache Ossie.
  • Bounded contexts (context: in env.yml) that the build enforces.
  • The Gradle plugin io.elasticore on Maven Central, with the tasks elcore3 and elcore3ts.
  • An agent kit for Claude Code, opencode and Codex CLI. See AI-assisted development.

The full list is in the release notes.

One line, every layer​

One line of the pet store's Item, and what it became (copied from the generated files):

unitCost:  money(10.2)!  @min(0.01, 'price must be positive')  @terms(price, 가격)
WhereGenerated
JPA entity@Column(name = "unit_cost", nullable = false, precision = 10, scale = 2) + a Money converter
Request DTO (400)@NotNull @DecimalMin(value = "0.01", message = "price must be positive")
TypeScript validationelse if (value.unitCost != null && Number(value.unitCost) < 0.01) errors.unitCost = "price must be positive";
Semantic model (Ossie)field unit_cost, synonyms: ["price", "가격"]

Written by hand that is one fact in four places, and forgetting one still compiles.

Where to go next​

Sourcegithub.com/xsko/ElastiCORE (Apache License 2.0)
ReleasesGitHub releases · Maven Central
Issuesgithub.com/xsko/ElastiCORE/issues
Agent kitgithub.com/xsko/elasticore-agent-kit
Live demopetstore.elasticore.io - the public demo's accounts are user / user and the administrator xsko / xsko (a local run of the sample has admin / admin); the data resets when the server restarts
Status

3.0 is a release candidate (3.0.261022-rc1). What 2.x generated stays as it was, apart from the bug fixes the history lists and, on Spring Boot 4, enums written for Jackson 3. The output of the v3 bundles - jpa-springboot-v3, DDD, hexagonal, Kotlin, TypeScript - may still change before the first stable release; each change is listed with its reason in the history. 3.0 is supported for three years from its first stable release.