Skip to content

Examples

Learn Calimero by exploring working examples. Each has source code, a README, and (mostly) merobox workflows you can run locally.

Small, focused implementations that each demonstrate one set of SDK patterns. Clone one, read its README, and adapt it — the authoritative detail lives in the source.

ExampleDemonstratesRepo
kv-storeCRDT UnorderedMap + LwwRegister, mutations vs views, events, app::Result — the canonical starting pointkv-store
kv-store-with-handlersEvent handlers that run on peer nodes (real-time, event-driven updates)kv-store-with-handlers
blobsContent-addressed file/blob storage + P2P distribution outside the CRDT stateblobs
collaborative-editorReplicatedGrowableArray (RGA) for conflict-free character-level textcollaborative-editor
private-dataNode-local private storage that never syncs to other nodesprivate-data
team-metricsNested CRDTs (map → map → counter); ships a derive(Mergeable) and a custom-merge variantmacro · custom
xcall-exampleCross-context calls (one context invoking another) with a ping/pong patternxcall-example
  • Battleships — a multiplayer game showing private per-player state and turn-based logic: calimero-network/battleships.
  • Starter template — scaffold a fresh app (Rust logic + frontend + workflows) with npx create-mero-app@latest my-app. See Developer Tools.

To discover apps already built on Calimero, browse the App Directory.

Most examples ship a merobox workflow, so the fastest path is:

Terminal window
cd core/apps/kv-store
merobox bootstrap run workflows/kv-store.yml

To run it manually: build the WASM (./build.sh), install it (meroctl app install --path res/kv_store.wasm — returns an application id), create a context (meroctl context create --application-id <APP_ID>), then call methods (meroctl call <METHOD> --context <CTX> --args '<JSON>'). See Getting Started for setup.