WB2 Platform Documentation

WB2 Platform is an intelligent brand acquisition and integration platform that combines AI-powered analysis with durable workflow orchestration to streamline the entire acquisition lifecycle.

AI-Powered

Intelligent risk assessment, success prediction, and recommendations

Workflow Orchestration

Temporal-based durable workflows with human-in-the-loop

Compliance Built-in

Automated compliance checks with configurable rules

Quick Start

Get started with WB2 Platform in minutes using Docker Compose.

Prerequisites

  • Docker and Docker Compose installed
  • Python 3.11+ (for local development)
  • Git

Installation

# Clone the repository git clone https://gitlab.com/dkmay1/wb2-platform.git cd wb2-platform # Start all services docker-compose up -d # Access the platform # - Web UI: http://localhost:5000 # - Temporal UI: http://localhost:8080 # - Grafana: http://localhost:3000
Note: The first startup may take a few minutes as Docker pulls all required images.

Architecture

WB2 Platform follows a microservices architecture with the following components:

Web UI
REST API
AI Services
Temporal Workers
Compliance Engine
PostgreSQL
Temporal Server
Prometheus

Key Components

Component Description Port
WB2 API Flask REST API serving all platform endpoints 5000
Temporal Server Durable workflow execution engine 7233
Temporal UI Web interface for workflow visibility 8080
PostgreSQL Primary data store for brands and analytics 5432
Grafana Metrics dashboards and alerting 3000

Brands API

Manage brand registry and track acquisition progress.

GET /api/v1/brands

List all brands with optional filtering

POST /api/v1/brands

Register a new brand for acquisition

GET /api/v1/brands/{brand_id}

Get details for a specific brand

POST /api/v1/brands/{brand_id}/workflow/{workflow_type}

Start a workflow for a brand

Example: Create a Brand

curl -X POST http://localhost:5000/api/v1/brands \ -H "Content-Type: application/json" \ -d '{ "brand_id": "acme-corp", "name": "ACME Corporation", "domain": "acme.com", "market_segment": "enterprise", "priority_level": "high" }'

AI API

Access AI-powered analysis and recommendations.

POST /api/v1/ai/prioritize

Calculate brand priority score using AI

POST /api/v1/ai/complexity

Assess integration complexity

POST /api/v1/ai/risk/assess

Run AI risk assessment with mitigations

POST /api/v1/ai/predict/success

Predict acquisition success probability

Example: Risk Assessment

curl -X POST http://localhost:5000/api/v1/ai/risk/assess \ -H "Content-Type: application/json" \ -d '{ "brand_id": "acme-corp", "annual_revenue": 5000000, "employee_count": 150, "tech_stack_compatibility": 0.75, "integration_complexity": 0.6 }'

Compliance API

Automated compliance checking and violation management.

GET /api/v1/compliance/rules

List all compliance rules

POST /api/v1/compliance/check

Run compliance check for a brand

GET /api/v1/compliance/violations

List open compliance violations

GET /api/v1/compliance/dashboard

Get compliance dashboard data

HITL API

Human-in-the-loop approval management.

GET /api/v1/hitl/approvals

List all approval requests

GET /api/v1/hitl/approvals/pending

List pending approval requests

POST /api/v1/hitl/approvals/{id}/approve

Approve a request

POST /api/v1/hitl/approvals/{id}/reject

Reject a request

Dashboard: Access the visual HITL dashboard at /dashboard/hitl

Integrity Check Workflow

Post-acquisition integrity checks for brands.

Checks Performed

  • Code quality analysis (SonarQube integration)
  • Security vulnerability scanning
  • License compliance verification
  • Documentation coverage analysis
  • AI-powered risk assessment

Workflow States

Running Checks → Generating Report → [If issues] → Awaiting Approval → Remediation → Complete

Team Onboarding Workflow

Orchestrates multi-team onboarding after brand acquisition.

Teams Supported

  • Engineering: GitLab access, CI/CD, dev environments
  • Operations: Infrastructure, monitoring, runbooks
  • Support: Helpdesk, knowledge base, escalation paths

Workflow Features

  • Parallel team setup activities
  • Individual access provisioning
  • Training session scheduling
  • Documentation handoff generation

Docker Setup

Production deployment using Docker Compose.

Services Included

docker-compose up -d # Services started: # - postgres-temporal (Temporal database) # - postgres-app (Application database) # - temporal (Temporal server) # - temporal-ui (Temporal web UI) # - wb2-api (Flask API) # - wb2-worker (Temporal worker) # - prometheus (Metrics) # - grafana (Dashboards)

Monitoring

Built-in monitoring with Prometheus and Grafana.

Available Dashboards

  • API Overview: Request rate, latency, error rate
  • Temporal Workflows: Completions, failures, latency
  • AI Processing: Prioritization rate, model confidence
  • Compliance: Check counts, violations, pass rate

Alert Rules

Pre-configured alerts for:

  • High API error rate (>5%)
  • High latency (P95 > 1s)
  • Workflow failures (>10%)
  • Critical compliance violations
  • Resource exhaustion