Installation
Set up Raven Protocol in your development environment.
Prerequisites
Make sure you have the following installed:
Node.jsv18+
JavaScript runtimepnpmv8+
Package managerRedisv7+
In-memory data storeDockervLatest
Optional, for containerized setupInstall Dependencies
Raven uses pnpm workspaces for monorepo management:
Installbash
pnpm installEnvironment Configuration
Create your environment file from the template:
Environment Setupbash
cp .env.example .envConfigure 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_keyStart Development Server
Start all services in development mode:
Start Developmentbash
# Start Redis (if not running)
redis-server
# Start all services
pnpm devThis starts the following services:
| Service | URL | Description |
|---|---|---|
| API Server | http://localhost:3000 | REST API endpoints |
| Web Frontend | http://localhost:3001 | Marketing & docs site |
| Ingest Worker | Background | Memory ingestion pipeline |
| Analyze Worker | Background | Pattern extraction |
Docker Setup (Alternative)
For a containerized setup:
Docker Composebash
# Start all services with Docker
docker-compose up -d
# View logs
docker-compose logs -fVerify Installation
Check that everything is running correctly:
Health Checkbash
curl http://localhost:3000/healthExpected 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/ # DocumentationAvailable Commands
| Command | Description |
|---|---|
pnpm dev | Start all services in dev mode |
pnpm build | Build all packages |
pnpm typecheck | Run TypeScript checks |
pnpm lint | Lint codebase |
pnpm format | Format code with Prettier |
Installation Complete!
Your development environment is ready. Continue with the quick start guide:
→Quick Start Guide