|
1 | | -# NodeDB-Lite |
| 1 | +<div align="center"> |
2 | 2 |
|
3 | | -**All seven [NodeDB](https://github.com/NodeDB-Lab/nodedb) engines as an embedded library.** Vector search, graph traversal, documents, full-text search, timeseries, spatial, and key-value -- all in-process with sub-millisecond reads. No server required. CRDT-based offline-first sync to Origin when connectivity returns. |
| 3 | +<img src="assets/wordmark.svg" alt="NodeDB" width="420"> |
| 4 | + |
| 5 | +# NodeDB Lite |
| 6 | + |
| 7 | +<h3>The embedded multi-model database for local-first apps, agents, and edge runtimes.</h3> |
| 8 | + |
| 9 | +<p> |
| 10 | + <a href="https://github.com/NodeDB-Lab/nodedb">NodeDB</a> engines in-process. One API. |
| 11 | + Zero server requirement. Run vector search, graph traversal, document queries, full-text search, |
| 12 | + timeseries, and other multi-model workloads on device, then sync to Origin when connectivity returns. |
| 13 | +</p> |
| 14 | + |
| 15 | +<p> |
| 16 | + <a href="#status"><strong>Status</strong></a> |
| 17 | + · |
| 18 | + <a href="#platforms"><strong>Platforms</strong></a> |
| 19 | + · |
| 20 | + <a href="#crdt-sync"><strong>CRDT Sync</strong></a> |
| 21 | + · |
| 22 | + <a href="#performance"><strong>Performance</strong></a> |
| 23 | + · |
| 24 | + <a href="https://github.com/NodeDB-Lab/nodedb"><strong>NodeDB Origin</strong></a> |
| 25 | +</p> |
| 26 | + |
| 27 | +<p align="center"> |
| 28 | + <a href="https://discord.gg/s54gDMVc7B"> |
| 29 | + <img src="assets/discord-cta.svg" alt="Join the NodeDB Discord" width="340"> |
| 30 | + </a> |
| 31 | +</p> |
| 32 | + |
| 33 | +<p> |
| 34 | + <a href="https://github.com/NodeDB-Lab/nodedb-lite/actions/workflows/ci.yml"> |
| 35 | + <img src="https://img.shields.io/github/actions/workflow/status/NodeDB-Lab/nodedb-lite/ci.yml?branch=main&label=ci" alt="CI status"> |
| 36 | + </a> |
| 37 | + <img src="https://img.shields.io/badge/status-in%20development-orange" alt="Status: in development"> |
| 38 | + <a href="https://github.com/NodeDB-Lab/nodedb-lite/blob/main/LICENSE"> |
| 39 | + <img src="https://img.shields.io/badge/license-Apache--2.0-blue" alt="License"> |
| 40 | + </a> |
| 41 | + <a href="https://github.com/NodeDB-Lab/nodedb-lite/stargazers"> |
| 42 | + <img src="https://img.shields.io/github/stars/NodeDB-Lab/nodedb-lite?style=social" alt="GitHub stars"> |
| 43 | + </a> |
| 44 | +</p> |
| 45 | + |
| 46 | +</div> |
| 47 | + |
| 48 | +NodeDB Lite replaces the usual SQLite + vector sidecar + ad hoc cache + custom sync layer stack with one embedded engine. Local reads stay in-process, writes remain available offline, and the same application code can later sync to NodeDB Origin without a rewrite. |
| 49 | + |
| 50 | +## Status |
| 51 | + |
| 52 | +NodeDB Lite is currently in development and is not released yet. |
| 53 | + |
| 54 | +The immediate focus is NodeDB Origin through `v0.1.0`. Once Origin reaches `v0.1.0`, development focus shifts back to NodeDB Lite for packaging, platform hardening, and release work. |
| 55 | + |
| 56 | +Until then, this repository should be treated as active development, not a published/stable product. |
| 57 | + |
| 58 | +## Why NodeDB Lite |
| 59 | + |
| 60 | +- **One embedded engine, not a stitched-together client stack.** Vectors, graph, documents, full-text, timeseries, key-value, and other NodeDB data models run in one runtime with shared storage and one query surface. |
| 61 | +- **Built for offline-first.** Every write is captured as a CRDT delta locally, then merged to Origin when the network comes back. |
| 62 | +- **Same API as Origin.** The `NodeDb` trait is identical across Lite and server deployments, so moving from on-device to remote is a connection decision, not an architecture rewrite. |
| 63 | +- **Edge-ready.** Linux, macOS, Windows, Android, iOS, and browser/WASM support from the same product line. |
4 | 64 |
|
5 | 65 | ## When to Use |
6 | 66 |
|
|
21 | 81 | | iOS | `nodedb-lite-ffi` | redb + C FFI (cbindgen) | Native | |
22 | 82 | | Browser | `nodedb-lite-wasm` | redb (in-memory + OPFS) | ~4.5 MB | |
23 | 83 |
|
24 | | -## Install |
| 84 | +## Planned Packages |
| 85 | + |
| 86 | +NodeDB Lite is not published yet. The package names below reflect the intended release targets: |
25 | 87 |
|
26 | 88 | ```bash |
27 | | -# Rust |
| 89 | +# Rust (planned) |
28 | 90 | cargo add nodedb-lite |
29 | 91 |
|
30 | | -# JavaScript / TypeScript (WASM) |
| 92 | +# JavaScript / TypeScript (WASM, planned) |
31 | 93 | npm install @nodedb/lite |
32 | 94 | ``` |
33 | 95 |
|
34 | 96 | ## Quick Start |
35 | 97 |
|
| 98 | +API shape preview while the project is still in development: |
| 99 | + |
36 | 100 | ```rust |
37 | 101 | use nodedb_lite::NodeDbLite; |
38 | 102 | use nodedb_client::NodeDb; |
@@ -82,7 +146,7 @@ Converged: Device and cloud share identical Loro state hash |
82 | 146 |
|
83 | 147 | ## Key Features |
84 | 148 |
|
85 | | -- **All engines locally** -- Vector, graph, document, FTS, timeseries, spatial, KV -- all in-process, no network |
| 149 | +- **Multi-model locally** -- Vector, graph, document, full-text, timeseries, key-value, and more, all in-process with no network |
86 | 150 | - **Sub-millisecond reads** -- Hot data lives in memory indexes (HNSW, CSR, Loro) |
87 | 151 | - **Full SQL** -- Same SQL as Origin. Window functions, CTEs, subqueries, JOINs. |
88 | 152 | - **Encryption at rest** -- AES-256-GCM + Argon2id key derivation |
|
0 commit comments