Skip to content

Nondominium built on REA + Valueflows + Holochain is a distributed multi-agent systems with reflexivity, learning, and local memory to support high-level adaptive stigmergic environments for the sharing economy

License

Notifications You must be signed in to change notification settings

Sensorica/nondominium

Repository files navigation

Nondominium

A ValueFlows-compliant resource sharing Holochain application implementing distributed, agent-centric resource management with embedded governance.

Overview

Nondominium is a 3-zome Holochain hApp that enables decentralized resource sharing through:

  • Agent identity management with role-based access control
  • Resource lifecycle tracking following ValueFlows standards
  • Embedded governance for access and transfer rules
  • Capability-based security using Holochain's native features

Architecture

Zome Structure:

  • zome_person: Agent profiles, roles, and capability-based access
  • zome_resource: Resource specifications and lifecycle management
  • zome_gouvernance: Commitments, economic events, and governance rules

Technology Stack:

  • Backend: Rust (Holochain HDK/HDI 0.5.x-0.6.x) compiled to WASM
  • Frontend: Svelte 5.0 + TypeScript + Vite 6.2.5
  • Testing: Vitest 3.1.3 + @holochain/tryorama 0.18.2
  • Client: @holochain/client 0.19.0

Environment Setup

PREREQUISITE: Set up the Holochain development environment.

Enter the nix shell by running this in the root folder of the repository:

nix develop              # Enter reproducible environment (REQUIRED)
bun install              # Install all dependencies

⚠️ Run all commands from within the nix shell, otherwise they won't work.

Development Workflow

Quick Start

bun run start           # Start 2-agent development network with UIs

This creates a network of 2 nodes with their respective UIs and the Holochain Playground for conductor introspection.

Custom Network

AGENTS=3 bun run network    # Bootstrap custom agent network (replace 3 with desired count)

Testing

bun run test                    # Run full test suite
npm run test:foundation         # Basic zome connectivity tests
npm run test:integration        # Multi-agent interaction tests
npm run test:scenarios          # Complete workflow simulations
npm run test:person             # Person management test suite
npm run test:debug              # Verbose test output

Build Pipeline

bun run build:zomes     # Compile Rust zomes to WASM
bun run build:happ      # Package DNA into .happ bundle
bun run package         # Create final .webhapp distribution

Individual Workspaces

bun run --filter ui start      # Frontend development server
bun run --filter tests test    # Backend test execution

Data Model

Core Principles

  • Agent-Centric: All data tied to individual agents with public/private separation
  • ValueFlows Compliance: EconomicResource, EconomicEvent, Commitment data structures
  • Privacy by Design: Public profiles with encrypted private data
  • Capability-Based Security: Role-based access using Holochain capability tokens

Entry Patterns

All zomes follow consistent patterns for:

  • create_[entry_type]: Creates entries with discovery anchor links
  • get_[entry_type]: Retrieves entries by hash
  • get_all_[entry_type]: Discovery via anchor traversal
  • update_[entry_type]: Updates with validation
  • delete_[entry_type]: Soft deletion marking

Testing Architecture

4-Layer Strategy:

  1. Foundation: Basic zome function calls and connectivity
  2. Integration: Cross-zome interactions and multi-agent scenarios
  3. Scenarios: Complete user journeys and workflows
  4. Performance: Load and stress testing (planned)

Test Configuration:

  • Timeout: 4 minutes for complex multi-agent scenarios
  • Concurrency: Single fork execution for DHT consistency
  • Agent Simulation: Supports 2+ distributed agents per test

Distribution

To package the web happ:

bun run package

This generates:

  • nondominium.webhapp in workdir/ (for Holochain Launcher installation)
  • nondominium.happ (subcomponent bundle)

Development Status

  • Phase 1: Person management with role-based access control
  • 🔄 Phase 2: Resource lifecycle and governance implementation

Documentation

Project Documentation

Zome Documentation

Technology Stack

About

Nondominium built on REA + Valueflows + Holochain is a distributed multi-agent systems with reflexivity, learning, and local memory to support high-level adaptive stigmergic environments for the sharing economy

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •