Ravenraven

Installation

Set up Raven Protocol in your development environment.

Prerequisites

Make sure you have the following installed:

Node.jsv18+
JavaScript runtime
pnpmv8+
Package manager
Redisv7+
In-memory data store
DockervLatest
Optional, for containerized setup

Install Dependencies

Raven uses pnpm workspaces for monorepo management:

Installbash
pnpm install

Environment Configuration

Create your environment file from the template:

Environment Setupbash
cp .env.example .env

Configure the following environment variables:

.envbash
# API Server
PORT=3000
NODE_ENV=development

# Redis Configuration
REDIS_URL=redis://localhost:6379

# Encryption
ENCRYPTION_ENABLED=true
ENCRYPTION_KEY_STORAGE=memory  # Use 'env' or 'kms' in production

# Walrus Configuration (optional for development)
WALRUS_ENDPOINT=https://walrus-testnet.example.com
WALRUS_API_KEY=your_walrus_key

# Sui Configuration (optional for development)
SUI_NETWORK=testnet
SUI_PRIVATE_KEY=your_sui_private_key

Start Development Server

Start all services in development mode:

Start Developmentbash
# Start Redis (if not running)
redis-server

# Start all services
pnpm dev

This starts the following services:

ServiceURLDescription
API Serverhttp://localhost:3000REST API endpoints
Web Frontendhttp://localhost:3001Marketing & docs site
Ingest WorkerBackgroundMemory ingestion pipeline
Analyze WorkerBackgroundPattern extraction

Docker Setup (Alternative)

For a containerized setup:

Docker Composebash
# Start all services with Docker
docker-compose up -d

# View logs
docker-compose logs -f

Verify Installation

Check that everything is running correctly:

Health Checkbash
curl http://localhost:3000/health

Expected response:

Responsejson
{
  "status": "healthy",
  "version": "1.0.0",
  "services": {
    "redis": "connected",
    "api": "running"
  }
}

Project Structure

Directory Structuretext
raven/
├── apps/
│   ├── api/              # Express HTTP API
│   ├── web/              # Next.js frontend
│   ├── worker-ingest/    # Background ingestion
│   └── worker-analyze/   # Pattern extraction
├── packages/
│   ├── config/           # Environment configuration
│   ├── encryption/       # AES-256-GCM encryption
│   ├── logger/           # Logging utilities
│   ├── memory-core/      # Core memory services
│   ├── queue/            # BullMQ job queue
│   ├── sui-adapter/      # Sui blockchain integration
│   ├── tier2-storage/    # Redis storage
│   ├── types/            # TypeScript definitions
│   └── walrus-adapter/   # Walrus blob storage
└── docs/                 # Documentation

Available Commands

CommandDescription
pnpm devStart all services in dev mode
pnpm buildBuild all packages
pnpm typecheckRun TypeScript checks
pnpm lintLint codebase
pnpm formatFormat code with Prettier

Installation Complete!

Your development environment is ready. Continue with the quick start guide:

Quick Start Guide