Open-Source E2E Self-Contained Toolkit for Decentralized Applications
The VIVIM SDK is a powerful, Bun-native toolkit designed for building decentralized, AI-driven, and local-first applications. It provides the essential building blocks for P2P networking, distributed storage, identity management, and autonomous agent loops.
- π P2P Mesh Networking: Built-in support for WebRTC, GossipSub, and peer discovery via
@vivim/network-engine. - π¦ Decentralized Storage: Local-first data model using CRDTs for collision-free synchronization.
- π Identity Management: Self-sovereign identity (SSI) and DID-based authentication.
- π€ AI Integration: Native support for decentralized AI agent loops and memory systems.
- β‘ Bun Optimized: Leverages Bun's high-performance runtime for maximum execution speed.
- π Extensible Architecture: Modular node-based design allowing you to extend and compose functionality.
The SDK is organized into modular layers that work together to provide a seamless decentralized experience:
βββββββββββββββββββ
β CORE SDK β (Orchestration & Events)
ββββββββββ¬βββββββββ
β
βββββββββΌββββββββ
βΌ βΌ βΌ
ββββββββββ ββββββββββ ββββββββββ
βNETWORK β βSTORAGE β βIDENTITYβ
ββββββββββ ββββββββββ ββββββββββ
graph TD
subgraph "Applications Layer"
ACU[ACU Processor]
Feed[OmniFeed]
Social[Circle Engine]
end
subgraph "SDK Core Layer"
SDK[VivimSDK Core]
RK[RecordKeeper]
AP[Anchor Protocol]
SD[Self-Design Module]
end
subgraph "Infrastructure Layer"
Network[P2P Network Engine]
Storage[L0 Storage / SQLite]
Blockchain[Chain of Trust]
end
ACU --> SDK
Feed --> SDK
Social --> SDK
SDK --> RK
SDK --> AP
SDK --> SD
RK --> Blockchain
AP --> Blockchain
For detailed diagrams, see ARCHITECTURE_VISUALIZATION.md.
For a deep dive into the architecture, check out VIVIM_SDK_DOCUMENTATION.md.
Install via Bun (recommended):
bun add @vivim/sdkimport { VivimSDK } from '@vivim/sdk';
// Initialize the decentralized core
const sdk = new VivimSDK({
identity: {
did: 'my-node-' + Math.random().toString(36).slice(2, 9),
},
storage: {
encryption: true
},
nodes: {
autoLoad: true
}
});
await sdk.initialize();
// Connect to the P2P Graph
sdk.on('network:connected', (peerId) => {
console.log(`Connected to new network peer: ${peerId}`);
});The VIVIM SDK includes a dedicated layer for the Bun runtime, providing ultra-fast SQLite storage and native networking.
import { BunVivimServer, BunSQLiteStore } from '@vivim/sdk/bun';
const store = new BunSQLiteStore({ dbPath: './vivim.db' });
const server = new BunVivimServer({ port: 8080, sdk });
await server.start();See BUN_INTEGRATION.md for more details.
Detailed documentation is available in the /docs directory:
- Autonomous Workers
- Core Primitive Node Design
- Social Transport Layer
- Feature Decomposition
- Development Roadmap
Check out the /examples directory for runnable examples:
- Basic Node: Minimal setup to get a node running.
Contributions are welcome! Please see our Contributing Guide for more information.
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ by the VIVIM Community