Sample applications for Flower JVM.
This repository exists to show how the Flower workflow runtime and Bloom event bus are used in small, runnable Java/Spring Boot applications. The samples are not a benchmark suite or a production template generator. They are working examples meant to make the runtime concepts concrete.
Each sample lives in its own Gradle subproject. Most samples are Spring Boot
apps; flower-basic-samples is a plain Java module that keeps the focus on
Flower runtime primitives. The root only manages shared versions, repositories,
the Java toolchain, and the test runner. There is one Gradle wrapper at the
root shared across all samples.
flower-sample/
README.md (this file)
settings.gradle.kts
build.gradle.kts common config for every sample
gradle/, gradlew, gradlew.bat
cafe-order/ Flower entry-point sample (implemented)
logistics-control/ automated warehouse Zone sample (implemented)
game-turn-battle/ turn-based battle sample (implemented)
durable-order/ durable checkpoint/recovery sample (implemented)
flower-basic-samples/ small Flower runtime samples (implemented)
- Flower runtime: https://github.com/flowerjvm/flower
- Bloom event bus: https://github.com/flowerjvm/bloom
- AI Harness: https://github.com/flowerjvm/flower-ai-harness
- Samples: https://github.com/flowerjvm/flower-sample
| Module | Status | What it shows |
|---|---|---|
cafe-order |
implemented | Spring Boot wiring, Worker submit, Step composition, Bloom request/reply |
logistics-control |
implemented | self-driving warehouse Zones, shared robot capacity, queue back pressure |
game-turn-battle |
implemented | goTo turn loop, signal-only Bloom callbacks, persistent game state + web UI |
durable-order |
implemented | durable checkpoint/recovery beside a transient flow, SQLite state, web UI |
flower-basic-samples |
implemented | plain Java Engine/Worker/Flow/Step samples with console traces |
See SAMPLE_PROJECT_PLAN.md for the design notes behind this layout.
Flower and Bloom are not published to Maven Central yet. Install local snapshots before building the samples:
cd ../bloom && mvn install
cd ../flower && mvn installFrom the flower-sample root:
./gradlew :cafe-order:bootRun # port 8080
./gradlew :logistics-control:bootRun # port 8081
./gradlew :game-turn-battle:bootRun # port 8082
./gradlew :durable-order:bootRun # port 8083The Spring Boot app samples expose their own static/index.html and curl
examples in their own README files.
Run a basic console sample:
./gradlew :flower-basic-samples:runDoneFlowSample
./gradlew :flower-basic-samples:runStayFlowSample
./gradlew :flower-basic-samples:runGoToFlowSample
./gradlew :flower-basic-samples:runEventFlowSample
./gradlew :flower-basic-samples:runRepeatFlowSample
./gradlew :flower-basic-samples:runFinishFlowSample
./gradlew :flower-basic-samples:runFailFlowSample
./gradlew :flower-basic-samples:runGuardFlowSample./gradlew :cafe-order:testOr run every sample's tests:
./gradlew test- Create a subproject folder (e.g.
my-sample/) with abuild.gradle.ktsthat appliesorg.springframework.bootandio.spring.dependency-management. - Add
include("my-sample")tosettings.gradle.kts. - Add a
README.mdand astatic/index.htmlin the new module. - Each sample is a standalone app - do not share domain code across samples. Slight repetition is intentional; the goal is learnability, not reuse.
Apache License 2.0.