Skip to content

Introduction to Calimero

Calimero is a peer-to-peer framework for building self-sovereign, local-first applications with automatic, conflict-free synchronization. It enables developers to create distributed apps where users own their data, operate offline, and sync with peers when connectivity is available—without relying on centralized servers.

At the application layer, Calimero provides a shared environment for collaboration, computation, and coordination between peers. Instead of relying on global consensus like blockchains do, it achieves distributed consistency through CRDTs (Conflict-free Replicated Data Types)—allowing independent nodes to converge on the same state without coordination, leaders, or ordering guarantees.

FeatureWhat it means
CRDT-based SyncAutomatic conflict resolution without coordination
Offline-firstWorks without connectivity, syncs when online
Event-drivenReal-time notifications across nodes
WASM RuntimeWrite apps in Rust or TypeScript, run in sandboxed environment
Multi-chainIntegrates with NEAR, ICP, Ethereum, Stellar
  1. Data Ownership - Your data on your devices, you control access
  2. Privacy by Default - End-to-end encryption
  3. Distributed by Design - P2P architecture, no single point of failure
  4. Developer-Friendly - Simple API with powerful CRDT primitives

Calimero combines several powerful technologies to deliver a unique distributed computing platform:

  • Automatic conflict resolution via CRDTs — no manual merge code needed. Write natural code with nested data structures; the storage layer handles synchronization automatically.
  • Causal ordering via DAG — handles out-of-order network delivery gracefully. Deltas can arrive in any order; the system buffers and applies them in correct causal sequence.
  • Dual sync strategy — fast broadcast (~100-200ms) + reliable catch-up. Gossipsub provides real-time propagation, while periodic P2P sync ensures eventual consistency even after network issues.
  • Event-driven architecture — real-time updates without polling. Applications emit events that automatically propagate to all peers and trigger handlers.
  • Local-first — data owned by users, no central authority required. Your data lives on your devices; you control access and sharing.

Calimero enables a wide range of decentralized applications:

Use CaseWhy Calimero?
Collaborative EditingReal-time document collaboration without servers. Multiple users edit simultaneously; conflicts resolve automatically via CRDTs.
Decentralized SocialUser-controlled social networks. Each user runs their own node; data ownership and privacy by default.
P2P GamingMultiplayer games with automatic state sync. Game state synchronizes across players even with network interruptions.
IoT NetworksDecentralized device coordination. Devices coordinate without central servers; works offline and syncs when online.
Supply ChainTransparent, multi-party tracking. All participants maintain their own copy; automatic conflict resolution handles concurrent updates.
HealthcarePrivate, patient-controlled medical records. Patients own their data; selective sharing with healthcare providers via encrypted contexts.

See Example Applications for working implementations.

  • Latency: 100-200ms delta propagation (Gossipsub)
  • Throughput: 100-1000 deltas/sec per context
  • Memory: ~10MB per context (1000 deltas)
  • Scalability: Horizontal (more contexts = more throughput)
If you are…Start here
Building appsGetting Startedcore/crates/sdk/README.md
Running nodesRun a Local Networkcore/crates/node/README.md
Understanding syncArchitecture Overviewcore/crates/dag/README.md
Debugging issuesMonitor & Debugcore/crates/node/readme/troubleshooting.md

Calimero’s architecture consists of four main layers:

  • WASM apps using the Calimero SDK
  • CRDT collections: UnorderedMap, Vector, Counter, LwwRegister
  • Event emission for real-time updates

Documentation: Applicationscore/crates/sdk/README.md

  • Orchestrates synchronization and execution
  • Dual sync paths: Gossipsub (~100-200ms) + Periodic P2P (every 10-30s)
  • Event handler execution across the network
  • Blob distribution for file sharing

Documentation: Nodescore/crates/node/README.md

  • CRDT storage with automatic merging
  • DAG (Directed Acyclic Graph) for causal ordering
  • Handles out-of-order delivery with dependency resolution
  • Merkle trees for efficient state comparison

Documentation: Architecture Overviewcore/crates/storage/README.md

  • libp2p-based P2P (Gossipsub, reliable streams, DHT discovery)
  • JSON-RPC server for client interaction
  • WebSocket/SSE for real-time subscriptions
  • Authentication and authorization

Documentation: Referencecore/crates/network/README.md

  1. Client calls WASM method via JSON-RPC
  2. WASM executes, generates CRDT actions (inserts, increments, etc.)
  3. Actions committed as DAG delta with causal parents
  4. Delta broadcast via Gossipsub to all peers (~100-200ms)
  5. Peers receive delta, check if parents are ready
  6. If ready: apply immediately and execute event handlers
  7. If not ready: buffer until parents arrive (DAG handles this automatically)
  8. Periodic P2P sync ensures eventual consistency

For detailed flow diagrams, see Architecture Overview.

The Calimero Core repository (calimero-network/core) contains the runtime and all supporting infrastructure:

core/
├── crates/ # Core Rust libraries (30+ crates)
│ ├── sdk/ # Application SDK - macros, CRDT collections, event emission
│ ├── runtime/ # WASM execution engine (Wasmer), sandboxing, resource limits
│ ├── storage/ # CRDT storage layer - collections with merge semantics
│ ├── dag/ # DAG logic (pure) - causal delta tracking, dependency resolution
│ ├── node/ # Node runtime - orchestrates sync, events, blob sharing
│ ├── network/ # P2P networking - libp2p integration (Gossipsub, streams, DHT)
│ ├── server/ # JSON-RPC server - API, WebSocket/SSE subscriptions, admin endpoints
│ ├── auth/ # Authentication - identity management, JWT tokens
│ ├── store/ # Persistent storage backend (RocksDB)
│ ├── context/ # Context lifecycle management (application instances)
│ ├── merod/ # Node binary (coordinator or peer)
│ └── meroctl/ # CLI tool - node operations, app installation, method calls
├── apps/ # Example applications
│ ├── kv-store/ # Simple key-value store
│ ├── blobs/ # Blob sharing example
│ └── ... # More examples
├── contracts/ # Cross-chain smart contracts
│ ├── near/ # NEAR Protocol contracts
│ ├── icp/ # Internet Computer Protocol canisters
│ ├── ethereum/ # Solidity contracts
│ └── stellar/ # Stellar contracts
└── e2e-tests/ # End-to-end test suite

For detailed component explanations, see Architecture Overview.


Built by the Calimero Network team

For questions, reach out on Discord, GitHub Issues, or email support@calimero.network.