Files
dbis_core/SOLACENET_SETUP_GUIDE.md
2026-03-02 12:14:07 -08:00

3.0 KiB

SolaceNet Setup Guide

Complete setup instructions for the SolaceNet Capability Platform.

Prerequisites

  • Node.js 18+
  • PostgreSQL 14+
  • Redis 7+
  • Go 1.21+ (for gateway)
  • Docker & Docker Compose (optional)

Database Setup

  1. Run Prisma migrations:
cd dbis_core
npx prisma generate
npx prisma migrate dev --name add_solacenet_models
  1. Verify schema:
npx prisma studio

Environment Configuration

Create/update .env file:

# Database
DATABASE_URL=postgresql://user:password@localhost:5432/dbis

# Redis (for policy caching)
REDIS_URL=redis://localhost:6379
SOLACENET_REDIS_URL=redis://localhost:6379

# Kafka (for events)
KAFKA_BROKERS=localhost:9092
SOLACENET_KAFKA_BROKERS=localhost:9092

# Gateway
SOLACENET_GATEWAY_PORT=8080
POLICY_ENGINE_URL=http://localhost:3000
BACKEND_URL=http://localhost:3000
JWT_SECRET=your-secret-key

# API
PORT=3000
NODE_ENV=development

Start Services

docker-compose -f docker-compose.solacenet.yml up -d

Option 2: Manual Start

  1. Start Redis:
redis-server
  1. Start DBIS API:
cd dbis_core
npm install
npm run dev
  1. Start Go Gateway:
cd gateway/go
go mod tidy
go run main.go
  1. Start Operations Console:
cd frontend/solacenet-console
npm install
npm start

Seed Initial Data

Create a seed script to populate initial capabilities:

// scripts/seed-solacenet.ts
import { capabilityRegistryService } from './src/core/solacenet/registry/capability-registry.service';

async function seed() {
  // Register core capabilities
  await capabilityRegistryService.createCapability({
    capabilityId: 'payment-gateway',
    name: 'Payment Gateway',
    version: '1.0.0',
    description: 'Payment processing gateway',
    defaultState: 'disabled',
  });

  await capabilityRegistryService.createCapability({
    capabilityId: 'wallet-accounts',
    name: 'Wallet Accounts',
    version: '1.0.0',
    description: 'Stored value wallet accounts',
    defaultState: 'disabled',
  });

  // Add more capabilities...
}

seed();

Run with:

npx ts-node scripts/seed-solacenet.ts

Verify Installation

  1. Check API health:
curl http://localhost:3000/health
  1. List capabilities:
curl -H "Authorization: Bearer YOUR_TOKEN" \
  http://localhost:3000/api/v1/solacenet/capabilities
  1. Check gateway:
curl http://localhost:8080/health

Testing

Run tests:

npm test

Troubleshooting

Redis Connection Issues

  • Verify Redis is running: redis-cli ping
  • Check REDIS_URL in .env

Database Migration Errors

  • Ensure PostgreSQL is running
  • Check DATABASE_URL format
  • Run npx prisma migrate reset if needed

Gateway Not Starting

  • Verify Go 1.21+ is installed: go version
  • Run go mod tidy in gateway/go
  • Check port 8080 is available

Next Steps

  1. Configure entitlements for your tenants
  2. Set up policy rules
  3. Enable capabilities as needed
  4. Monitor audit logs