Domain Model as a Service
Modern Reactive CQRS Architecture Microservice Development Framework
Based on DDD & Event Sourcing
Domain-Driven · Event-Driven · Test-Driven · Declarative Design · Reactive · CQRS · Event Sourcing
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 supports Spring Boot 3.x, Java 17+
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
PROJECTEDsignal 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
| Feature | Description |
|---|---|
| Domain Model as a Service | Just write the domain model, Wow auto-generates OpenAPI interfaces — no controller boilerplate needed |
| Test Suite | Given→When→Expect pattern (AggregateSpec / SagaSpec), 80%+ coverage made easy |
| High Performance | AppendOnly writes to event store, query-oriented search engines for reads — 59k+ TPS in stress tests |
| Horizontal Scalability | No sharding rules needed, business code unchanged when scaling out |
| Distributed Transactions | Saga orchestration pattern for carefully managed multi-service transactions |
| Event Compensation | Visual dashboard + automatic retry with configurable RetrySpec for eventual consistency |
| Read-Write Separation | SENT / PROCESSED / PROJECTED wait strategies eliminate sync-delay guesswork |
| Observability | End-to-end OpenTelemetry integration for tracing, metrics, and debugging |
| Reactive | Non-blocking async messaging with Project Reactor throughout the entire stack |
| Event Sourcing | Full state history via event replay, enabling powerful audit and time-travel debugging |
| Business Intelligence | Rich event-sourced data with real-time sync to data warehouses, minimal ETL cost |
Stress test of the example application (2 min):
| Operation | Wait Strategy | Avg TPS | Peak TPS | Avg Latency |
|---|---|---|---|---|
| Add To Cart | SENT |
59,625 | 82,312 | 29 ms |
| Add To Cart | PROCESSED |
18,696 | 24,141 | 239 ms |
| Create Order | SENT |
47,838 | 86,200 | 217 ms |
| Create Order | PROCESSED |
18,230 | 25,506 | 268 ms |
Given → When → Expect
class CartSpec : AggregateSpec<Cart, CartState>({
on {
whenCommand(AddCartItem(productId = "productId", quantity = 1)) {
expectNoError()
expectEventType(CartItemAdded::class)
expectState {
items.assert().hasSize(1)
}
}
}
})class CartSagaSpec : SagaSpec<CartSaga>({
on {
whenEvent(event = mockk<OrderCreated> {
every { items } returns listOf(orderItem)
every { fromCart } returns true
}, ownerId = ownerId) {
expectCommandType(RemoveCartItem::class)
}
}
})| Single Class | Inheritance | Aggregation |
|---|---|---|
| Project | Description |
|---|---|
| CosId | Universal, flexible, high-performance distributed ID generator |
| CoSec | Multi-tenant reactive security framework based on RBAC and policies |
| CoCache | Distributed consistent secondary cache framework |
| Simba | Easy-to-use, flexible distributed lock service |
| CoSky | High-performance, low-cost microservice governance platform |
| CoApi | Zero-boilerplate HTTP client auto-configuration for Spring 6 |
| FluentAssert | Kotlin fluent assertion library for readable and expressive tests |
| Example | Language | Description |
|---|---|---|
| Order Service | Kotlin | Aggregates, sagas, projections — full DDD demo |
| Bank Transfer | Java | Simple event sourcing demo |
Wow is released under the Apache 2.0 License.