Skip to main content

C4 Container Diagram: Helvia Platform Platform

Container Diagram

Container Descriptions

User-Facing

ContainerTechRole
hbf-webchatReactEmbeddable chat widget served to end users' browsers. Connects to hbf-bot via Azure DirectLine (Microsoft botframework-directline, bundled in botframework-webchat).
hbf-consoleReact SPA (JavaScript/JSX)Admin console for building agents, managing knowledge, handling live chat, viewing analytics
open-bot-frameworkNode.js (NestJS 11)Self-hosted DirectLine 3.0 gateway (planned, not yet in use). Intended to replace Azure's hosted DirectLine. Will receive activities from hbf-webchat, forward to hbf-bot over HTTP, and stream replies back via WebSocket. HTTP :1986, WebSocket :1992.

Core Services (Inner Layer)

ContainerTechRole
hbf-coreJava/Kotlin (Spring Boot 3.3)Central API: manages organizations, users, agents, deployments, NLU pipelines, permissions. All other services depend on it.
hbf-core-apiTypeScriptShared API client library and TypeScript types for communicating with hbf-core
hbf-botNode.jsBot execution engine: processes inbound messages through agent workflows, calls NLU, executes actions

AI / NLP Layer

ContainerTechRole
hbf-nlpNode.jsNLP service: intent classification, entity extraction, LLM orchestration for generation
helvia-rag-pipelinesPython/FastAPIRAG pipeline service: document ingestion, chunking, embedding, vector search via Milvus (primary) and Qdrant (secondary); Redis for SemCache
semantic-doc-segmenterPython/FastAPIDocument segmentation service: converts uploaded files (PDF, DOCX, PPTX, HTML, TXT, MD) to semantically segmented, LLM-tagged, language-detected chunks. Job-based async processing with callback notifications

Live Chat / Sessions

ContainerTechRole
hbf-lcgNode.js (NestJS)Live Chat Gateway: unified gateway bridging hbf-bot to external livechat providers (Helvia/hbf-lcm, Cisco WebEx, Genesys Cloud, Zendesk). Bidirectional event transformation, distributed cluster coordination via Redis. HTTP :1337.
hbf-lcmNode.jsLive Chat Manager: routes conversations to human agents, manages business hours, callbacks
hbf-session-managerNode.jsManages conversation sessions: state tracking, context persistence

Messaging / Communication

ContainerTechRole
hbf-broadcastNode.js/Restify daemon (scan loop)Scheduled mass messaging campaigns to subscribers
hbf-event-publisherNode.jsPower Automate connectors + Firebase FCM push notifications
hbf-notificationsNode.js/SSESends email, push, and in-app notifications; uses MySQL; real-time delivery via SSE
hbf-client-integrationsNode.jsClient-specific integration hub: 13 enterprise distributor modules (Dynamics 365, Zendesk, Genesys, Infobip, SITA AMS SOAP, Wheelsys SOAP)

Analytics / Scheduling

ContainerTechRole
hbf-statsNode.js daemon (infinite loop)Aggregates session data and writes stats back to hbf-core via hbf-core-api
hbf-reportsNode.jsGenerates scheduled and on-demand analytics reports
hbf-schedulerNode.js (NestJS 10)Scheduled flow execution: polls MySQL for due schedules via Bull/Redis queues (30s interval), triggers bot flows via hbf-bot, records execution history, sends failure alerts via hbf-notifications. Port 4223.

Data Management

ContainerTechRole
hbf-media-managerNode.jsFile upload, storage, and retrieval for media assets
hbf-data-retentionNode.js daemon (while(true) polling loop)GDPR-compliant data cleanup and retention policy enforcement; supports S3 and MinIO storage backends
hbf-data-managerNode.js (NestJS 11)Interaction metadata store: consumes interaction-metadata Kafka topic published by hbf-bot, persists records to MySQL, exposes read API (HBFGuard) and internal delete API (DMJwtGuard)
hbf-knowledge-managerNode.js (NestJS 11)Syncs Azure Blob Storage into HBF Knowledge Bases. Receives Azure Event Grid webhook events (BlobCreated/BlobDeleted), downloads blobs directly via SAS token, and calls hbf-core to convert files to KB articles or delete KB groups. Also exposes a guarded full-sync endpoint. No local database.

Testing

ContainerTechRole
automated-bot-tester-servicePython (FastAPI)Automated bot stress-testing service (AutoBoTS): generates LLM-powered synthetic users that converse with deployed Helvia bots via the Bot Events API, then evaluates each conversation against user-defined criteria. Supports adversarial/red-team testing via Cialdini persuasion techniques. All state in Redis with TTL auto-expiry. Port 4224.

Developer Tooling

ContainerTechRole
hbf-developer-docsDocusaurus v3, React, D3Engineering docs site: aggregates docs from all service repos into a searchable site with a service topology graph. Port 3333.
hbf-release-frameworkBash, GitHub ActionsCentral release orchestration repo: workflow_dispatch workflows (merge, backport, release notes), CLI scripts (detect-changes, setup-semantic-release, onboard-service), per-repo config templates, and services.json registry listing all 25 in-scope repos.

Data Stores

StorePurpose
MongoDBPrimary database for agents, organizations, users, sessions, bot content
RedisMessage queue, session cache, pub/sub, SemCache for RAG pipelines, hbf-lcg cluster coordination, automated-bot-tester-service test/profile state, hbf-scheduler Bull job queues
ElasticsearchSearch index; used by hbf-broadcast for email campaign analytics
MilvusPrimary vector database for RAG document embeddings (helvia-rag-pipelines)
QdrantSecondary vector database for RAG document embeddings (helvia-rag-pipelines)
PostgreSQLRelational data; used by open-bot-framework (bot registry, webchat channels) (planned, not yet in use)
MySQLRelational data; used by hbf-lcg, hbf-lcm, hbf-session-manager, hbf-notifications, hbf-media-manager, hbf-reports, semantic-doc-segmenter, hbf-data-manager, hbf-scheduler

Message Flow (Simplified)

Current path (Azure DirectLine):
Subscriber
-> hbf-webchat (browser widget, botframework-webchat)
-> Azure DirectLine service
-> hbf-bot (workflow execution)
-> hbf-core (agent config, NLU pipelines)
-> hbf-nlp (intent/entity/LLM)
-> helvia-rag-pipelines (knowledge retrieval)
-> hbf-lcg (if live chat handover) -> hbf-lcm
<- bot reply via Azure DirectLine
<- WebSocket stream to widget
<- displayed to user

Planned path (OBF, not yet in use):
Subscriber
-> hbf-webchat
-> open-bot-framework (self-hosted DirectLine gateway)
-> hbf-bot (HTTP activity POST)
<- bot reply POSTed back to OBF
<- WebSocket stream to widget
<- displayed to user