|
8 | 8 | [](https://atypical-consulting.github.io/Koine/) |
9 | 9 | [](https://dotnet.microsoft.com/) |
10 | 10 | [](tests/) |
11 | | - |
| 11 | + |
12 | 12 | [](LICENSE) |
13 | 13 |
|
14 | 14 | ## The problem |
@@ -42,6 +42,12 @@ aggregates with invariant-checked behaviors, factories that mint identities, dom |
42 | 42 | a `Vec`-friendly `DomainEvent` collection, query DTOs and read-model projections, and repositories as |
43 | 43 | `trait`s; **multi-context** models compile end-to-end via `crate::<module>` qualification; depends only |
44 | 44 | on `rust_decimal` for money and `regex` for `matches`, plus `uuid` when a model uses a factory), a |
| 45 | +**Java 17** emitter ships (`--target java` → dependency-free, stdlib-only Java 17: value objects and |
| 46 | +domain events as validating `record`s with compact constructors, smart enums as Java `enum`s (with |
| 47 | +per-constant associated data), entities and aggregates as classes with identity `equals`/`hashCode` and |
| 48 | +invariant-guarded behaviors, generated identities as branded `record`s minting `java.util.UUID`, domain |
| 49 | +events grouped under a per-context `sealed interface DomainEvent`, and repositories as `interface`s — |
| 50 | +one public type per `.java` file, `koine.runtime.DomainException` for invariant failures), a |
45 | 51 | **docs** target emits living |
46 | 52 | documentation (`--target docs` → Markdown + Mermaid diagrams) straight from the model, an |
47 | 53 | **AsyncAPI 3.0** target emits a single event-API document (`--target asyncapi` → channels, messages, |
@@ -76,7 +82,7 @@ surface below is a click away in the [live Studio](https://atypical-consulting.g |
76 | 82 | | IDE view | What it shows | |
77 | 83 | |----------|---------------| |
78 | 84 | | **Editor & live diagnostics** | Your `.koi` model on the left, the emitted code on the right, with error squiggles and quick info as you type — the same parser and validator the CLI runs. | |
79 | | -| **Emit-target switcher** | Flip the *same* model between **C#**, **TypeScript**, **Python**, **PHP**, and **Rust** output without leaving the page. | |
| 85 | +| **Emit-target switcher** | Flip the *same* model between **C#**, **TypeScript**, **Python**, **PHP**, **Rust**, and **Java** output without leaving the page. | |
80 | 86 | | **Context-map graph** | An interactive graph of the bounded contexts and the relationships between them. | |
81 | 87 | | **Diagram views** | Aggregates and state machines rendered as diagrams straight from the model. | |
82 | 88 | | **Ubiquitous-language glossary** | The generated glossary of every term in the domain, kept in lock-step with the model. | |
@@ -206,6 +212,9 @@ dotnet run --project src/Koine.Cli -- build templates/starters/billing/billing.k |
206 | 212 | # Or to Rust (multi-context + CQRS — an idiomatic crate; `cargo build` proves it compiles) |
207 | 213 | dotnet run --project src/Koine.Cli -- build templates/starters/billing/billing.koi --target rust --out ./generated_rs |
208 | 214 |
|
| 215 | +# Or to Java (dependency-free Java 17 — records, sealed events, invariant-guarded classes; `javac --release 17` proves it compiles) |
| 216 | +dotnet run --project src/Koine.Cli -- build templates/starters/billing/billing.koi --target java --out ./generated_java |
| 217 | + |
209 | 218 | # Emit the opt-in C# Application layer alongside the domain (handlers, validators, query handlers, DI) |
210 | 219 | dotnet run --project src/Koine.Cli -- build templates/starters/billing/billing.koi --target csharp --layers domain,application --out ./generated |
211 | 220 |
|
|
0 commit comments