Skip to content

Latest commit

 

History

History
160 lines (120 loc) · 3.44 KB

installation.md

File metadata and controls

160 lines (120 loc) · 3.44 KB

Installation Guide

This guide provides detailed instructions for installing and setting up the Requests & Offers application.

System Requirements

  • Linux, macOS, or Windows with WSL2
  • Holochain Development Environment
  • Node.js 16 or later
  • pnpm 9.7.0 or later

Installation Steps

1. Development Environment Setup

Install Holochain

Follow the official Holochain installation guide for your operating system.

You can quickly install Holochain using this command:

bash <(curl https://holochain.github.io/holochain/setup.sh)

This will set up the complete Holochain development environment, including Nix and all necessary components.

2. Project Setup

Clone the Repository

git clone https://github.com/Happening-Community/requests-and-offers.git
cd requests-and-offers

Enter Nix Shell

nix develop

Install Dependencies

pnpm install

This will also download the hREA suite as part of the postinstall script.

3. Development Setup

The application consists of two main parts:

  1. Frontend (SvelteKit application)
  2. Backend (Holochain DNA with multiple zomes)

Start Development Environment

# Start with default configuration (2 agents)
pnpm start

# Start with custom number of agents
AGENTS=3 pnpm start

# Start with Tauri (desktop application)
pnpm start:tauri

This will:

  1. Clean the Holochain sandbox
  2. Build the hApp
  3. Start the UI server
  4. Launch the Holochain environment
  5. Start the Holochain Playground

4. Testing

Run All Tests

pnpm test

This runs:

  • Zome builds
  • Backend tests
  • Frontend tests
  • Status module tests

Component Tests

# Frontend tests only
pnpm test:ui

# Individual zome tests
pnpm test:misc           # Misc zome functionality
pnpm test:users          # Users Organizations zome
pnpm test:administration # Administration zome
pnpm test:organizations  # Organizations functionality
pnpm test:status        # Status module

5. Building

Development Builds

# Build Holochain zomes
pnpm build:zomes

# Build complete hApp (includes zome builds)
pnpm build:happ

Production Package

# Create production package (includes hApp and UI)
pnpm package

6. hREA Integration

The project integrates with hREA (Holochain Resource-Event-Agent). The hREA suite is automatically downloaded during installation, but you can manage it with:

# Re-download hREA suite
pnpm run download-hrea-suite

# Remove hREA suite
pnpm run clean:hrea-suite

Development Resources

Troubleshooting

Common Issues

  1. Port Conflicts The application automatically finds available ports for:

    • UI server
    • Bootstrap server
    • Signal server
  2. Build Issues

    # Clean and rebuild
    pnpm run build:zomes
    pnpm run build:happ
  3. hREA Integration Issues

    # Reinstall hREA suite
    pnpm run clean:hrea-suite
    pnpm run download-hrea-suite

Getting Help