How freshair129/genesisblock works
GenesisBlockDB is an embedded, local-first hybrid graph and vector database, also exposed as a REST server and through language, agent, and mobile bindings. The main workflow is a client submitting knowledge or a query, an interface dispatching it to the Rust engine, and the engine persisting or retrieving graph, vector, and temporal context. The README documents WAL durability, provenance primitives, and optional CRDT synchronization. Core internals are represented at the supported module level; detailed wiring for unsampled subsystems is not inferred.
Main entry points: lib.rs Storage engine · main.rs REST server · router.rs REST router · mod.rs HQL and Query IR
Components 22
Access interfaces
- Node binding
index.js - REST server
src/main.rs - REST router
src/router.rs - MCP server
mcp/server.js - Go SDK
genesisdb-go/client.go - Python SDK
genesisdb-python/genesisdb/client.py - Mobile bindings
react-native-genesisdb/src/index.ts
Query and retrieval
- HQL and Query IR
src/query/mod.rs - Query AST
src/query/ast.rs - Tiered context
src/lib.rs
Database engine
- Storage engine
src/lib.rs - Property graph
src/lib.rs - Vector search
src/lib.rs - Temporal history
src/lib.rs - Provenance primitives
src/lib.rs
Durable state
- WAL and recovery
src/lib.rs - SQLite projection
src/lib.rs - CRDT synchronization
src/lib.rs
Client applications
- Obsidian plugin
obsidian-plugin/main.ts - Mobile app
genesisblock-mobile/src/App.tsx - Studio graph explorer
studio/src/App.tsx
Other components
- Application or agent
Connections 27
- Application or agent → Node binding: opens embedded
- Application or agent → REST server: sends requests
- Application or agent → MCP server: invokes tools
- Application or agent → Go SDK: uses SDK
- Application or agent → Python SDK: uses SDK
- Node binding → Storage engine: calls engine
- REST server → Storage engine: opens store
- REST server → REST router: builds router
- REST router → Storage engine: dispatches operations
- REST router → HQL and Query IR: dispatches queries
- MCP server → Node binding: opens database
- Go SDK → REST server: HTTP requests
- Python SDK → REST server: HTTP requests
- Mobile bindings → REST server: connects to API
- HQL and Query IR → Query AST: parses queries
- HQL and Query IR → Storage engine: executes queries
- Storage engine → Property graph: manages graph
- Storage engine → Vector search: indexes vectors
- Storage engine → Temporal history: records history
- Storage engine → Provenance primitives: supports provenance
- Storage engine → WAL and recovery: journals writes
- Storage engine → SQLite projection: maintains projection
- Storage engine → CRDT synchronization: supports sync
- Storage engine → Tiered context: retrieves context
- Obsidian plugin → REST server: queries and writes
- Mobile app → Mobile bindings: uses binding
- Studio graph explorer → Storage engine: connects to backend