SkillAtlasSkill 详情

wow

Domain Model as a Service

审核状态:已审核Quality 80Security 80

复制安装命令

用 Codex 或 Claude 安装复制这段 Prompt,粘贴到 Codex、Claude 或其他助手里,让它先审查 Skill 页面再帮你安装。

复制前请先查看来源、License 和安全提示。

项目 README

来源文件:README.md

抓取于 2026年7月29日

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 supports Spring Boot 3.x, Java 17+

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.

其他

中风险

  • 来源需自行核对维护者身份。
  • 包含脚本或命令调用,安装前请复核。
  • 未检测到明显外部权限要求。
  • 未检测到高风险命令。
  • 扫描发现:1 条。

Codex — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/Ahoo-Wang/Wow.git
  3. 将 "skills/wow" 文件夹复制到 Codex 的 skills 目录中。
  4. 重启 Codex 让新的 skill 生效。

Codex — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Codex 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Codex 让新的 skill 生效。

Claude Code — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/Ahoo-Wang/Wow.git
  3. 将 "skills/wow" 文件夹复制到 Claude Code 的 skills 目录中。
  4. 重启 Claude Code 让新的 skill 生效。

Claude Code — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Claude Code 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Claude Code 让新的 skill 生效。

Cursor — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/Ahoo-Wang/Wow.git
  3. 将 "skills/wow" 文件夹复制到 Cursor 的 skills 目录中。
  4. 重启 Cursor 让新的 skill 生效。

Cursor — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Cursor 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Cursor 让新的 skill 生效。

GitHub Copilot — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/Ahoo-Wang/Wow.git
  3. 将 "skills/wow" 文件夹复制到 GitHub Copilot 的 skills 目录中。
  4. 重启 GitHub Copilot 让新的 skill 生效。

GitHub Copilot — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 GitHub Copilot 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 GitHub Copilot 让新的 skill 生效。

Windsurf — Git Clone 安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 克隆仓库:git clone https://github.com/Ahoo-Wang/Wow.git
  3. 将 "skills/wow" 文件夹复制到 Windsurf 的 skills 目录中。
  4. 重启 Windsurf 让新的 skill 生效。

Windsurf — 手动复制安装

  1. 安装前请先查看来源仓库和风险报告。
  2. 从源仓库下载 SKILL.md 及相关文件。
  3. 在 Windsurf 的 skills 目录中创建新文件夹。
  4. 将所有 skill 文件复制到新文件夹中。
  5. 重启 Windsurf 让新的 skill 生效。
查看 SKILL.md 原文
name: wow
description: |
  Wow framework assistant for building reactive DDD + Event Sourcing + CQRS microservices in Kotlin/Java on JVM 17+ with Spring Boot.

  Use this skill when a task involves Wow framework semantics:
  - DDD aggregates, command/event/state modeling, bounded contexts, tenant/owner routing
  - CQRS, Event Sourcing, event stores, snapshots, projections, read models
  - Saga orchestration, event processors, retry policy, PrepareKey
  - Command gateway, wait plans, command bus, WebFlux command endpoints
  - Wow tests: AggregateSpec, SagaSpec, AggregateVerifier, SagaVerifier
  - Wow annotations such as @AggregateRoot, @OnCommand, @OnSourcing, @OnEvent, @StatelessSaga, @ProjectionProcessor, @EventProcessor, @AfterCommand, @OnError, @Retry, @BoundedContext, @CreateAggregate, @CommandRoute

  Do not trigger for unrelated Kotlin, Gradle, frontend, or documentation tasks unless Wow framework behavior or APIs are directly relevant.
compatibility: Kotlin 2.3, JVM 17+, Spring Boot 4.x, Gradle, MongoDB, Kafka, Reactor

Wow Framework Skill

Use this as the router for Wow framework work. For end-to-end aggregate or saga development, route to ../wow-development-workflow/SKILL.md. For focused lookup, load the smallest reference file that matches the task, then verify exact APIs in the current checkout before editing code.

Source-First Rule

Before writing or changing Wow code, verify the current implementation with rg, rg --files, and nearby source files. Examples in this skill and its references are navigation aids, not a substitute for the target repository's APIs.

Useful first searches:

rg -n "@AggregateRoot|@OnCommand|@OnSourcing|@StatelessSaga|@ProjectionProcessor" . -g "*.kt"
rg -n "AggregateSpec<|SagaSpec<|aggregateVerifier|sagaVerifier" . -g "*.kt"
rg -n "@ConfigurationProperties|class .*Properties" wow-spring-boot-starter -g "*.kt"

Task Routing

User TaskLoad
Develop, complete, restructure, or enhance aggregate or saga behavior end-to-end../wow-development-workflow/SKILL.md
Model or change aggregate, command, event, state, bounded context, lifecyclereferences/modeling.md, then references/annotations.md
Add or update annotationsreferences/annotations.md
Write AggregateSpec, SagaSpec, verifier, lifecycle tests, FluentAssert assertionsreferences/testing.md
Build saga orchestration or cross-aggregate process behavior../wow-development-workflow/SKILL.md, then references/annotations.md and references/testing.md
Build projection or event processor behaviorreferences/annotations.md, then references/testing.md
Use command gateway, wait plan, wait chain, idempotency, HTTP wait headersreferences/command-gateway.md
Write Query DSL, pagination, projection, sort, query service callsreferences/dsl.md
Configure Spring Boot starter, storage, buses, feature switchesreferences/configuration.md
Implement uniqueness or reservation with PrepareKeyreferences/prepare-key.md
Review Wow code, PR diffs, framework semantics, or test coverage../wow-code-review/SKILL.md
Debug failing commands, events, sourcing, sagas, projections, waits, queries, config, or tests../wow-debugging/SKILL.md

Core Model

Wow applications normally separate command handling from state mutation:

Command -> Command Aggregate -> Event -> EventStore -> EventBus
                                      -> State Aggregate sourcing
                                      -> Projection / Saga / EventProcessor

Prefer the Aggregate Pattern: command aggregate handles commands and returns events; state aggregate mutates only through sourcing handlers. Avoid direct state mutation in command handlers.

Quality Gates

Before finishing Wow code changes, check:

  • Command handlers return domain events and do not mutate state directly.
  • Commands and domain events include @Summary and @Description metadata when they are part of the API/domain contract.
  • Important repeated domain fields are modeled with <FieldName>Capable interfaces where reuse improves clarity.
  • State changes happen through deterministic sourcing handlers.
  • Handlers returning polymorphic Any or multiple event types declare explicit return metadata when the current API requires it.
  • Saga logic has both trigger and no-command tests when conditions branch.
  • Aggregate behavior is tested with AggregateSpec; saga orchestration is tested with SagaSpec.
  • Projection and event processor side effects are outside aggregates.
  • Tests use me.ahoo.test.asserts.assert / .assert().
  • Gradle commands use resolved module names from settings.gradle.kts, not hard-coded api or domain placeholders.
  • Verification commands are reported exactly.

References

ReferenceWhen to Use
references/modeling.mdAggregate pattern, bounded context, lifecycle, routing, state rebuild
references/annotations.mdAnnotation parameters and handler conventions
references/testing.mdAggregateSpec, SagaSpec, verifier APIs, fork/ref, FluentAssert
references/command-gateway.mdWait plans, idempotency, LocalFirst, command rewriter, HTTP headers
references/dsl.mdQuery DSL operators, pagination, sort, projection, query execution
references/configuration.mdSpring Boot starter configuration and feature switches
references/prepare-key.mdPrepareKey uniqueness/reservation workflows

Skill Maintenance

Run the skill lint before finishing changes to this skill set:

python3 scripts/skill_lint.py

发现问题?提交给管理员复核

评分:

评论 (0)

暂无评论,成为第一个评论者吧!