Examples
Learn Calimero by exploring working examples. Each has source code, a README, and (mostly) merobox workflows you can run locally.
Reference apps (core/apps)
Section titled “Reference apps (core/apps)”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.
| Example | Demonstrates | Repo |
|---|---|---|
| kv-store | CRDT UnorderedMap + LwwRegister, mutations vs views, events, app::Result — the canonical starting point | kv-store |
| kv-store-with-handlers | Event handlers that run on peer nodes (real-time, event-driven updates) | kv-store-with-handlers |
| blobs | Content-addressed file/blob storage + P2P distribution outside the CRDT state | blobs |
| collaborative-editor | ReplicatedGrowableArray (RGA) for conflict-free character-level text | collaborative-editor |
| private-data | Node-local private storage that never syncs to other nodes | private-data |
| team-metrics | Nested CRDTs (map → map → counter); ships a derive(Mergeable) and a custom-merge variant | macro · custom |
| xcall-example | Cross-context calls (one context invoking another) with a ping/pong pattern | xcall-example |
Full applications
Section titled “Full applications”- 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.
Running an example
Section titled “Running an example”Most examples ship a merobox workflow, so the fastest path is:
cd core/apps/kv-storemerobox bootstrap run workflows/kv-store.ymlTo 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.
Related
Section titled “Related”- Service SDKs — the app model and CRDT reference
- Applications — application architecture
- Core Build docs — the full Rust SDK reference