README.md

August 3, 2026 · View on GitHub

Wow

Wow

Domain Model as a Service

Modern Reactive CQRS Architecture Microservice Development Framework
Based on DDD & Event Sourcing

KaiCode'26 Excellent Award
KaiCode’26 Excellent Award

License GitHub release Maven Central Codacy Codecov CI Awesome Kotlin DeepWiki

Domain-Driven · Event-Driven · Test-Driven · Declarative Design · Reactive · CQRS · Event Sourcing

English · 中文


Recognition

Wow received the KaiCode’26 Excellent Award. The official results highlighted its modular DDD/CQRS design, disciplined multi-reviewer code review, Testcontainers-based integration testing, enforced test coverage thresholds, Detekt static analysis, bilingual documentation, and long history of semantically versioned releases on Maven Central.

Quick Start

Use this template

Click the button above to create a new repository from Wow Project Template, then clone it and start writing your domain model.

Wow 8.x supports Spring Boot 4.x, Java 17+

Wow 6.x requires Java 17+, but its Spring Boot baseline depends on the exact tag: earlier tags such as v6.8.0 use Spring Boot 3, while v6.21.5 uses Spring Boot 4.0. Pin the source tag before planning an upgrade.

Why Wow?

As business complexity grows, traditional CRUD architectures hit bottlenecks — tangled database schemas, painful sharding, and fragile distributed transactions. Domain-Driven Design and Event Sourcing address these problems, but often come with steep learning curves and implementation overhead.

Wow was built to change that. After years of production validation, it distills DDD + ES into a developer-friendly framework where you focus on the domain model, and Wow handles the rest.

For developers:

  • Focus on business, not infrastructure — Write only the domain model; Wow auto-generates OpenAPI interfaces
  • Effortless testing — The Given→When→Expect pattern makes 85%+ unit test coverage the norm, not the exception
  • Elegant read-write separation — Wait for the PROJECTED signal instead of guessing sync delays; no more "wait 1 second and refresh"
  • Scale without code changes — Horizontal scaling without sharding rules or database relationship refactoring

For enterprises:

  • Business Intelligence — State events and commands serve as rich, real-time data sources, reducing ETL to simple SQL scripts
  • Operation Audit — Every command and its resulting domain events are recorded with clear business semantics
  • Engineering Quality — In API testing, Wow-based projects showed only 1/3 the bug count of traditional-architecture projects at the same skill level

Features

Wow Features

FeatureDescription
Domain Model as a ServiceJust write the domain model, Wow auto-generates OpenAPI interfaces — no controller boilerplate needed
Test SuiteGiven→When→Expect pattern (AggregateSpec / SagaSpec), 80%+ coverage made easy
High PerformanceAppendOnly writes to event store, query-oriented search engines for reads — 59k+ TPS in stress tests
Horizontal ScalabilityNo sharding rules needed, business code unchanged when scaling out
Distributed TransactionsSaga orchestration pattern for carefully managed multi-service transactions
Event CompensationVisual dashboard + automatic retry with configurable RetrySpec for eventual consistency
Read-Write SeparationSENT / PROCESSED / PROJECTED wait plans eliminate sync-delay guesswork
ObservabilityEnd-to-end OpenTelemetry integration for tracing, metrics, and debugging
ReactiveNon-blocking async messaging with Project Reactor throughout the entire stack
Event SourcingFull state history via event replay, enabling powerful audit and time-travel debugging
Business IntelligenceRich event-sourced data with real-time sync to data warehouses, minimal ETL cost

Architecture

Architecture

Command Processing Propagation Chain

Command Processing Chain

Performance

Stress test of the example application (2 min):

OperationWait PlanAvg TPSPeak TPSAvg Latency
Add To CartSENT59,62582,31229 ms
Add To CartPROCESSED18,69624,141239 ms
Create OrderSENT47,83886,200217 ms
Create OrderPROCESSED18,23025,506268 ms
Performance Details & Deployment

AddCartItem-SENT

CreateOrder-SENT

Test Suite

Given → When → Expect

CI Flow

Aggregate Test (AggregateVerifier)

class CartSpec : AggregateSpec<Cart, CartState>({
  on {
    whenCommand(AddCartItem(productId = "productId", quantity = 1)) {
      expectNoError()
      expectEventType(CartItemAdded::class)
      expectState {
        items.assert().hasSize(1)
      }
    }
  }
})

Saga Test (SagaVerifier)

class CartSagaSpec : SagaSpec<CartSaga>({
  on {
    whenEvent(event = mockk<OrderCreated> {
      every { items } returns listOf(orderItem)
      every { fromCart } returns true
    }, ownerId = ownerId) {
      expectCommandType(RemoveCartItem::class)
    }
  }
})

Design

Modeling Patterns

Single ClassInheritanceAggregation
Single ClassInheritanceAggregation

Core Flows

Command And Event Flow

Event Sourcing

More Design Diagrams

Load Aggregate

Load Aggregate

Aggregate State Flow

Aggregate State Flow

Send Command

Send Command

Observability

Observability

Event Compensation

Compensation Dashboard

Compensation Details

Compensation Use Case

Compensation Sequence

Apply Retry Spec

Compensation Succeeded

Ecosystem

ProjectDescription
CosIdUniversal, flexible, high-performance distributed ID generator
CoSecMulti-tenant reactive security framework based on RBAC and policies
CoCacheDistributed consistent secondary cache framework
SimbaEasy-to-use, flexible distributed lock service
CoSkyHigh-performance, low-cost microservice governance platform
CoApiZero-boilerplate HTTP client auto-configuration for Spring 6
FluentAssertKotlin fluent assertion library for readable and expressive tests

Examples

ExampleLanguageDescription
Order ServiceKotlinAggregates, sagas, projections — full DDD demo
Bank TransferJavaSimple event sourcing demo

Community

License

Wow is released under the Apache 2.0 License.