Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 12 additions & 12 deletions ARCHITECTURAL_GUARDRAILS.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
|-------|-----------|-----------|
| **Language** | Rust | Memory safety, zero-cost abstractions, ultra-low latency |
| **Storage Engine** | LMDB (Lightning Memory-Mapped Database) | ACID transactions, zero-copy reads, embedded-friendly |
| **Query Language** | NexusQL (custom, type-safe) | Domain-specific, compile-time validation |
| **Query Language** | SensibleQL (custom, type-safe) | Domain-specific, compile-time validation |
| **Build System** | Cargo (workspace) | Multi-crate dependency management |
| **CLI** | Rust (sensibledb-cli) | Cross-platform, single binary distribution |
| **Container Runtime** | Rust (sensibledb-container) | Server deployment mode |
| **SDKs** | TypeScript (`nexus-ts`), Python (`nexus-py`) | Primary AI application languages |
| **SDKs** | TypeScript (`sensible-ts`), Python (`sensible-py`) | Primary AI application languages |
| **Documentation** | MkDocs | Static site generation from markdown |
| **E2E Testing** | Playwright + TypeScript | Browser-level integration testing |

Expand All @@ -34,11 +34,11 @@ The project is organized as a Cargo workspace with the following crates:
|-------|------|----------------|
| `sensibledb-db` | `sensibledb-db/` | Core database engine — storage, graph, vector, transactions |
| `sensibledb-container` | `sensibledb-container/` | Server/container runtime for hosted deployments |
| `sensibledb-macros` | `sensibledb-macros/` | Procedural macros for NexusQL compilation |
| `sensibledb-macros` | `sensibledb-macros/` | Procedural macros for SensibleQL compilation |
| `sensibledb-cli` | `sensibledb-cli/` | CLI tool for project management and query deployment |
| `sensibledb-explorer` | `sensibledb-explorer/` | Web-based data explorer UI |
| `metrics` | `metrics/` | Observability and metrics collection |
| `nql-tests` | `nql-tests/` | NexusQL query language test suite |
| `nql-tests` | `nql-tests/` | SensibleQL query language test suite |

---

Expand All @@ -55,12 +55,12 @@ The project is organized as a Cargo workspace with the following crates:
- Vector search uses cosine similarity as the default metric

### 4.3 Type Safety End-to-End
- NexusQL queries MUST be 100% type-safe at compile time
- SensibleQL queries MUST be 100% type-safe at compile time
- Schema definitions and query validation happen before deployment
- Runtime type errors are unacceptable

### 4.4 Security by Default
- Data is private by default — accessible only through compiled NexusQL queries
- Data is private by default — accessible only through compiled SensibleQL queries
- No raw data exposure through APIs
- AGPL license enforces copyleft for derivative works

Expand Down Expand Up @@ -90,7 +90,7 @@ The project is organized as a Cargo workspace with the following crates:

---

## 6. Query Language (NexusQL) Guardrails
## 6. Query Language (SensibleQL) Guardrails

- Schema definitions use `N::TypeName { ... }` syntax
- Queries use `QUERY name(params) => ... RETURN ...` syntax
Expand All @@ -108,17 +108,17 @@ The project is organized as a Cargo workspace with the following crates:
- MCP tools expose graph structure, not database internals

### 7.2 SDK Contracts
- TypeScript SDK: `nexus-ts` — primary SDK for web/Node.js applications
- Python SDK: `nexus-py` — primary SDK for Python/AI applications
- Both SDKs communicate via compiled query endpoints (not raw NexusQL)
- TypeScript SDK: `sensible-ts` — primary SDK for web/Node.js applications
- Python SDK: `sensible-py` — primary SDK for Python/AI applications
- Both SDKs communicate via compiled query endpoints (not raw SensibleQL)
- Default server port: `6969`

---

## 8. Testing Guardrails

- **Unit tests**: Co-located with source in each crate
- **Query tests**: `nql-tests/` crate for NexusQL validation
- **Query tests**: `nql-tests/` crate for SensibleQL validation
- **E2E tests**: Playwright-based in `e2e/` directory
- **Metrics**: Collected via `metrics/` crate

Expand All @@ -140,7 +140,7 @@ Any architectural change that affects these guardrails MUST:
- ❌ Do NOT introduce alternative storage engines without an ADR
- ❌ Do NOT bypass LMDB transactions for direct file I/O
- ❌ Do NOT add runtime type checking where compile-time is possible
- ❌ Do NOT expose raw data through APIs — always go through NexusQL
- ❌ Do NOT expose raw data through APIs — always go through SensibleQL
- ❌ Do NOT split graph and vector into separate systems
- ❌ Do NOT add external dependencies to the core `sensibledb-db` crate without justification
- ❌ Do NOT change the AGPL license without maintainer consensus
Expand Down
4 changes: 2 additions & 2 deletions CONTRIBUTORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -143,8 +143,8 @@ The server process that hosts compiled queries and handles requests.

**Architecture:**
- Loads compiled queries via inventory crate route discovery
- Creates NexusGraphEngine with LMDB storage backend
- Starts NexusGateway on configured port (default: 6969)
- Creates SensibleGraphEngine with LMDB storage backend
- Starts SensibleGateway on configured port (default: 6969)
- Routes HTTP requests to registered handlers

**Environment Variables:**
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,9 @@ SensibleDB primarily operates with a graph + vector data model, but it can also
| **Built-in MCP tools** | Nexus has built-in MCP support to allow your agents to discover data and walk the graph rather than generating human readable queries. |
| **Built-in Embeddings** | No need to embed your data before sending it to Nexus, just use the `Embed` function to vectorize text. |
| **Tooling for RAG** | SensibleDB has a built-in vector search, keyword search, and graph traversals that can be used to power any type of RAG applications. |
| **Secure by Default** | SensibleDB is private by default. You can only access your data through your compiled NexusQL queries. |
| **Secure by Default** | SensibleDB is private by default. You can only access your data through your compiled SensibleQL queries. |
| **Ultra-Low Latency** | Nexus is built in Rust and uses LMDB as its storage engine to provide extremely low latencies. |
| **Type-Safe Queries** | NexusQL is 100% type-safe, which lets you develop and deploy with the confidence that your queries will execute in production |
| **Type-Safe Queries** | SensibleQL is 100% type-safe, which lets you develop and deploy with the confidence that your queries will execute in production |
| **Embedded Mode** | Use SensibleDB as a lightweight embedded database in your Rust applications with zero external dependencies. |

## Embedded Mode
Expand Down Expand Up @@ -107,10 +107,10 @@ Start by installing the SensibleDB CLI tool to deploy Nexus locally.
nexus push dev
```

6. Start calling them using our [TypeScript SDK](https://github.com/SensibleDB/nexus-ts) or [Python SDK](https://github.com/SensibleDB/nexus-py). For example:
6. Start calling them using our [TypeScript SDK](https://github.com/SensibleDB/sensible-ts) or [Python SDK](https://github.com/SensibleDB/sensible-py). For example:

```typescript
import SensibleDB from "nexus-ts";
import SensibleDB from "sensible-ts";

// Create a new SensibleDB client
// The default port is 6969
Expand Down
20 changes: 10 additions & 10 deletions docs/INDEX.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
- [Getting Started](#getting-started)
- [Overview](#overview)
- [Installation](#installation)
- [NexusQL Query Language](#nexusql-query-language)
- [Overview](#nexusql-overview)
- [SensibleQL Query Language](#sensibleql-query-language)
- [Overview](#sensibleql-overview)
- [Schema Definition](#schema-definition)
- [CRUD Operations](#crud-operations)
- [Graph Traversals](#graph-traversals)
Expand Down Expand Up @@ -141,15 +141,15 @@ curl -X POST http://localhost:6969/getUser \

---

## NexusQL Query Language
## SensibleQL Query Language

### Overview

NexusQL is a **strongly typed, compiled query language** for SensibleDB that combines the best features of Gremlin, Cypher, and Rust.
SensibleQL is a **strongly typed, compiled query language** for SensibleDB that combines the best features of Gremlin, Cypher, and Rust.

#### Why NexusQL?
#### Why SensibleQL?

| Feature | NexusQL | Gremlin | Cypher |
| Feature | SensibleQL | Gremlin | Cypher |
|---------|---------|---------|--------|
| Type Safety | Compile-time | Runtime | Runtime |
| Syntax | Clean, concise | Verbose | Readable |
Expand Down Expand Up @@ -390,19 +390,19 @@ port = 6969
### TypeScript

```bash
npm install nexus-ts
npm install sensible-ts
```

```typescript
import SensibleDB from "nexus-ts";
import SensibleDB from "sensible-ts";
const client = new SensibleDB();
const user = await client.query("getUser", { name: "John" });
```

### Python

```bash
pip install nexus-py
pip install sensible-py
```

```python
Expand Down Expand Up @@ -437,7 +437,7 @@ Use `Embed()` directly in queries — no external embedding service needed.
Vector search, BM25 keyword search, graph traversals, hybrid search with RRF, and MMR reranking.

### Security
Private by default. Data accessible only through compiled NexusQL queries. Type-safe queries prevent injection attacks.
Private by default. Data accessible only through compiled SensibleQL queries. Type-safe queries prevent injection attacks.

### Ultra-Low Latency
Rust + LMDB memory-mapped B-trees for near-zero overhead access.
Expand Down
2 changes: 1 addition & 1 deletion docs/features/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ Vector search, BM25 keyword search, graph traversals, hybrid search with RRF.

## Security

Private by default. Data accessible only through compiled NexusQL queries.
Private by default. Data accessible only through compiled SensibleQL queries.

## Ultra-Low Latency

Expand Down
8 changes: 4 additions & 4 deletions docs/nexusql/overview.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
# What is NexusQL?
# What is SensibleQL?

NexusQL is a **strongly typed, compiled query language** for SensibleDB.
SensibleQL is a **strongly typed, compiled query language** for SensibleDB.

## Why NexusQL?
## Why SensibleQL?

| Feature | NexusQL | Gremlin | Cypher |
| Feature | SensibleQL | Gremlin | Cypher |
|---------|---------|---------|--------|
| Type Safety | Compile-time | Runtime | Runtime |
| Performance | Compiled | Interpreted | Interpreted |
Expand Down
2 changes: 1 addition & 1 deletion docs/overview/about.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ SensibleDB eliminates the complexity of managing multiple specialized databases
- **Graph-Vector Data Model**: Native support for both graph relationships and vector embeddings
- **Rust Implementation**: Memory-safe, high-performance systems programming language
- **Embedded Mode**: Zero-dependency usage in Rust applications
- **Type-Safe Queries**: Compile-time validation of NexusQL queries
- **Type-Safe Queries**: Compile-time validation of SensibleQL queries
- **Built-in AI Tooling**: MCP support, automatic embeddings, vector search
- **Secure by Design**: Private by default access through compiled queries

Expand Down
4 changes: 2 additions & 2 deletions docs/overview/distinctive-features.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Benefits:

## Secure by Default

**Query-Based Access Control**: SensibleDB is private by default - you can only access your data through compiled NexusQL queries.
**Query-Based Access Control**: SensibleDB is private by default - you can only access your data through compiled SensibleQL queries.

Security Model:
- No direct table or collection access
Expand Down Expand Up @@ -74,7 +74,7 @@ Benefits:

## Type-Safe Queries

**Compile-Time Query Validation**: NexusQL is 100% type-safe, which lets you develop and deploy with confidence that your queries will execute in production.
**Compile-Time Query Validation**: SensibleQL is 100% type-safe, which lets you develop and deploy with confidence that your queries will execute in production.

Type Safety Features:
- Schema validation at compile time
Expand Down
6 changes: 3 additions & 3 deletions docs/programming-interfaces/5-minutes.md
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
id: 1,
label: "Dog".to_string(),
// In a real implementation, you'd set vector properties here
// This would typically be done through NexusQL or specific vector APIs
// This would typically be done through SensibleQL or specific vector APIs
};
tx.put_node(dog_node)?;

Expand All @@ -82,7 +82,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
tx.commit()?;

// Perform vector similarity search (conceptual example)
// Actual implementation would use NexusQL or specific vector search APIs
// Actual implementation would use SensibleQL or specific vector search APIs
let read_tx = db.read_transaction()?;
let nodes = read_tx.scan_nodes()?;
println!("Found {} nodes", nodes.len());
Expand Down Expand Up @@ -133,6 +133,6 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
## Next Steps

- Check out the [API Reference](./api-reference.md) for complete documentation
- Learn about [NexusQL](../query-language/syntax.md) for powerful querying
- Learn about [SensibleQL](../query-language/syntax.md) for powerful querying
- Explore the [Features](../features/README.md) to understand advanced capabilities
- See the [Getting Started Guide](../../overview/getting-started.md) for more detailed examples
6 changes: 3 additions & 3 deletions docs/sdks/overview.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,19 @@
## TypeScript SDK

```bash
npm install nexus-ts
npm install sensible-ts
```

```typescript
import SensibleDB from "nexus-ts";
import SensibleDB from "sensible-ts";
const client = new SensibleDB();
const user = await client.query("getUser", { name: "John" });
```

## Python SDK

```bash
pip install nexus-py
pip install sensible-py
```

```python
Expand Down
12 changes: 6 additions & 6 deletions mkdocs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,12 @@ nav:
- Getting Started:
- Overview: getting-started/intro.md
- Installation: getting-started/installation.md
- NexusQL:
- Overview: nexusql/overview.md
- Schema Definition: nexusql/schema-definition.md
- CRUD Operations: nexusql/crud-operations.md
- Graph Traversals: nexusql/traversals.md
- Vector Operations: nexusql/vector-operations.md
- SensibleQL:
- Overview: sensibleql/overview.md
- Schema Definition: sensibleql/schema-definition.md
- CRUD Operations: sensibleql/crud-operations.md
- Graph Traversals: sensibleql/traversals.md
- Vector Operations: sensibleql/vector-operations.md
- CLI:
- Getting Started: cli/getting-started.md
- SDKs:
Expand Down
10 changes: 5 additions & 5 deletions sensibledb-container/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ use sensibledb_db::sensibledb_engine::{
storage_core::version_info::{
ItemInfo, Transition, TransitionFn, TransitionSubmission, VersionInfo,
},
traversal_core::{NexusGraphEngine, NexusGraphEngineOpts},
traversal_core::{SensibleGraphEngine, SensibleGraphEngineOpts},
};
use sensibledb_db::sensibledb_gateway::mcp::mcp::{MCPHandlerFn, MCPHandlerSubmission};
use sensibledb_db::sensibledb_gateway::{
gateway::{GatewayOpts, NexusGateway},
gateway::{GatewayOpts, SensibleGateway},
router::router::{HandlerFn, HandlerSubmission},
};
use std::{collections::HashMap, sync::Arc};
Expand Down Expand Up @@ -98,14 +98,14 @@ fn main() {
);

let path_str = path.to_str().expect("Could not convert path to string");
let opts = NexusGraphEngineOpts {
let opts = SensibleGraphEngineOpts {
path: path_str.to_string(),
config,
version_info: VersionInfo(transition_fns),
};

let graph = Arc::new(
NexusGraphEngine::new(opts.clone())
SensibleGraphEngine::new(opts.clone())
.unwrap_or_else(|e| panic!("Failed to create graph engine: {e}")),
);

Expand Down Expand Up @@ -145,7 +145,7 @@ fn main() {

println!("Routes: {:?}", query_routes.keys());
println!("Write routes: {:?}", write_routes);
let gateway = NexusGateway::new(
let gateway = SensibleGateway::new(
&format!("0.0.0.0:{port}"),
graph,
GatewayOpts::DEFAULT_WORKERS_PER_CORE,
Expand Down
6 changes: 3 additions & 3 deletions sensibledb-db/src/embedded/storage/lmdb/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ use crate::embedded::transaction::{Edge, Node};
use crate::storage::StorageBackend;

#[cfg(feature = "lmdb")]
use sensibledb_db::sensibledb_engine::storage_core::NexusGraphStorage;
use sensibledb_db::sensibledb_engine::storage_core::SensibleGraphStorage;

pub struct LmdbStorage {
#[cfg(feature = "lmdb")]
storage: NexusGraphStorage,
storage: SensibleGraphStorage,
}

#[cfg(feature = "lmdb")]
Expand All @@ -18,7 +18,7 @@ impl LmdbStorage {
) -> Result<Self> {
let version_info =
sensibledb_db::sensibledb_engine::storage_core::version_info::VersionInfo::default();
let storage = NexusGraphStorage::new(path, config, version_info)
let storage = SensibleGraphStorage::new(path, config, version_info)
.map_err(|e| Error::Storage(e.to_string()))?;
Ok(Self { storage })
}
Expand Down
4 changes: 2 additions & 2 deletions sensibledb-db/src/sensibledb_engine/bm25/bm25.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::{
debug_println,
sensibledb_engine::{
storage_core::NexusGraphStorage,
storage_core::SensibleGraphStorage,
types::GraphError,
vector_core::{hnsw::HNSW, vector::HVector},
},
Expand Down Expand Up @@ -937,7 +937,7 @@ pub trait HybridSearch {
) -> impl std::future::Future<Output = Result<Vec<(u128, f32)>, GraphError>> + Send;
}

impl HybridSearch for NexusGraphStorage {
impl HybridSearch for SensibleGraphStorage {
async fn hybrid_search(
self,
query: &str,
Expand Down
Loading
Loading