Technical Deep Dive

How aiBIZZ works under the hood: stack, legacy integration, KPI control.

Stack Overview

Backend

Cloudflare Workers (TypeScript), D1 (SQLite), Durable Objects (realtime), KV cache.

ML Service

FastAPI (Python), scikit‑learn, OR‑Tools for optimization, pytest.

Frontends

SvelteKit PWAs: CEO Touch and Desktop Analyst UI.

Legacy Integration (1C v7.7)

Read‑only integration with 1C SQL Server keeps operations safe. ETL extracts facts/dimensions, transforms to ML‑ready features.

No migration risk: 1C remains the system of record/backup; aiBIZZ drives decisions on top.

KPI Logic & Decision Flow

KPI = { revenueWeight, returnPenalty, coverageWeight, riskTolerance } score(item, shop) = gbm(features) - KPI.returnPenalty * return_prob optimizer picks top-N per shop under capacity/credit constraints

Current ML KPI Matrix (Example)

Live configuration used for Sovrano/SkyAgro deployments. Weights sum to 1.0 and drive the optimizer objective.

Targets & Weights

RevenueGrowth: 0.40 → signal: sales_volume * unit_margin ReturnReduction: 0.25 → signal: 1 - return_rate AssortmentCover: 0.20 → signal: category_presence_score InventoryTurnov: 0.15 → signal: sales_velocity / stock_level

Constraints

CreditLimit (hard) • Shops.CreditLimit BlockedShop (hard) • Shops.IsBlocked ShelfCapacity (soft) • Shops.Capacity SafeReturn (soft) • Items.ExpirationDate CategoryDiversity • min 25% ExpirationWindow • min 30 days
UI sliders (growth_aggressiveness, risk_tolerance, coverage_balance, turnover_focus) adjust these weights at runtime with guardrails.

Security & Operations