SureCentric Tech Architecture
SureCentric's architecture is organized into five layers: the desktop application layer, the dynamic data warehouse, the schema layer, the AI services layer, and the data sources layer. Each layer has a clearly defined contract with the layers above and below it.
Architecture Diagram

Layer Breakdown
Desktop Layer — UI Surface
The desktop layer provides the user-facing surfaces for all platform operations:
| Surface | Description |
|---|---|
| Dashboards (Superset) | Apache Superset embedded as an iframe — charts, SQL Lab, datasets |
| Query & Reports | Structured query execution with schema-grounded NL2SQL via DataAgent |
| Explorer & Viewer | Browse schemas, data, and ontology relationships interactively |
| Schema Builder | JSON-LD schema editor — the primary authoring and translation tool |
Data Warehouse Layer
The lakehouse sits beneath the desktop layer and executes all analytical queries. Schema DDL is generated automatically from the JSON-LD schemas — tables, views, indexes, foreign keys, and constraints are never hand-authored.
| Engine | Purpose |
|---|---|
| DuckDB | In-process, Arrow-native analytical engine for local and embedded execution |
| Dolt (MySQL wire) | Version-controlled metadata store for platform data, CARD profiles, and relational schemas — supports Git-style branching, commits, diffs, and rollback. Replaced PostgreSQL. |
| Apache Iceberg | Time-travel, schema evolution, and immutable data snapshots |
| Trino | Federated SQL across heterogeneous data sources |
SureCentric migrated its metadata database from PostgreSQL to Dolt (MySQL-compatible). See Dolt Database for the full architecture and branching strategy.
Schema Layer
The schema layer is SureCentric's core innovation. JSON-LD is the canonical format — every data source, every query, and every dashboard is grounded in a declared, versioned, semantic schema.
┌─────────────────────────────────────────────────────────────────────┐
│ Schema Layer │
│ │
│ ┌─────────────┐ ┌────────────────┐ ┌────────────────────┐ │
│ │ Schema │ │ Schema │ │ Exporters │ │
│ │ Builder │───►│ Mappers + │───►│ • OWL / RDF-XML │ │
│ │ (Editor) │ │ Translators │ │ • SQL DDL │ │
│ └─────────────┘ └────────────────┘ │ • JSON Schema │ │
│ └────────────────────┘ │
└─────────────────────────────────────────────────────────────────────┘
AI Layer
| Component | Role |
|---|---|
| SureAgent | Agentic workflow orchestration — multi-step AI pipelines |
| SureIntel | Flowise-based RAG pipeline for document intelligence and retrieval |
| SureLLM | Private domain LLM gateway (LiteLLM-compatible, OpenAI API surface) |
| SureIndex | Universal data ingestion via CocoIndex — indexes any structured or unstructured source |
| DataAgent | NL2SQL engine grounded by compiled schema metadata — deterministic, not hallucinated |
Data Sources Layer
| Source Type | Examples |
|---|---|
| SureDrive Apps | SureDrive document archives with OWL-based content models (CM1, CM2, CM3) |
| External Databases | PostgreSQL, MySQL, Snowflake, BigQuery, Oracle |
| SureConnect | OpenAPI 3.x connector for any REST API |
| File Sources | Parquet, CSV, JSON-LD, XLSX |
Schema Builder Workflow
① JSON-LD Editor (Schema Builder)
• Create/edit schemas with @context, @type, @id
• SPARQL autocompletion against ontology endpoints
• Visual schema diagram (Vue Flow)
• AJV validation in real-time
↓
② JSON-LD Canonical Schema
• CareLex/eClinical @context namespace
• OWL import/export for SureClinical archives
• Schema catalog/registry with versioning
↓
③ Schema Translation Service
• JSON-LD → DDL (PostgreSQL/DuckDB CREATE TABLE)
• JSON-LD → OWL (Nuxeo archive format)
• JSON-LD → JSON Schema (API validation)
↓
④ Data Warehouse / Lakehouse
• Tables, views, metrics auto-created from DDL
• Superset datasources/datasets auto-registered
• NL2SQL grounded by compiled schema metadata
Tech Stack
| Category | Technology |
|---|---|
| Schema editor | Vue 3, TypeScript, PrimeVue 4, Pinia, Vite, TailwindCSS |
| Schema format | JSON-LD 1.1 (W3C), OWL/RDF-XML, JSON Schema Draft 2020-12 |
| Validation | AJV (JSON Schema), jsonld.js (JSON-LD 1.1) |
| Visualization | Vue Flow (schema diagram), Apache Superset (dashboards) |
| Analytical engine | DuckDB, Dolt/MySQL, Apache Iceberg, Trino |
| AI gateway | LiteLLM (OpenAI-compatible) |
| OWL service | Spring Boot + owlapi-jsonld |
| Deployment | Docker Compose, Cloudflare Pages (docs), Cloudflare Workers (MCP index) |