ONEWEB6.0Docs

Part 3 — Architecture

7 min readDocumentation
Audiencedevelopers, operators, admins.
Sources this page was written from

CLAUDE.md, ONEWEB6-BLUEPRINT.md (D1–D8), workbench/GENERATOR.md, workbench/APP-SHELL.md, INTEGRATION-HUB-ROADMAP.md, kernel-poc/MULTI-TENANCY.md, platform-dev/docker-compose.6.0.yml.

3.1 System map#

flowchart TB subgraph clients["Who talks to the Kernel"] direction LR B["Workbench<br/>(browser, shell :3000)"] A["Veda, scripts and<br/>MCP clients"] end subgraph kernel["Kernel (127.0.0.1)"] direction TB F["Facade: sign-in, permissions,<br/>argument validation"] S[("Event store<br/>Postgres :5437")] M["MCP stdio server<br/>(mcp-server.js)"] F --> S M --> S end subgraph outputs["What the Kernel produces"] direction LR G["App generators<br/>(gen-*.js)"] --> APP["generated/APP<br/>Next.js app, DDL, APIs"] H["Hub generator<br/>(gen-camel.js)"] --> W["Camel / Quarkus<br/>Hub worker"] D["Deployment Center<br/>+ deployer"] --> T["Targets: local,<br/>Kubernetes, OpenShift"] end B -- "typed tool calls" --> F A -- "MCP over HTTP or Veda routes" --> F A -- "MCP over stdio" --> M S --> G S --> H S --> D KC[("Keycloak :8095<br/>identity")] -. "sign-in" .-> F
ONEWEB 6.0 at a glance: everything you design passes through the Kernel

The full picture, layer by layer. Everything a builder designs is stored as events in the Kernel; generators turn the stored design into running software, and the platform services underneath provide identity, secrets, data, messaging and run history.

ONEWEB 6.0 system architecture People and agents Builder (browser) Veda, scripts, MCP clients Workbench Shell :3000 Designers and consoles Kernel (127.0.0.1) Facade :4600sign-in, permissions, HTTP + MCP MCP stdio serversame store, own gate Event storePostgres 6.0 :5437 Deployerstarted by the facade Generators App generators generated/APPNext.js app, DDL, APIs Hub generator Camel routesand worker config End users End user (browser) Runtime Generated apps :3101 ...Next.js apps and the Work Portal BPM engine (Tomcat) :8889runs Processes Hub worker (Camel / Quarkus) :4710runs Flows Platform services (docker compose, used by the layers above) Keycloak :8095sign-in for everyone OpenBao :8200secrets Postgres 6.0 :5437Kernel store, app data Postgres 5.0 :5432BPM engine schema Jaeger :16686run history RabbitMQ, KafkaMinIO, SFTP triggers typed tool calls MCP reads the store
System architecture: people and agents, the Workbench, the Kernel and its generators, the runtime, and the platform services

The runtime services the stack depends on are defined in platform-dev/docker-compose.6.0.yml, except the BPM engine, which runs from the 5.0 reference stack (platform-dev/docker-compose.yml, container oneweb-pr-tomcat, 127.0.0.1:8889):

Service Address Used for
Keycloak :8095 Identity: sign-in for the Workbench and generated apps
OpenBao 127.0.0.1:8200 The Hub's vault (secret values)
Jaeger UI :16686, OTLP :4318 Flow run history
RabbitMQ AMQP :5673, management :15673 Queue triggers and the publish step
Kafka 127.0.0.1:9094 The event trigger and the publish step
Mailpit SMTP :1025, web UI :8025 Mail for notify steps (development)
MinIO and SFTP MinIO :9100 (console :9101), SFTP 127.0.0.1:2222 File triggers
BPM engine 127.0.0.1:8889 (5.0 stack) Process execution

Repository layout:

Path Role
kernel-schemas/ The IR. JSON Schema per artifact kind. Authoritative.
kernel-poc/src/ Kernel, typed tools, every generator, deployers, tests.
kernel-poc/sql/ Postgres schema: event store, graph, deploy runs, events.
workbench/ Module Federation designers and consoles; the shell.
generated/ Output. Never hand-edited. (.env.local is not generated.)
platform-dev/ 5.0 reference stack, the 6.0 compose stack, vendored libs, the Hub worker.

3.2 Runtime stack#

Two Postgres servers belong to different projects:

Server Owner Holds
:5432 oneweb-db 5.0 reference stack No Kernel state and no generated app's data. But the BPM engine's bpm schema is here too (platform-dev/tomcat/BPMREST.xml points the engine at oneweb-db), so process instances live in this database
:5437 oneweb-appdb 6.0 stack (pgvector) The Kernel event store and generated apps' data

The split is deliberate: wiping the 5.0 stack cannot touch the Kernel store or generated apps' data. It would delete the BPM engine's process state, because that sits in the 5.0 database (see the table). The Kernel's connection is built in one place, db-config.js. Rebuild all 6.0 state with cd kernel-poc && npm run restore.

flowchart TB subgraph s5["5.0 reference stack: oneweb-db on :5432"] direction LR ENG["BPM engine"] -->|"BPMREST.xml points here"| BPM[("bpm schema<br/>process instances")] end subgraph s6["6.0 stack: oneweb-appdb on :5437 (pgvector)"] direction LR ES[("Kernel event store")] AD[("Generated apps' data")] end K["Kernel<br/>(connection built in db-config.js)"] --> ES APPS["Generated apps"] --> AD
Which Postgres server holds what

To rebuild the 6.0 state after a wipe:

Service Purpose
Keycloak (:8095) Identity: one realm per organisation; login for Workbench and generated apps
OpenBao (127.0.0.1:8200) Vault for secret values (npm run vault:up inits/unseals)
Jaeger (:16686, OTLP :4318) Flow run history, read through run-trace.js
RabbitMQ (AMQP :5673, mgmt :15673) Hub queues and dead letters
Kafka (127.0.0.1:9094) Hub event trigger and publish step
BPM engine Runs deployed processes (built from 5.0's engine)
Mailpit Dev SMTP for notify steps
MinIO / SFTP Object stores for file triggers

3.3 The Workbench shell#

The shell hosts each designer as a Module Federation remote; react and react-dom are the only shared singletons.

flowchart TB SH["Workbench shell<br/>(:3000)"] R["react and react-dom<br/>(shared singletons)"] D1["Designers<br/>(process, page, shell,<br/>design-system, ...)"] D2["Operations consoles<br/>(read-only apart from<br/>three confirmed writes)"] SDK["SDK kit (sdk/src/ui)<br/>bundled into every remote"] K["Kernel facade"] SH -->|"hosts as remotes"| D1 SH -->|"hosts as remotes"| D2 SH -. "shares" .-> R D1 -. "shares" .-> R D1 --- SDK D1 -->|"typed tool calls"| K D2 -->|"reads"| K
The Workbench shell and its federated remotes

Consequences developers must know:

  • Run designer packages via pnpm --filter <pkg> build then serve. rsbuild dev breaks the singleton inside the shell; serve only serves a prebuilt dist/, so edit → rebuild.
  • The SDK (sdk/src/ui/) is bundled into every remote: after an SDK change rebuild every designer.
  • Every designer implements reload() so the shell's Undo/Redo refresh it.
  • Layout is checked in a real browser (pnpm test:layout); the Flow designer and the full builder journey have their own end-to-end suites.
  • The three Operations consoles are read-only apart from three explicitly confirmed writes (flow replay; failed-item replay and delete).

3.4 Generation pipeline#

Each artifact kind in the Kernel has a generator that turns it into runnable output. The table lists every pair; the diagram shows the main paths.

flowchart LR E["Entity"] --> G1["gen-ddl, gen-migration,<br/>gen-api"] --> O1["CREATE TABLE, ALTER,<br/>read and write endpoints"] P["Page and Form"] --> G2["gen-nextjs, gen-form,<br/>gen-work-portal"] --> O2["Next.js pages, forms,<br/>case portal"] F["Flow"] --> G3["gen-flow"] --> O3["In-app route<br/>(trampoline)"] PR["Process"] --> G4["gen-process-deploy"] --> O4["Engine definition<br/>deployed at release"]
From artifacts to generated output
Input Generator Output
Entity gen-ddl.js, gen-migration.js, gen-api.js CREATE TABLE (7 dialects), ALTER with severity, read/write endpoints with row policies
Page / Form gen-nextjs.js, gen-form.js, gen-work-portal.js Next.js pages, forms, case portal
Design system compile-ds.js CSS, scoping, class lint
App shell, auth gen-shell.js, gen-auth.js, gen-admin-portal.js Layout/nav, OIDC session, admin portal
Flow gen-flow.js In-app route/trampoline
Flow (Hub) gen-camel.js Camel YAML + worker config
Process gen-process-deploy.js Engine definition deployed at release
App env app-env.js Marked block in .env.local

generate-app.js writes everything atomically (temp + rename) and refuses to write under a live next dev. See workbench/GENERATOR.md.

A generated app's environment is derived from the Workspace Environment and the vault:

3.5 The two runtimes for Flows#

The same Flow artifact compiles twice:

flowchart TB SPEC["Flow artifact<br/>(one spec)"] SPEC --> GF["gen-flow.js"] SPEC --> GC["gen-camel.js"] GF --> APP["TypeScript trampoline<br/>inside the generated app"] GC --> Y["Camel YAML"] Y -->|"hub_deploy, then hub:apply"| HW["Hub worker<br/>(Quarkus)"] CONN["connection-env.js<br/>(shared Connection variable names)"] -.-> GF CONN -.-> GC APP --> PAR["verify-camel-parity.js<br/>same input, compare results"] HW --> PAR
One Flow spec, two compilers
In-app (gen-flow.js) Hub (gen-camel.js)
Form TypeScript trampoline inside the generated app Camel YAML in a standalone Quarkus worker
Strengths No extra infrastructure; subFlow Queues, Kafka events, file triggers, SOAP, schedules; runs independently of the app
Deploy With the app hub_deploy → npm run hub:apply (pinned, gated, reversible)

Parity is proved by running the same input on both and comparing (verify-camel-parity.js); every divergence found so far was a real semantic difference. Connections are runtime-neutral; each runtime's resolved values are derived in one place (connection-env.js, hub-config.js). Flows the Hub alone can run never block an app from generating.

3.6 Multi-tenancy and workspaces#

Every Kernel table is keyed by tenant_id. Real multi-tenant operation is a later phase; the design is in kernel-poc/MULTI-TENANCY.md and is a proposal, not built.

What is built is the workspace control plane: members, roles, verbs (view, edit, promote, manageConnections, manageMembers, approveProd…), bindings, Environments, residency policy and separation-of-duties rules. The workspace an authorization decision resolves against comes from the target artifact's own containment chain; a call spanning two workspaces is refused, not resolved.

3.7 Deploying a release#

The Deployment Center plans a release and a deployer executes it. deploy_plan (read-only) gives the units, changes, steps, gates, every blocker and a digest. deploy_start re-plans, refuses if the digest moved, then queues a run in kernel.deploy_run (Postgres only; the file backend refuses it by name). A deployer claims the run and executes it through the target's driver.

sequenceDiagram participant U as Builder participant K as Kernel participant Q as kernel.deploy_run participant D as Deployer participant T as Target driver U->>K: deploy_plan K-->>U: steps, gates, blockers, digest U->>K: deploy_start K->>K: re-plan and refuse if the digest moved K->>Q: queue the run D->>Q: claim the run D->>T: execute the steps D->>K: deployment_finished event
From plan to a running release

The deploy plan lists these steps in this order (a step appears only when the release has something for it; the Local and cluster drivers share the list and word the titles differently). Identity runs before the process deploy because the engine fixes a task's candidates at deploy, so the first members must already be granted.

flowchart LR A["preflight"] --> DB["database"] --> B["build"] --> C["migrate"] --> D["identity"] --> E["processes"] --> F["flows"] --> DEC["decisions"] --> G["rollout"] --> H["health"]
Local driver: step order

deploy_rollback puts back what served each app before a succeeded run (the other Local slot or the previous Helm revision), never a rebuild.