QNTX Architecture Documentation

Based on the arc42 template. This document is an entrypoint — it links to existing docs where content lives and fills gaps inline.


1. Introduction and Goals

Requirements Overview

QNTX stores and retrieves attestations — structured claims of the form:

[Subject] = [Predicate] ∈ [Context] ⌬ [Actor] ✦ [Time]

Building blocks: + (as/assert), = (is/identity), (of/membership), (by/actor), (at/temporal).

Current subsystems:

Quality Goals

PriorityQuality GoalRationale
1Privacy / Local-firstYour data stays yours. Local inference, local storage, no mandatory cloud.
2Data visibilityInformation density over aesthetics. Data-first hierarchy in all interfaces.
3PerformanceFast enables exploration. Minimal dependencies, efficient rendering, no decorative overhead.
4Semantic claritySymbols (⋈ ⨳ ⌬ ✦ ꩜) as namespaces. Meaning over decoration.
5ExtensibilityCore is minimal. Everything else is a plugin via gRPC. Grammar itself is attestable.

See Design Philosophy.

Stakeholders

StakeholderExpectation
Creator / stewardSystem works, vision intact, honest documentation
Community (forming)Participation, transparency, shared governance
Organizations wanting local AIPrivate LLM capabilities, no cloud dependency, Ollama integration
The publicA public good — intelligence tooling

The intent is public good. Governance is centralized now, with decentralized stakeholdership as a future direction.


2. Architecture Constraints

Constraints are expressed as axioms — invariants that throw at runtime if violated.

Full definitions: AXIOMS.md


3. System Scope and Context

Business Context

  Browser ──▶ QNTX node ◀──▶ QNTX node ◀── Browser
  Phone ────▶     │                │     ◀── Phone
              Plugins          Plugins
              (gRPC)           (gRPC)
                  │                │
                  └──── sync ──────┘
                   Merkle / symmetric
                   no coordinator

              any transport:
              TCP, WebSocket, LoRa, satellite, serial

Every node generates a did:key identity (ed25519) on first boot. No authority issues it.

Current: WebSocket sync between known peers, nodes identified by DID. Vision: Reticulum — transport-agnostic, delay-tolerant, self-routing. Node DID and Reticulum destination converge to the same keypair.

See sync.md, vision/reticulum.md, vision/identity.md.

Technical Context

┌──────────── Core ─────────────┐
│  ATS (attestation type system) │
│  ⊔ DB (SQLite, migrations)    │
│  ≡ am (configuration)         │
│  ꩜ Pulse (async execution)    │
│  ⋈ ax (query)                 │
└───────┬──────────┬────────────┘
        │          │
  gRPC (plugins)  WebSocket + REST (browser)
        │          │
  ┌─────┴───┐  ┌──┴──────────────┐
  │ Domain  │  │ Web UI           │
  │ plugins │  │  CodeMirror (ATS)│
  │         │  │  Canvas (⧉)     │
  └─────────┘  │  WASM (qntx-core)│
               └──────────────────┘

See Understanding QNTX.


4. Solution Strategy

Key technical decisions and why:


5. Building Block View

┌──────────────────── Core ────────────────────┐
│  ats/       Attestation Type System          │
│  db/        SQLite + migrations              │
│  am/        Configuration (5-layer precedence)│
│  pulse/     Async execution + scheduling     │
│  server/    HTTP, WebSocket, LSP             │
│  sync/      Merkle reconciliation            │
└──────────────────────────────────────────────┘
         │                    │
    gRPC (plugins)      WASM (qntx-core)
         │                    │
┌────────┴────────┐  ┌───────┴────────────────┐
│ Domain plugins  │  │ Rust crates            │
│ (Go, Python,    │  │  qntx-core (parser,    │
│  Rust)          │  │   fuzzy, sync, merkle) │
│                 │  │  qntx-proto (types)    │
│                 │  │  qntx-wasm (bindings)  │
└─────────────────┘  └────────────────────────┘

Architecture deep-dives:

Type system: types/


6. Runtime View

Key runtime flows:

Attestation lifecycle: assert → store → index → notify watchers → trigger downstream glyphs

꩜ Pulse execution: schedule tick → resource check → job dispatch → worker execution → result → budget tracking

Glyph meld DAG: meld detection → edge creation → subscription activates → attestation arrives → downstream glyph fires

Node-to-node sync: hello (root hash) → group hashes → need → attestations → done

Browser ↔ Server: WebSocket: semantic tokens, LSP protocol, ꩜ Pulse updates. REST: CRUD, sync triggers, status.

Detailed flows:


7. Deployment View

Single Go binary, embedded web UI. Zero configuration required.

Same binary everywhere:

Clients:

WASM (qntx-core) runs in both server (wazero) and browser (wasm-bindgen) — same Rust logic, two runtimes.

Development: make dev (Go on :877, TS hot-reload on :8820)

See Installation, Nix Development, Distribution Strategy.


8. Cross-cutting Concepts

SEG / Sym / Glyph

Every operator has three layers:

This is the conceptual framework that runs through everything — backend, frontend, documentation, UI.

Full definitions: GLOSSARY.md

Continuous Intelligence

A system that is always ingesting (⨳), always processing (꩜), always queryable (⋈).

See vision/continuous-intelligence.md.

Sync and Convergence

Attestations are append-only. Sync is set union — commutative, idempotent, convergent. No vector clocks, no conflict resolution. Two claims about the same subject aren't a conflict — they're two claims.

See sync.md, vision/reticulum.md.

Vision Documents

Other


9. Architecture Decisions

ADRDecision
001Domain logic lives in plugins, core stays minimal
002Plugin configuration via ≡ am with layered precedence
003gRPC for all plugin communication
004Plugins register ꩜ Pulse handlers dynamically
005Rust → WASM for browser/mobile ATS parsing
006Protobuf as single source of truth for types
007TypeScript gets interfaces only from proto
008Separate prost (types) from tonic (transport) in Rust
009Edge-based DAG for multi-directional glyph melding

10. Quality Requirements

Privacy / Local-first
├── Local inference, local storage, no mandatory cloud
├── No telemetry, no phone-home
└── Your data on your machine

Data visibility
├── Information density over visual polish
├── No text truncation (no ellipsis, ever)
└── Functional color only — color conveys status, not beauty

Performance
├── System fonts, minimal dependencies
├── Real-time updates via WebSocket
└── Efficient rendering, no decorative overhead

Semantic clarity
├── Symbols as visual grep — scan and know the domain
└── Consistent patterns for entity relationships

Extensibility
├── Plugin architecture via gRPC
├── Attestable glyphs — plugins attest new UI elements
└── WASM for cross-platform core logic

See Design Philosophy.


11. Risks and Technical Debt

RiskImpactMitigation
Abstraction barrier — "attestations" may be too abstractAdoption frictionGood ingestion (⨳ ix), gradual onboarding
Cold start — empty store = no valuePoor first-run experiencePrioritize connectors: git, files, APIs
Complexity budget — ATS + Pulse + Glyphs + Sync each carry weightLayers compound instead of composeEach layer independently useful, clear contracts
Single steward — bus factor of oneProject continuityCommunity formation, honest docs, public good model
Parser migration — ATS parser moving Go → Rust/WASMTemporary dual implementationsADR-005; WASM already serving browser

12. Glossary

See GLOSSARY.md.