An open API service indexing awesome lists of open source software.

https://github.com/nexepic/zyx

High-performance, embeddable graph database engine with Cypher queries, ACID transactions, vector search, and WebAssembly support
https://github.com/nexepic/zyx

cross-platform database embedded graph graph-database high-performance serverless

Last synced: 27 days ago
JSON representation

High-performance, embeddable graph database engine with Cypher queries, ACID transactions, vector search, and WebAssembly support

Awesome Lists containing this project

README

          







ZYX Logo






Embeddable Graph Database Engine


ACID-compliant graph database with Cypher queries, vector search, and graph algorithms — embeds anywhere from CLI to browser.



Build Status


codecov


License: Apache 2.0


C++


Docs

---

## Try It

```
$ zyx database create ./movies.zyx

ZYX Graph Database v0.1.0
Connected to: ./movies.zyx
Type help for commands, exit to quit.
```

Create nodes and relationships:
```
ZYX> CREATE (m:Movie {title: 'The Matrix', year: 1999}),
··· (a:Actor {name: 'Keanu Reeves'}),
··· (a)-[:ACTED_IN {role: 'Neo'}]->(m);
(0 rows, 1.23ms)
```

Query with pattern matching:
```
ZYX> MATCH (a:Actor)-[r:ACTED_IN]->(m:Movie)
··· RETURN a.name AS actor, m.title AS movie, r.role AS role;
┌────────────────┬────────────┬──────┐
│ actor │ movie │ role │
├────────────────┼────────────┼──────┤
│ Keanu Reeves │ The Matrix │ Neo │
└────────────────┴────────────┴──────┘
(1 row, 0.85ms)
```

Aggregation:
```
ZYX> MATCH (n) RETURN count(n) AS total_nodes;
┌─────────────┐
│ total_nodes │
├─────────────┤
│ 2 │
└─────────────┘
(1 row, 0.42ms)
```

Or try it in the browser — [**Live Playground**](https://nexepic.github.io/zyx/en/playground) (no install required, runs via WebAssembly).

## Highlights

- **Cypher Query Engine** — `MATCH`, `CREATE`, `MERGE`, `WITH`, `UNION`, `UNWIND`, `CALL`, `LOAD CSV`
- **ACID Transactions** — Write-ahead logging, crash recovery, snapshot isolation
- **Vector Search** — HNSW index with cosine/euclidean/dot-product similarity
- **Graph Algorithms** — PageRank, shortest path, community detection via built-in procedures
- **Schema & Indexes** — Label indexes, property indexes, uniqueness constraints
- **Embeddable** — C++ header-only API, C API, Python bindings (`zyxdb`), and WebAssembly
- **Cross-Platform** — macOS, Linux, Windows

## Quick Start

### Install

**macOS** (Homebrew):

```bash
brew tap nexepic/zyx
brew install zyx
```

**Linux / Windows**: Download a pre-built binary from [Releases](https://github.com/nexepic/zyx/releases).

**Build from source** (all platforms):

```bash
./scripts/run_tests.sh # Full build + tests + coverage
./scripts/build_release.sh # Release build only
```

Prerequisites: C++20 compiler (Clang 14+ / GCC 11+), CMake 3.21+, Ninja, Conan 2.x, Python 3.10+

### Use

```bash
zyx database create ./mydb.zyx # Create new database
zyx database open ./mydb.zyx # Open existing database
zyx database exec ./mydb.zyx q.cql # Execute a Cypher script
zyx import --database ./mydb.zyx \
--nodes nodes.csv \
--relationships rels.csv # Bulk CSV/JSONL import
```

### Embed

**C++**
```cpp
#include

zyx::Database db("./mydb.zyx");
db.open();
auto result = db.query("MATCH (n) RETURN n.name LIMIT 5");
db.close();
```

**Python**
```python
import zyxdb

db = zyxdb.Database("./mydb.zyx")
db.open()
result = db.execute("MATCH (n) RETURN n.name LIMIT 5")
db.close()
```

## Documentation

Full docs with architecture deep-dives, API reference, and algorithm guides:

**[nexepic.github.io/zyx](https://nexepic.github.io/zyx)**

- [User Guide](https://nexepic.github.io/zyx/docs/zyx/user-guide/quick-start)
- [API Reference](https://nexepic.github.io/zyx/docs/zyx/api/cpp-api)
- [Architecture](https://nexepic.github.io/zyx/docs/zyx/architecture/overview)
- [Contributing](CONTRIBUTING.md)

Feature support details: [`UNSUPPORTED_CYPHER_FEATURES.md`](UNSUPPORTED_CYPHER_FEATURES.md)

## License

Apache License 2.0. See [`LICENSE`](LICENSE).