Skip to content
dhirajpatraPublic

About

Relating is the developer experience and engineering layer between graph experimentation and production deployment

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

Relating

M8ven Score

Relating About the project

Relate + Intelligence. Build connected knowledge. Give every agent a way to reason over it.

Relating is a local-first, AI-native graph development and GraphRAG workbench. It combines the embedded Relate graph database with mandatory AI services, document and structured-data ingestion, graph exploration, grounded retrieval, agent tools, and a guided migration path to Neo4j Aura.

Product promise: Build locally. Understand your data intelligently. Connect your agents. Deploy and migrate confidently.

Relating is an independent product built on Relate. It is not an official Neo4j product and does not imply endorsement by Neo4j or the Relate maintainers.


Use case

Relating is a local-first, AI-native graph development and GraphRAG workbench: create isolated projects, ingest CSV/JSON/text/PDF/DOCX plus SQL databases and REST APIs, propose and approve an ontology with AI, extract entities and relationships, explore with Cypher, build hybrid retrieval and grounded Q&A, connect agents over MCP, and migrate approved data to Neo4j Aura with continuous delta sync. Teams get OIDC single sign-on, role-based access, and hash-chained audit logs; applications integrate through the Python and TypeScript SDKs. The relationships that matter are each project's own domain entities and their connections (people, documents, products, papers, or whatever the project ontology defines), plus provenance links from every node/relationship back to its source chunk and file.

How it uses Relate

  • Mode: single file
  • Why this mode: one isolated, persistent .rl store per project survives restarts, backs up/copies/migrates as a single file, and enforces project-scoped isolation without running a separate server — a better fit for Relating's local-first, per-project design than in-memory (no durability) or directory mode (harder to copy, verify, and migrate per project).
  • What the graph models: the per-project domain graph — ontology-typed entity nodes, typed relationship edges, and provenance to source documents/chunks — which powers the explorer, Cypher console, retrieval/Q&A evidence, and the Aura migration source.

Setup and run

Prerequisites: Rust stable (via rustup) and Node.js 20+ with npm. Optional: Ollama (ollama serve) for local AI, Docker with compose v2, Python 3 for migrate-aura.sh.

./start.sh

Then open http://127.0.0.1:8080 for the workbench (API + UI, data in ./data, override with RELATING_DATA_DIR). Headless: cargo run -p relating-cli -- validate --project ID. Full options below in Quick start.

Where the data lives

data/projects/<project-id>/graph.rl — one single-file Relate store per project (data root overridable via RELATING_DATA_DIR).


Quick start

Prerequisites: Rust stable (via rustup) and Node.js 20+ with npm. Optional: Ollama (ollama serve) for local AI models, Docker with compose v2 for the container stack, and Python 3 for migrate-aura.sh.

./start.sh

Then open http://127.0.0.1:8080 in your browser to use the workbench.

The script builds the web UI when missing, starts the API and serves the UI from it, and keeps project data in ./data (override with RELATING_DATA_DIR). Useful options: --port 8081 to change ports, --release for the optimized build, --rebuild-web to force a UI rebuild. Alternatively: ./start-with-docker.sh for the containerized server (SQLite — enough to run the app and migrate; stop with ./stop-docker.sh), plus opt-in --profile postgres, --profile ollama, and --profile neo4j services, each with its own Dockerfile under docker/ (see docs/docker.md). The two start methods are alternatives: never run both at once (both bind port 8080), and note container data lives in the relating-data volume instead of ./data.

Windows: start.sh, start-with-docker.sh, stop-docker.sh, and migrate-aura.sh are bash-only. Run them from WSL2 or Git Bash with Rust, Node.js 20+, Docker Desktop (compose v2), and Python 3 on PATH. Native PowerShell is not supported.

The built-in mock AI provider is for development and testing only — it returns deterministic canned responses and is never production AI functionality. Configure Ollama, OpenAI, or another OpenAI-compatible provider for real inference.

Headless workflows use the CLI instead: cargo run -p relating-cli -- validate --project ID (validations, contract tests, schema export/diff, eval gates, shadow runs, debugging — see docs/api/ci.md).

Status: milestones A–E, releases R1–R6, and enterprise E1–E3 are implemented — projects, ingestion, ontology, graph explorer, Cypher, embeddings, retrieval, grounded Q&A, evaluation, MCP agent server (read-only tools), Aura migration over Bolt, schema-as-code, portability compiler, CI/CD gates, shadow testing, graph debugger, synthetic data, and the performance advisor. Also implemented: Relate↔Aura backend flip without query rewrites (backend_flip.md), Aura vector-index and tier-capacity fit checks, PDF/DOCX ingestion, merge-upsert migration disclosure, migration rollback, count/hash/degree verification, SARIF portability output, an API bearer-token gate, and team secrets plus PostgreSQL provisioning (postgres.md, secrets.md). Enterprise additions: continuous delta sync with versioned conflict handling and drift detection (migration.md), OIDC single sign-on with RBAC and hash-chained audit export (auth.md), SQL + REST data connectors with incremental ingest (connectors.md), and zero-dependency Python/TypeScript SDKs (sdks/python, sdks/typescript). See Visual overview and the API docs for details.


Visual overview

The developer journey

flowchart LR
    A["Develop locally<br/>Relate + AI + project"] --> B["Validate continuously<br/>Schema, contracts, tests, eval"]
    B --> C["Prepare for production<br/>Compatibility, remediation, shadow runs"]
    C --> D["Deploy to Neo4j Aura<br/>Approved migration + verification"]
Loading

One platform, four faces

flowchart TB
    subgraph WB["Graph Workbench"]
        W["Relate · Cypher<br/>graph exploration"]
    end
    subgraph AI["AI Engineering"]
        G["Ontology · GraphRAG<br/>agent workflows"]
    end
    subgraph DO["Graph DevOps"]
        T["Schema-as-code · tests<br/>CI/CD gates"]
    end
    subgraph PE["Portability Engine"]
        M["Compatibility · migration<br/>shadow validation"]
    end
    WB --- AI
    AI --- DO
    DO --- PE
Loading

What lives where (workbench tabs)

Tab Capability Release
1. Sources CSV/JSON/text/PDF/DOCX ingest, lineage B
2. Ontology AI proposal, approval gate B
3. Graph Explorer Cytoscape visualization B
4. Cypher Console Read/write workbench A–B
5. AI Service Provider config, health A
6. Retrieval & Q&A Embeddings, hybrid search, eval C
7. Agents MCP connection snippets R1
8. Aura Migration Analyze → approve → migrate → verify R1
9. Schema & Contracts As-code export, revisions, diff R2
10. Portability Repo scan, remediation, target tests R3
11. Shadow & Debug Shadow runs, GraphRAG debugger R5
12. Test Data & Advisor Synthetic fixtures, perf advice R6

Headless equivalents live in the relating CLI and the GitHub workflow (R4).


1. Product definition

Relating is a domain-agnostic application for individual developers and enterprise teams. A project can contain any permitted business or technical domain: software repositories, product catalogues, supply chains, research papers, enterprise knowledge, financial data, or a user's own datasets.

It is not a banking application and must not bake any single industry ontology into the platform.

Core modules

  1. GraphRAG Development Workbench

    • Create isolated graph projects.
    • Ingest files and structured sources.
    • Profile data and propose an editable ontology.
    • Extract entities and relationships with AI.
    • Store connected data in Relate.
    • Explore and query with Cypher.
    • Build vector, full-text, graph, and hybrid retrieval.
    • Evaluate retrieval and generated answers with traceable evidence.
  2. AI Service and Agent Integration

    • AI is a required platform service, not a removable feature.
    • Configure one or more model providers for chat/reasoning, embeddings, extraction, reranking, and evaluation.
    • Support local and hosted inference through provider adapters.
    • Expose project-scoped tools through MCP.
    • Connect compatible clients such as Claude Code, Codex, Cursor, and other MCP clients.
    • Provide CLI and SDK access for scripts and applications.
  3. Relate-to-Neo4j Aura Migration Assistant

    • Connect to a Neo4j/Aura destination.
    • Inspect source and target schema.
    • Analyse Cypher and feature compatibility.
    • Generate a migration plan and dry-run report.
    • Transfer approved data in resumable batches.
    • Verify counts, content hashes, relationship degrees, properties, constraints, and indexes.
    • Roll back a migration by removing exactly the records it created.
    • Produce a migration manifest and audit report.

Relating must remain useful when a user never migrates to Aura.

2. Product principles

  • Local-first: a developer can start with a local project and local Relate store.
  • AI-required, provider-flexible: every workspace has an AI service configuration; providers and models are replaceable.
  • Graph-first, domain-neutral: ontology and data model belong to each project.
  • Agent-native: MCP, CLI, and documented APIs are first-class interfaces.
  • Safe by default: read-only queries by default; explicit approval for writes and remote migration.
  • Portable: project configuration, ontology, source manifests, prompts, retrieval settings, and evaluation definitions are exportable.
  • Incremental delivery: a working vertical slice is more valuable than a broad but nonfunctional shell.
  • Upstream-first: use Relate as a dependency; do not fork or reimplement its graph engine without a documented technical reason.

3. Reference architecture

flowchart TB
    CC["Claude Code"] --> MCP["MCP server<br/>stdio + HTTP"]
    CX["Codex"] --> MCP
    CU["Cursor"] --> MCP
    AG["Any MCP client"] --> MCP
    MCP --> APP["Relating application<br/>projects · policy · jobs"]
    CLI["relating CLI"] --> APP
    UI["Web UI<br/>React + Cytoscape"] <--> API["REST API<br/>Axum"]
    API --> APP
    APP --> G["Graph backends<br/>RelateBackend · Bolt Neo4jBackend"]
    APP --> AI["AI service<br/>chat · embed · extract · judge"]
    APP --> ING["Ingestion<br/>parse · chunk · extract · load"]
    APP --> RAG["Retrieval<br/>vector · keyword · hybrid"]
    G --> STORES["Project-scoped Relate stores<br/>.rl files"]
    G --> AURA["Neo4j Aura<br/>approved migrations"]
    APP --> META[("Metadata<br/>SQLite local")]
    AI -.-> OLL["Ollama / OpenAI / mock<br/>(mock: testing only)"]
Loading

Secrets are never stored: Aura passwords resolve at runtime from environment variables, mounted secret files, or the OS keychain (see docs/secrets.md), and provider keys stay in project configuration outside version control. (Team PostgreSQL metadata: schema provisioning and validation are available — see docs/postgres.md; Vault secret backends remain roadmap.)

Technology decisions

Layer Initial choice Responsibility
Web UI React + TypeScript Workbench, project setup, graph explorer, ingestion, AI settings, migration
API/control plane Rust + Axum + Tokio Projects, jobs, policy, graph adapters, MCP orchestration
Graph engine Relate Rust crate / supported Relate interfaces Local graph storage and Cypher execution
AI service Required provider abstraction LLM, embeddings, extraction, reranking, evaluation
Document workers Rust-native parsing (relating-ingest) PDF/DOCX/CSV/JSON/text parsing and chunking; an isolated Python worker interface stays reserved for future AI/data-library needs
Metadata SQLite local; PostgreSQL server Users, projects, sources, jobs, configs, audit
Visualization Cytoscape.js Graph rendering and interaction
MCP Official MCP SDK / protocol-compatible transport Tools and resources for external agents
Packaging Docker Compose first; Tauri optional Reproducible local and self-hosted deployment

Start as a modular monolith. Split workers into separate processes only when load, security, or deployment needs justify it.

Graph backend abstraction

Define a stable internal interface, for example:

  • GraphBackend
  • RelateBackend
  • Neo4jBackend

Keep graph data in the graph backend. Keep application metadata in SQLite/PostgreSQL. Do not treat a shared Relate store as tenant isolation: use project-scoped stores or a rigorously enforced namespace model. The default MVP should use one Relate store per project.

AI service is mandatory

A workspace cannot become “ready” until an AI provider is configured and a health check succeeds. The AI service itself must be abstracted so providers can be changed without changing ingestion or retrieval code.

Required AI capabilities:

  • Chat/reasoning model.
  • Embedding model.
  • Structured extraction (can use the configured reasoning model with constrained output).
  • Reranking capability, with a deterministic fallback for the first MVP.
  • Evaluation/judging capability, with explicit model and prompt versioning.

Local model servers and hosted APIs should be supported through adapters. Do not hard-code a vendor or model. Store model ID, provider, dimensions, modality, version, and configuration per embedding profile. Never compare vectors from incompatible embedding spaces.

If credentials or a provider are not configured, show a clear setup state and block AI-dependent operations; do not silently pretend AI ran.

4. Relate integration and installation

Relating should use the supported Relate Rust crate/API where practical, and the installed Relate CLI for operational workflows where appropriate. Verify the current API and version during implementation; do not assume examples from a different release remain valid.

Relate's official install guide currently documents:

  • CLI installation on macOS/Linux using curl -sSfL https://relatedb.ai/install.sh | bash.
  • Python package relate-db.
  • Node package @relate/relate.
  • Browser package @relate/relate-wasm.
  • Rust crate installation through Cargo.
  • A Windows binary installation path.

For local development, support a guided prerequisite check:

  1. Detect OS and architecture.
  2. Detect relate and report its version.
  3. If missing, offer the official install instructions; do not run an unreviewed remote shell script automatically.
  4. Verify relate --version.
  5. Run relate agent-context to inspect the installed command surface.
  6. Create a project-scoped store only after the user creates a project.
  7. Preserve existing stores. Never overwrite, clear, or migrate a store without explicit confirmation.

Relate supports in-memory, directory, and single-file .rl stores. Relating runs in single-file mode. Respect Relate's durability and backup guidance.

How it uses Relate

Relating runs Relate in single-file mode, with one persistent .rl store per project at data/projects/<project-id>/graph.rl (data root overridable via RELATING_DATA_DIR). We chose single-file mode because each project gets an isolated, persistent local graph that survives restarts and can be backed up, copied, or migrated as one file, which fits Relating's local-first, project-scoped design.

Relate features to integrate

Use and surface supported upstream capabilities rather than rebuilding them:

  • Cypher query execution and schema inspection.
  • Local persistent stores and in-memory development stores.
  • CSV/JSON ingestion capabilities where supported.
  • Vector and full-text features supported by the installed Relate version.
  • CLI and language bindings.
  • HTTP/Bolt/MCP serving where available.
  • Neo4j/Aura pull and push workflows where supported.
  • Relate's own agent skill and agent-context reference.

Relating's differentiator is the higher-level workflow: multi-source ingestion, AI ontology and extraction, provenance, GraphRAG configuration, evaluation, multi-project UX, policy, migration analysis, resumability, and verification.

Do not claim feature parity with Neo4j. Maintain a versioned capability registry. Mark features as SUPPORTED, RECREATE, TRANSFORM, UNSUPPORTED, or REQUIRES_MANUAL_REVIEW.

5. MCP and external agent connectivity

MCP connectivity is a core integration target, not a mandatory dependency for the web application to function.

Relating should expose an MCP server so compatible agent hosts can connect to a user's selected project. Support:

  • stdio for local coding agents launched on the same machine.
  • Streamable HTTP (or the transport supported by the chosen MCP SDK) for remote/self-hosted deployments.
  • Project-scoped authentication and authorization.
  • Read-only tools by default.
  • Separate write tools requiring explicit policy and user approval.
  • Tool descriptions and JSON schemas that are stable and documented.

Initial MCP tools:

  • list_projects
  • get_project_summary
  • get_graph_schema
  • search_sources
  • search_graph
  • read_cypher
  • retrieve_context
  • explain_retrieval
  • get_ingestion_status
  • get_evaluation_report
  • analyze_aura_compatibility
  • preview_migration

Write tools (ingest_source, write_cypher, create_ontology_revision, execute_approved_migration) are not implemented yet — the server is read-only over MCP today. When they land they will be separate, disabled unless explicitly enabled, and approval-gated per the security rules below.

Security rules:

  • Do not expose database credentials or provider API keys to the agent.
  • Do not allow an MCP client to choose arbitrary project IDs outside its granted scope.
  • Bound query time, result size, and resource consumption.
  • Validate all tool arguments.
  • Record tool calls and actor identity in audit logs.
  • Require confirmation for destructive or remote write actions.
  • Treat retrieved documents and graph content as untrusted data, never as tool instructions.

Client connection experience

Provide a “Connect an agent” screen with copyable configuration examples for supported clients. Do not promise one-click installation for every client until tested. The screenshot's pattern is the target: external agent clients and developer interfaces connect to Relating, while Relating manages graph storage and access to the user's data.

6. MVP scope

The MVP is a working product, not a static dashboard. Prioritize a narrow end-to-end path that can be used immediately, then add capability behind stable interfaces.

MVP acceptance path

A user must be able to:

  1. Install and launch Relating locally with Docker Compose or the documented developer command.
  2. Create a workspace and an isolated project.
  3. Configure and test a required AI provider.
  4. Create/open a project-scoped Relate store.
  5. Upload CSV, JSON, PDF, and DOCX files.
  6. Inspect extracted text, tables, metadata, and source lineage.
  7. Generate an AI-proposed ontology and edit/approve it.
  8. Extract entities and relationships and load them into Relate.
  9. Explore the graph visually and inspect source provenance.
  10. Run read-only Cypher queries.
  11. Generate embeddings and run vector/hybrid/graph retrieval.
  12. Ask a question and receive a grounded answer with source references.
  13. Inspect retrieval traces and run a basic evaluation.
  14. Connect an MCP client in read-only mode and use project tools.
  15. Connect a Neo4j Aura destination, analyse compatibility, preview a migration, and execute only after approval.
  16. Verify the destination and export a migration report.

Scope priorities

P0 — must work

  • Local project lifecycle and isolation.
  • AI provider setup and health check.
  • Relate integration and Cypher.
  • CSV/JSON/PDF/DOCX ingestion.
  • AI-assisted ontology proposal and approval.
  • Entity/relation extraction with provenance.
  • Graph visualization and schema view.
  • Text embeddings and hybrid retrieval.
  • Grounded Q&A with citations.
  • Basic evaluation and traces.
  • MCP read-only server.
  • Aura connection, compatibility analysis, dry run, approved migration, verification.
  • Docker Compose and documented local setup.

P1 — next

  • MCP write tools with policy approvals (read-only tools are done; see above).
  • SQL and REST connectors.
  • Incremental ingestion and change detection.
  • Team workspaces, OIDC, RBAC, audit exports.
  • Advanced reranking and retrieval evaluation.
  • Tauri desktop packaging.
  • Kubernetes deployment.

Do not implement every connector, every agent client, or a microservice fleet before the P0 acceptance path works.

7. GraphRAG data pipeline

flowchart TB
    SRC["Sources<br/>CSV · JSON · text"] --> PROF["Profile + normalize"]
    PROF --> TXT["Text branch<br/>parse · chunk"]
    PROF --> TAB["Structured branch<br/>rows · tables"]
    TXT --> EMB["Embeddings<br/>per content profile"]
    TAB --> MAP["Schema mapping"]
    EMB --> EXT["Entity + relationship extraction"]
    MAP --> EXT
    EXT --> ONTO["Ontology mapping<br/>+ entity resolution"]
    ONTO --> PROV["Provenance + confidence<br/>+ source IDs"]
    PROV --> GRAPH[("Project Relate graph")]
    GRAPH --> VEC["Vector retrieval"]
    GRAPH --> LEX["Keyword retrieval"]
    GRAPH --> CYP["Cypher traversal"]
    VEC --> FUSE["Hybrid fusion<br/>reciprocal rank"]
    LEX --> FUSE
    CYP -.-> FUSE
    FUSE --> CTX["Evidence pack<br/>+ citations"]
    CTX --> LLM["AI reasoning service<br/>(required)"]
    LLM --> ANS["Grounded answer<br/>+ evaluation trace"]
Loading

Multi-embedding design

Allow different embedding profiles for different content types (for example prose, tables, code, and images). Store:

  • embedding_profile_id
  • provider and model ID/version
  • dimensions
  • modality/content type
  • source and chunk/table/row identity
  • source version and content hash
  • embedding timestamp

Use separate vector indexes/spaces per compatible profile. Filter retrieval by profile and dimensions; never calculate similarity across unrelated vector spaces. Preserve the original table structure and cell/row provenance rather than flattening every table into prose.

8. Aura migration workflow

flowchart TB
    CONN["1. Connect + validate<br/>Bolt handshake · auth"] --> ANALYZE["2-5. Analyze<br/>schema · capability verdicts"]
    ANALYZE --> PLAN["6. Plan<br/>batches · DDL · warnings"]
    PLAN --> DRY["7. Dry run<br/>zero remote writes"]
    DRY --> GATE{"8. Blockers?"}
    GATE -- "yes: fix + re-run" --> DRY
    GATE -- "none: approve" --> EXEC["9. Execute<br/>idempotent batches"]
    EXEC --> VERIFY["10. Verify<br/>counts + hashes + degrees + samples"]
    VERIFY --> REPORT["12. Manifest<br/>+ audit report"]
    VERIFY -. "optional" .-> ROLLBACK["11. Rollback<br/>remove tagged records"]
Loading
  1. Create and validate a destination connection.
  2. Inspect source graph schema and target database capabilities.
  3. Capture a consistent source snapshot or define the supported consistency boundary.
  4. Analyse labels, relationship types, property types, constraints, indexes, and Cypher usage.
  5. Classify each issue using the capability registry.
  6. Produce a plan with counts, transformations, warnings, and estimated batches.
  7. Execute a dry run with no remote mutation.
  8. Require explicit approval.
  9. Transfer in idempotent, resumable batches using stable business keys where possible.
  10. Verify nodes, relationships (counts, content hashes, degrees), properties, constraints, and indexes.
  11. Optionally roll back by deleting exactly the records the migration created (migration-id tag; updates on pre-existing records are not reverted).
  12. Produce a signed or integrity-checked migration manifest and audit report.

Golden path (hardened) vs experimental

The hardened golden path is: seed → analyze → dry-run → approve → execute → verify → report, driven by ./migrate-aura.sh --yes or relating aura migrate --project ID --connection CID --yes --report out.json. It is covered by unit tests, fake-Bolt integration tests (resume-after-failure, parallel edges, rollback), and a CI job running the full flow against real Neo4j. Continuous delta sync (POST .../sync, POST .../drift, GET .../changes) earned the same coverage: stable ordered scans, watermark state, versioned compare-and-set writes, explicit delete propagation, and tamper-evident drift checks are all integration-tested. Everything else outside the golden path — shadow replay, the graph debugger, synthetic fixtures, the sizing advisor — is functional but experimental: use it, but verify results before trusting them in production.

No query rewrites: what actually flips

Two integration styles, two flip mechanisms — neither rewrites queries:

  • Apps on Relating's API/MCP: keep one statement and inject the target from configuration. Before migration the statement runs on relate://local; after migration the identical statement and bound parameters run on aura://<connection-id> via proxy mode (connection_id on the Cypher endpoints, RELATING_TARGET in client code). See backend_flip.md.
  • Apps on a standard Neo4j driver directly: the flip is a Bolt URI change in the app's own configuration. Relating's value there is everything around the flip: the compatibility analysis, the dry-run plan with MERGE disclosure, the idempotent transfer, the count/hash/degree verification, and the Portability Compiler scan of the app's embedded Cypher.

Relate's existing Neo4j/Aura pull/push capabilities can be used where appropriate. Validate their exact semantics against the installed Relate version. In particular, do not assume that indexes, constraints, vector metadata, or all Neo4j features are transferred automatically. Never claim that a push is a destructive mirror unless the upstream implementation explicitly guarantees that behavior.

Incremental synchronization is on-demand delta sync, not real-time streaming replication: it ships change tracking (watermarks, change feed), stable identities (uid keys plus _version/_updated_at), conflict handling (newer-version-wins compare-and-set), and reconciliation (drift detection, superset-aware verification) — all implemented and integration-tested. A live CDC log tail remains out of scope; schedule POST .../sync for near-real-time freshness.

9. Security and enterprise requirements

  • Local secrets in OS keychain where available.
  • Server secrets through env, mounted secret files, or the OS keychain today; Vault/KMS backends are a deferred follow-up.
  • RELATING_API_TOKEN bearer gate for /api/v1 on shared hosts (see secrets.md); compose binds every port to 127.0.0.1.
  • Containers run as non-root; base images are minor-pinned.
  • TLS for remote interfaces.
  • OIDC single sign-on (HS256 JWT verification, dependency-free) with login/callback sessions — see auth.md. RS256 needs the jsonwebtoken follow-up.
  • RBAC for team deployments: viewer reads, editor writes, global admin manages grants; migration approvals need a second SSO actor.
  • Project-level data isolation, including MCP session scoping per project.
  • Read-only defaults for Cypher and MCP.
  • Explicit confirmation for graph writes and Aura migration.
  • Query timeout, result limits, rate limits (5-strikes 401 lockout), and upload limits.
  • Hash-chained, append-only audit log for access, logins, grants, ingestion, graph writes, and migrations, with JSON/CSV export and chain verification.
  • No third-party model transmission without provider configuration and user/admin consent.
  • Configurable retention and deletion policies.
  • Dependency, container, and license scanning.
  • No secrets in logs, prompts, traces, or exported manifests; provider keys are write-only and never returned by the API.

10. Suggested repository layout

Start with a small number of crates and modules. Expand only when boundaries are justified.

relating/
├── web/                     # React + TypeScript workbench (12 tabs)
├── crates/                  # 17 workspace crates
│   ├── relating-core/       # domain types, secrets, env config
│   ├── relating-metadata/   # SQLite runtime store + Postgres provisioning
│   ├── relating-server/     # Axum REST API + binaries
│   ├── relating-graph/      # GraphBackend + Relate adapter
│   ├── relating-ai/         # provider abstraction (mock/openai/ollama/meta)
│   ├── relating-ingest/     # source pipeline (CSV/JSON/text/PDF/DOCX)
│   ├── relating-retrieval/  # chunking, hybrid retrieval, Q&A, eval
│   ├── relating-mcp/        # MCP tools + stdio/HTTP transports
│   ├── relating-migrate/    # Bolt client, Aura analysis/plan/execute/verify
│   ├── relating-schema/     # schema-as-code docs, diff, conformance
│   ├── relating-portability/# repo scanner, rules, remediation, tests, SARIF
│   ├── relating-cli/        # relating CLI (validate, migrate, gates, eval)
│   ├── relating-shadow/     # dual-backend replay + comparison
│   ├── relating-debug/      # GraphRAG traces + diagnosis
│   ├── relating-synth/      # synthetic fixture generation
│   ├── relating-advisor/    # perf/cost rules, sizing, measurements
│   └── relating-connectors/ # SQL + REST sources, mapping, test stub
├── sdks/                    # zero-dep API clients (python, typescript)
├── tests/fixtures/          # deterministic seed fixtures (aura-fill ontology)
├── docs/api/                # per-area API contracts
├── .github/workflows/       # CI gates, Aura nightly, releases
├── start.sh                 # one-command local start
├── start-with-docker.sh     # one-command container start (see docker-compose.yml)
├── stop-docker.sh           # stop the container stack (keeps volumes by default)
├── migrate-aura.sh          # Docker + approval-gated Aura migration script
├── docker/                  # one folder + Dockerfile per compose service
│   ├── server/              # API + workbench UI + MCP (also used by db-init)
│   ├── postgres/            # team Postgres 17 (--profile postgres)
│   ├── ollama/              # local AI backend with model preload (--profile ollama)
│   └── neo4j/               # opt-in local Bolt target (--profile neo4j)
├── Cargo.toml
├── README.md
├── AGENTS.md                # contributor + coding-agent conventions
├── SKILL.md
├── .env.example
└── docker-compose.yml

11. Delivery strategy: fastest route to a working MVP

Do not plan this as a months-long architecture exercise. Build a thin vertical slice and keep the scope controlled.

Milestone A — runnable skeleton ✅

  • Monorepo, Rust workspace, React app.
  • Axum health/API endpoint.
  • SQLite metadata.
  • Relate dependency and a project-scoped store.
  • Docker Compose.
  • AI provider interface and configuration screen.
  • One working provider adapter and health check.

Milestone B — first useful graph ✅

  • CSV/JSON ingestion.
  • AI ontology proposal and approval.
  • Entity/relation extraction.
  • Load into Relate.
  • Schema and graph explorer.
  • Read-only Cypher console.

Milestone C — first GraphRAG answer ✅ (text, PDF, and DOCX sources)

  • Chunking and embedding.
  • Vector/keyword/hybrid retrieval.
  • Grounded Q&A with source citations.
  • Trace and basic evaluation.

Milestone D — agent connection ✅

  • MCP read-only tools.
  • stdio local connection.
  • HTTP connection for self-hosted deployment.
  • Client configuration snippets and connection test.

Milestone E — Aura migration ✅

  • Aura connection management.
  • Schema and compatibility inspection.
  • Dry-run plan.
  • Approved batch transfer.
  • Verification and report.

Releases R1–R6 ✅

  • R1: MCP server + Aura connection and migration.
  • R2: Graph schema-as-code + versioning.
  • R3: Graph Portability Compiler.
  • R4: Graph CI/CD + GitHub Actions.
  • R5: Shadow testing + AI Graph Debugger.
  • R6: Synthetic graph data + performance advisor.

Enterprise E1–E3 ✅

  • E1: Continuous delta sync — stable ordered scans, watermark state, versioned compare-and-set writes, explicit delete propagation, drift detection, change feed.
  • E2: Enterprise identity — OIDC single sign-on, viewer/editor/admin RBAC with second-actor approvals, hash-chained audit log with export. (Vault/KMS secret backends deferred.)
  • E3: Data connectors + SDKs — SQL (SQLite/Postgres/MySQL) and REST sources with managed sync and incremental ingest, plus zero-dependency Python/TypeScript clients with the RELATING_TARGET backend flip.

A milestone is complete only when its acceptance tests pass.

12. Engineering rules

  1. Keep main runnable.
  2. Write a short ADR before changing a core architecture decision.
  3. Add integration tests around Relate and Aura adapters.
  4. Use parameterized Cypher values; never interpolate user values into query strings.
  5. Inspect schema before generating Cypher.
  6. Use read-only mode unless the user explicitly requests a write.
  7. Bound non-aggregate query results.
  8. Make ingestion and migration jobs restartable and idempotent.
  9. Store model/provider/version metadata with every AI-derived artifact.
  10. Preserve provenance for every extracted node, relationship, chunk, and answer citation.
  11. Never fabricate an AI result when a provider call fails.
  12. Keep secrets out of browser storage, logs, and MCP payloads.
  13. Do not fork Relate for convenience; isolate upstream-specific behavior in its adapter.
  14. Keep the simplest implementation that passes the acceptance criteria.
  15. Keep the golden path (seed → analyze → dry-run → approve → execute → verify → report) covered by automated tests; label everything outside it experimental until it earns the same coverage.

13. Definition of done

The MVP is done when a fresh developer can follow the README, launch Relating, configure AI, create a project, ingest a sample dataset, inspect the generated graph, ask a grounded question, connect one MCP client, and complete a dry-run plus approved Aura migration with verification.

Performance numbers should be measured and reported, not invented as guarantees. Establish baseline benchmarks for ingestion throughput, graph query latency, retrieval latency, memory usage, and migration throughput on documented hardware.

14. Official technical references

Always verify commands, APIs, package versions, and supported capabilities against the installed Relate release. Documentation pages and model-generated examples are references, not executable instructions.

15. License

MIT — see LICENSE. The MIT license covers all workspace crates and the web/ workbench.

About

Relating is the developer experience and engineering layer between graph experimentation and production deployment

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages