Current technical architecture · three database planes

One governed core.Infinite extension.

BuildWithHQ combines a record-graph tenant runtime, exact-version application supply chain, secured multimodal AI, approval-fenced agents, isolated custom services and replayable operational evidence. This page is generated from the current repository contracts—not an aspirational database sketch.

Verified
identity
scope · permission · policy
SaaS DBSaaS Vector DBSaaS Immutable Logs
3database planes
316current tables
793stored procedures
43views · functions · synonyms · types
442task slices marked done

Architecture thesis

Control planes coordinate. Tenant planes decide.

The browser never talks directly to SQL Server, provider secrets, payment rails, DNS or tenant containers. Authenticated gateways resolve identity, typed services call reviewed procedures, and workers own durable or external side effects.

Everything operational becomes a secured record graph; everything long-running becomes fenced work; everything AI sees is authorized before prompt construction; and every material action can be correlated to evidence.

Each published SaaS owns its SaaS DB, SaaS Vector DB and SaaS Immutable Logs triple. The shared control plane—Builders, Template Library and Platform Orchestration—coordinates the fleet and is not cloned into every SaaS.

Experience plane

Builder Console, tenant runtime, admin/developer/operations surfaces and public APIs.

React · TypeScript · ASP.NET Core · OpenAPI · MCP
Application plane

Pages, Puck components, Monaco JSON, modules, fields, User Types, DataRoles, locations, workflows and versioned templates.

shared page + tenant fork · revision locks · exact snapshots
Record plane

First-class and custom business objects share relations, activity, files, dynamic fields, as-of history and secured graph traversal.

RecordId · ModuleId · RecordRelations · security envelope
Attention plane

Conversations and forms remain source records; Universal Inbox routes attention and GoClaw prepares proposed work.

InboxItems.ActivityVersion · suggestion batch · approval
Execution plane

Lease-fenced workers execute deterministic workflows, messages, webhooks, installs, AI jobs, backups and exports.

claim · lease token/version · renew · complete · recover
Extension plane

Signed installable services run behind authenticated gateways in OCI or Firecracker boundaries with declared egress and secret references.

immutable artifact · endpoint policy · invocation ledger
Evidence plane

Correlation, audit, record changes, AI citations, flight recorder, metrics, traces and warehouse checkpoints reconstruct behavior without copying secrets.

Customer Log DB · OTLP · dashboards · status feed

Newest repository updates

The architecture that landed most recently.

These slices are marked complete in the machine-readable task state. “Complete” means the repository acceptance evidence passed; it does not by itself claim the public production launch is signed off. Launch checklist and production launch remain partial in this snapshot.

Signed appliance releases

Signed, exact-version appliance releases deploy a customer's own SaaS databases and isolated services locally; the central Template Library remains catalog-operated, not copied into the appliance runtime.

Production worker fleet

Lease-fenced provisioning, marketplace, template, AI, GoClaw, workflow, communications, webhook and operations workers now share recovery, telemetry, dashboards, alerts and runbooks.

Qwen3-VL retrieval

Capability-routed multimodal embedding uses Qwen/Qwen3-VL-Embedding-8B with exact 256D, 1024D and 1998D SQL lanes, post-truncation normalization and physical-fleet revalidation gates.

Knowledge Core

Published, reviewable knowledge is connected to records, secured RAG, questions, Inbox support context and a sanitized post-resolution learning loop that cannot self-publish.

ActiveWorkplace

Any permitted record graph can anchor a secured workplace with participants, activity, pulse evaluation, snapshots and playback—without cloning the underlying business records.

In-SaaS authoring

User Types now control shared-page menus and the tenant runtime can switch between visual Puck editing and advanced Monaco JSON, with ownership, revision and publication fences.

Launch proof surface

The Field Service reference package and end-to-end proofs cover custom records, workflows, communications, secured AI/RAG, GoClaw approval, exact-version marketplace install, Snowflake and appliance deployment.

Release and edge

IIS junction swaps and Cloudflare custom-hostname/origin controls join schema compatibility, lease-safe workers, restore rehearsal, monitoring and security release gates.

Trust boundary

Authorization is a server-side derivation.

Client identifiers are query targets, never authorization proof. The effective SaaS app, AppAccount, user, role, DataRole, location and capability are reconstructed from the authenticated server context at every boundary.

01

Verified identity

Domain, session or service credentials resolve a server-owned tenant context. Payloads cannot select another database or elevate actor scope.

02

Procedure-only mutation

Controllers and routes use typed application services mapped to reviewed stored procedures. Ad-hoc DML is outside the production contract.

03

Record + location scope

DataRole, row/record policy and location membership are evaluated for reads, actions, global search, history and recursive graph traversal.

04

AI is an extra gate

CanAiReadRecords and source policy apply in addition to normal read access—before retrieval results, images or chunks enter a model context.

05

Stale-context fence

Inbox ActivityVersion follows a proposal through approval and deterministic execution. New activity invalidates work prepared against old context.

06

Secret references

Browsers receive neither provider credentials nor raw secure fields. Server-owned resolvers unwrap secrets only at the service that needs them.

07

Exact-version supply chain

Templates, Harness Packs, services and appliance releases are signed/versioned inputs with snapshot isolation and install evidence.

08

Correlated evidence

Operation, parent and correlation identifiers connect requests, procedure calls, workers, AI citations and external effects across planes.

SQL Server topology per SaaS

Three databases. Distinct responsibilities.

Every SaaS you publish gets these three databases of its own. Each is summarized by its responsibility, security boundary and current contract footprint—enough technical detail to understand the system without listing every implementation object.

Tenant runtime

SaaS DB

The authoritative tenant business runtime: records, fields, relations, pages, DataRoles, locations, workflows, communications, Universal Inbox, GoClaw action control, Knowledge Core and ActiveWorkplace.

252 tables 681 procedures 35 other

BoundaryOne tenant/app security envelope; every request is resolved from verified server identity and uses reviewed stored procedures.

Tenant AI retrieval

SaaS Vector DB

The tenant semantic retrieval plane: source registry, document structure, chunks, visual evidence, 256/1024/1998D embeddings, rebuild jobs, secured candidate search and tenant AI state.

30 tables 58 procedures 4 other

BoundarySearch material is not authorization proof. Tenant, DataRole, location and CanAiReadRecords are reapplied before any model context is assembled.

Tenant evidence

SaaS Immutable Logs

Append-oriented operational evidence: audit, record change, AI query citations, page activity, worker and appliance flight-recorder events, tamper-evident ledgers and Snowflake sync state.

34 tables 54 procedures 4 other

BoundaryEvidence stays tenant-scoped, privacy-minimized and correlation-linked; business services do not turn the log plane into a second source of mutable truth.

AI + governed agents

Retrieval and authority are different systems.

The SaaS Vector DB makes authorized evidence searchable. It never grants GoClaw permission to mutate a business record. Planning, approval and execution stay separate and auditable.

Secured multimodal RAG

Text, document structure and visual evidence share the existing source/chunk model. Qwen3-VL maps them into the production SQL vector lanes.

Sourcerecord, file, page or image
Elementstext, table, graph, screenshot
Chunksstable semantic units + citations
256D
broad candidate recall
1024D
precision + visual lane
1998D
highest-resolution SQL lane
1998 is intentional. Qwen’s native maximum is 2048D, while the current SQL float32 contract remains 1998D. Manual MRL truncation is L2-normalized after slicing.

GoClaw proposal → execution

Inbound activity becomes attention first. GoClaw planning is read-only; customer-facing work becomes deterministic only after current authority is proven.

Inboxclaim current ActivityVersion
Prepareauthorized context + RAG
Proposebatch + validated actions
Authorizehuman or configured low-risk policy
QueueAiActionExecution + GoClaw work
Executeregistered action + evidence
Prompt text, tool policy and model confidence cannot promote authority. The server rechecks action permission, AI/read scope, quota and ActivityVersion at execution time.

Deployment + extension

Central catalog. Managed cloud or customer appliance.

The same contract model supports BuildWithHQ-operated environments and customer/MSP-hosted appliances. Appliance operation is local: a customer runs their own SaaS databases and services, while catalog acquisition remains a signed central interaction.

Authortemplate, harness or service
Validateschemas, security, tests
Publishimmutable exact version
Installsnapshot + idempotent worker
Rungateway + egress policy
Provereceipt, ledger, health