Sign inSign up

ice1x/drevo

By ice1x

Updated 1 day ago

Image
0

1.1K

ice1x/drevo repository overview

drevo

An embedded graph + vector database in a single file — Neo4j-compatible, with built-in full-text search, HNSW vector search, and an OpenAI-compatible embeddings proxy. No external services.

drevo is a self-contained graph database written in Rust. It stores everything in one redb file, speaks the Neo4j Bolt wire protocol and Cypher, and ships a Web UI, an HTTP API, BM25 full-text search, and vector search — all in one small container with zero external dependencies.


Features

  • Graph + vector in one engine — nodes, typed relationships, properties, and Value::Vector with an HNSW index for joint graph + semantic queries (RAG-ready).
  • Neo4j-compatible — a hand-written Cypher executor (CREATE/MATCH/MERGE/SET/DELETE/WHERE/WITH/UNWIND/FOREACH/aggregations/variable-length paths) served over the Bolt wire protocol, so cypher-shell and the official Neo4j drivers connect out of the box.
  • Full-text search — Okapi BM25 over a trigram index. Indexes node title/body, all string node properties, and relationship propertiesCALL fts.search(query, k) and CALL fts.searchRelationships(query, k).
  • OpenAI-compatible embeddings proxyPOST /v1/embeddings transparently forwards to your configured upstream (OpenAI / Voyage / any compatible endpoint). Opt-in and SSRF-safe: it answers 503 until configured.
  • Web UI — an interactive graph explorer at /ui.
  • Durable & portable — a version-stamped on-disk format; a single .redb file travels between a local session, a cloud worker, and a mobile app.

Quick start

docker run -d --name drevo \
  -p 8080:8080 \
  -p 7687:7687 \
  -v "$PWD/data:/data" \
  ice1x/drevo:latest

Connect with any Neo4j driver:

from neo4j import GraphDatabase
drv = GraphDatabase.driver("bolt://localhost:7687")
with drv.session() as s:
    s.run("CREATE (:Note {title:'hello', body:'first node'})")
    for r in s.run("CALL fts.search('hello', 5) YIELD node, score RETURN node.title, score"):
        print(r.values())

Data persistence

The database is a single file at /data/drevo.redb. Bind-mount /data (as above) to keep it on the host — it survives image upgrades, and the version-stamped format stays backward-compatible.

The container runs as a non-root user. If the bind-mounted folder is owned by your host user, run the container as that user so it can take redb's write lock:

docker run -d --name drevo \
  -p 8080:8080 -p 7687:7687 \
  -u "$(id -u):$(id -g)" \
  -v "$PWD/data:/data" \
  ice1x/drevo:latest

Configuration (environment variables)

VariableDefaultDescription
DREVO_HOST0.0.0.0HTTP bind address
DREVO_PORT8080HTTP API + Web UI port
DREVO_DATA_DIR/dataDirectory holding drevo.redb
DREVO_BOLT_PORT7687Bolt (Neo4j-compatible) port

Embeddings proxy (optional — enables POST /v1/embeddings; without these it returns 503):

VariableExampleDescription
DREVO_EMBEDDINGS_UPSTREAMhttps://api.openai.com/v1/embeddingsUpstream embeddings endpoint
DREVO_EMBEDDINGS_API_KEYsk-…Upstream API key (kept server-side; never exposed)
DREVO_EMBEDDINGS_MODELtext-embedding-3-smallDefault model when the request omits one
docker run -d --name drevo \
  -p 8080:8080 -p 7687:7687 \
  -v "$PWD/data:/data" \
  -e DREVO_EMBEDDINGS_UPSTREAM=https://api.openai.com/v1/embeddings \
  -e DREVO_EMBEDDINGS_MODEL=text-embedding-3-small \
  -e DREVO_EMBEDDINGS_API_KEY=sk-your-key \
  ice1x/drevo:latest

Tags

  • latest — the most recent release.
  • X.Y.Z (e.g. 0.0.3) — immutable, pinned versions.

Source & docs

GitHub: https://github.com/ice1x/drevo

Tag summary

Content type

Image

Digest

sha256:ff40d231e

Size

35 MB

Last updated

1 day ago

docker pull ice1x/drevo