Petshop
Pelican · Surefold core · Proofload · Kimney
A pet shop with every moving part a real service has: an HTTP API with OpenAPI docs, an actor that owns the state, a Postgres outbox relayed in-process or over Kafka with Avro, and a SolidJS front end traced from a click to the database.
- The whole service wired as one checked graph
- Tests that run all of it in-process, as Given/When/Then stories
- A load test at 200 requests a second against the real graph
actor<Shop, Outbox, ShopWindow>("shop") { outbox, window ->
shop(outbox, window, outbox.shelf(opening).associateBy { it.id })
} +
closingOf { ref: ActorRef<Shop>, registry: ChipRegistry,
window: ShopWindow, streams: StreamBackend ->
Adoption(ref, registry, window, streams)
} +
single { window: ShopWindow, adoption: Adoption, tracer: Tracer ->
ObservedShop(ShopFront(window, adoption), tracer)
}.boundTo<PetShop>()
./gradlew :app:run # API docs at /api-docs
./gradlew test # each test starts its own Postgres and Kafka
./gradlew loadTest # 200 requests a second