VaakLoom
Platform & Hub

Unified Platform

VaakLoom Platform brings together the execution engine, multi-tenant Anvesh distributed audit persistence (with PostgreSQL, MongoDB, and In-Memory support), Hub APIs, RBAC authorization, and Prometheus metrics into a single unified distribution.

Architecture: What Talks to What

Browser Hub UI  ──► /hub/*      ──► Platform (RBAC + Anvesh / Multi-DB store)
curl /orders    ──► Workflows   ──► Platform Application (DAG Engine)
Prometheus      ──► GET /metrics──► Platform Metrics Collector

Running the Complete Platform

To run the platform server and visual Hub UI in local development:

# 1. Build workspace packages
pnpm --filter @vaakloom/engine build
pnpm --filter @vaakloom/platform build

# 2. Terminal 1: Start Platform with demo workflows & database
pnpm --filter @vaakloom/demo-ts start
# (Copy the generated Admin API key output in the console)

# 3. Terminal 2: Start Hub UI development server
VITE_API_KEY=<admin-key> pnpm --filter @vaakloom/hub dev

Platform API Authentication & RBAC

All administrative and control-plane endpoints under /hub/* require authentication via the x-api-key HTTP header:

curl -H "x-api-key: your-admin-key" http://localhost:8787/hub/apis

Platform Permissions Matrix

EndpointHTTP MethodRequired PermissionDescription
/hub/apisGETworkflow:readList all registered API endpoints & metadata
/hub/workflowsGET, POST, PUT, DELETEworkflow:create / edit / deleteDynamic workflow CRUD operations
/hub/workflows/validatePOSTworkflow:readStatically validate a DAG workflow JSON specification
/hub/tracesGETtelemetry:readQuery execution trace logs and step latencies
/hub/db/statusGETauthenticatedInspect active database provider (Anvesh, Postgres, Mongo, Memory) and cluster node ID
/hub/db/switchPOSTrbac:manageDynamically switch the runtime audit database provider across the cluster
/hub/tests/runPOSTworkflow:testExecute Snapline regression test runs
/hub/deploy/planPOSTworkflow:deployGenerate zero-downtime deployment diff and bundle
/hub/rbac/usersGET, POST, PUTrbac:manageManage users, roles, and API key tokens
/hub/metricsGETmetrics:readRetrieve Prometheus metrics summary

Securing Workflow Routes

By default, workflow routes (e.g. POST /orders) can be invoked publicly or behind your API gateway. To enforce authentication directly within VaakLoom Platform, pass protectInvoke: true:

const platform = new Platform({
  dbType: "anvesh", // Default distributed store; or 'postgres' | 'mongo' | 'memory'
  protectInvoke: true, // Requires 'api:invoke' permission on API keys
});