Skip to content

owenservera/vivim-sdk

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

17 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

@vivim/sdk

Open-Source E2E Self-Contained Toolkit for Decentralized Applications

License: MIT Bun Native Version GitHub Repo


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.

✨ Key Features

  • 🌐 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.

πŸ— Architecture Overview

The SDK is organized into modular layers that work together to provide a seamless decentralized experience:

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚   CORE SDK      β”‚  (Orchestration & Events)
β””β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”˜
         β”‚
 β”Œβ”€β”€β”€β”€β”€β”€β”€β”Όβ”€β”€β”€β”€β”€β”€β”€β”
 β–Ό       β–Ό       β–Ό
β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β” β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚NETWORK β”‚ β”‚STORAGE β”‚ β”‚IDENTITYβ”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β””β”€β”€β”€β”€β”€β”€β”€β”€β”˜

πŸ“Š System Architecture

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
Loading

For detailed diagrams, see ARCHITECTURE_VISUALIZATION.md.

For a deep dive into the architecture, check out VIVIM_SDK_DOCUMENTATION.md.

πŸš€ Getting Started

Installation

Install via Bun (recommended):

bun add @vivim/sdk

Quick Usage

import { 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}`);
});

⚑ Bun-Native Optimization

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.

πŸ“– Documentation

Detailed documentation is available in the /docs directory:

πŸ’‘ Examples

Check out the /examples directory for runnable examples:

  • Basic Node: Minimal setup to get a node running.

🀝 Contributing

Contributions are welcome! Please see our Contributing Guide for more information.

πŸ“„ License

This project is licensed under the MIT License - see the LICENSE file for details.


Built with ❀️ by the VIVIM Community

About

VIVIM SDK - Open-Source E2E Toolkit for Decentralized AI Applications

Topics

Resources

License

Code of conduct

Contributing

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors