Getting Started
Installation
Set up the Deterministic Execution Engine in your environment.
Prerequisites
- Node.js 20+ or Bun 1.0+
- PostgreSQL 15+ (for execution log persistence)
- Redis 7+ (for scheduler state and distributed locking)
Install
npm install @dee/engine @dee/channels-email @dee/channels-voiceEnvironment Configuration
Create a .env file:
# Database - stores execution plans, logs, and contact state
DATABASE_URL=postgresql://user:pass@localhost:5432/dee
# Redis - scheduler state, distributed locks, event bus
REDIS_URL=redis://localhost:6379
# Email channel
SMTP_HOST=smtp.example.com
SMTP_PORT=587
SMTP_USER=outbound@example.com
SMTP_PASS=your-smtp-password
# Voice channel
VOIP_PROVIDER=twilio
TWILIO_ACCOUNT_SID=your-account-sid
TWILIO_AUTH_TOKEN=your-auth-token
TWILIO_FROM_NUMBER=+15551234567
# Engine settings
DEE_LOG_LEVEL=info
DEE_SCHEDULER_TICK_MS=1000
DEE_MAX_CONCURRENT_EXECUTIONS=100Database Setup
Run migrations to create the required tables:
npx dee migrateThis creates:
execution_plans— Plan definitions (steps, transitions, conditions)execution_runs— Active and completed run instancesexecution_logs— Append-only log of every state transitioncontacts— Contact records and channel-specific metadatachannel_events— Delivery receipts, open tracking, call outcomes
Verify
npx dee health
# ✓ Database connected
# ✓ Redis connected
# ✓ SMTP reachable
# ✓ VoIP provider authenticated
# ✓ Engine ready