@plures/pluresdb 1.6.10 โ 2.9.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +97 -289
- package/crates/README.md +99 -0
- package/crates/pluresdb-node/README.md +181 -0
- package/crates/pluresdb-node/index.d.ts +0 -0
- package/crates/pluresdb-node/index.js +265 -0
- package/crates/pluresdb-node/package.json +35 -0
- package/dist/napi/index.js +60 -0
- package/embedded.d.ts +1 -0
- package/embedded.js +46 -0
- package/package.json +20 -9
- package/dist/.tsbuildinfo +0 -1
- package/dist/better-sqlite3-shared.d.ts +0 -12
- package/dist/better-sqlite3-shared.d.ts.map +0 -1
- package/dist/better-sqlite3-shared.js +0 -143
- package/dist/better-sqlite3-shared.js.map +0 -1
- package/dist/better-sqlite3.d.ts +0 -4
- package/dist/better-sqlite3.d.ts.map +0 -1
- package/dist/better-sqlite3.js +0 -8
- package/dist/better-sqlite3.js.map +0 -1
- package/dist/cli.d.ts +0 -7
- package/dist/cli.d.ts.map +0 -1
- package/dist/cli.js.map +0 -1
- package/dist/local-first/unified-api.d.ts +0 -110
- package/dist/local-first/unified-api.d.ts.map +0 -1
- package/dist/local-first/unified-api.js +0 -348
- package/dist/local-first/unified-api.js.map +0 -1
- package/dist/node-index.d.ts +0 -150
- package/dist/node-index.d.ts.map +0 -1
- package/dist/node-index.js +0 -668
- package/dist/node-index.js.map +0 -1
- package/dist/node-wrapper.d.ts +0 -44
- package/dist/node-wrapper.d.ts.map +0 -1
- package/dist/node-wrapper.js +0 -296
- package/dist/node-wrapper.js.map +0 -1
- package/dist/types/index.d.ts +0 -28
- package/dist/types/index.d.ts.map +0 -1
- package/dist/types/index.js +0 -3
- package/dist/types/index.js.map +0 -1
- package/dist/types/node-types.d.ts +0 -71
- package/dist/types/node-types.d.ts.map +0 -1
- package/dist/types/node-types.js +0 -6
- package/dist/types/node-types.js.map +0 -1
- package/dist/util/debug.d.ts +0 -3
- package/dist/util/debug.d.ts.map +0 -1
- package/dist/util/debug.js +0 -34
- package/dist/util/debug.js.map +0 -1
- package/dist/vscode/extension.d.ts +0 -81
- package/dist/vscode/extension.d.ts.map +0 -1
- package/dist/vscode/extension.js +0 -309
- package/dist/vscode/extension.js.map +0 -1
- package/examples/basic-usage.d.ts +0 -2
- package/examples/basic-usage.d.ts.map +0 -1
- package/examples/basic-usage.js +0 -26
- package/examples/basic-usage.js.map +0 -1
- package/examples/basic-usage.ts +0 -29
- package/examples/browser-demo/README.md +0 -204
- package/examples/browser-demo/index.html +0 -466
- package/examples/browser-wasm-integration.md +0 -411
- package/examples/ipc-demo/README.md +0 -127
- package/examples/local-first-usage.ts +0 -138
- package/examples/native-ipc-integration.md +0 -526
- package/examples/tauri-demo/README.md +0 -240
- package/examples/tauri-integration.md +0 -260
- package/examples/vscode-extension-example/README.md +0 -95
- package/examples/vscode-extension-example/package.json +0 -49
- package/examples/vscode-extension-example/src/extension.ts +0 -172
- package/examples/vscode-extension-example/tsconfig.json +0 -12
- package/examples/vscode-extension-integration.d.ts +0 -31
- package/examples/vscode-extension-integration.d.ts.map +0 -1
- package/examples/vscode-extension-integration.js +0 -319
- package/examples/vscode-extension-integration.js.map +0 -1
- package/examples/vscode-extension-integration.ts +0 -41
- package/legacy/benchmarks/memory-benchmarks.ts +0 -350
- package/legacy/benchmarks/run-benchmarks.ts +0 -315
- package/legacy/better-sqlite3-shared.ts +0 -157
- package/legacy/better-sqlite3.ts +0 -4
- package/legacy/cli.ts +0 -241
- package/legacy/config.ts +0 -50
- package/legacy/core/crdt.ts +0 -107
- package/legacy/core/database.ts +0 -529
- package/legacy/healthcheck.ts +0 -162
- package/legacy/http/api-server.ts +0 -569
- package/legacy/index.ts +0 -31
- package/legacy/local-first/unified-api.ts +0 -449
- package/legacy/logic/rules.ts +0 -46
- package/legacy/main.rs +0 -3
- package/legacy/main.ts +0 -197
- package/legacy/network/websocket-server.ts +0 -115
- package/legacy/node-index.ts +0 -827
- package/legacy/node-wrapper.ts +0 -329
- package/legacy/plugins/README.md +0 -181
- package/legacy/plugins/example-embedding-plugin.ts +0 -56
- package/legacy/plugins/plugin-system.ts +0 -315
- package/legacy/sqlite-compat.ts +0 -633
- package/legacy/sqlite3-compat.ts +0 -55
- package/legacy/storage/kv-storage.ts +0 -73
- package/legacy/tests/core.test.ts +0 -305
- package/legacy/tests/fixtures/performance-data.json +0 -71
- package/legacy/tests/fixtures/test-data.json +0 -129
- package/legacy/tests/integration/api-server.test.ts +0 -334
- package/legacy/tests/integration/mesh-network.test.ts +0 -303
- package/legacy/tests/logic.test.ts +0 -34
- package/legacy/tests/performance/load.test.ts +0 -290
- package/legacy/tests/security/input-validation.test.ts +0 -286
- package/legacy/tests/unit/core.test.ts +0 -226
- package/legacy/tests/unit/local-first-api.test.ts +0 -65
- package/legacy/tests/unit/plugin-system.test.ts +0 -388
- package/legacy/tests/unit/subscriptions.test.ts +0 -135
- package/legacy/tests/unit/vector-search.test.ts +0 -173
- package/legacy/tests/vscode_extension_test.ts +0 -281
- package/legacy/types/index.ts +0 -32
- package/legacy/types/node-types.ts +0 -80
- package/legacy/util/debug.ts +0 -27
- package/legacy/vector/index.ts +0 -59
- package/legacy/vscode/extension.ts +0 -387
- package/scripts/compiled-crud-verify.ts +0 -30
- package/scripts/dogfood.ts +0 -297
- package/scripts/postinstall.js +0 -156
- package/scripts/publish-crates.sh +0 -95
- package/scripts/release-check.js +0 -224
- package/scripts/run-tests.ts +0 -178
- package/scripts/setup-libclang.ps1 +0 -209
- package/scripts/update-changelog.js +0 -214
- package/scripts/validate-npm-publish.js +0 -228
- package/web/README.md +0 -27
- package/web/svelte/package.json +0 -31
package/README.md
CHANGED
|
@@ -5,329 +5,137 @@
|
|
|
5
5
|
[](https://deno.land)
|
|
6
6
|
[](https://opensource.org/licenses/AGPL-3.0)
|
|
7
7
|
|
|
8
|
-
**Local-First Graph Database
|
|
8
|
+
**Local-First P2P Graph Database โ v2.0**
|
|
9
9
|
|
|
10
|
-
PluresDB is a CRDT-based graph database
|
|
10
|
+
PluresDB is a CRDT-based graph database built with Rust and TypeScript. It
|
|
11
|
+
provides a native sled-backed storage layer with CRDT conflict resolution,
|
|
12
|
+
vector search, and P2P synchronisation โ ideal for desktop apps, VSCode
|
|
13
|
+
extensions, and personal knowledge management.
|
|
11
14
|
|
|
12
|
-
>
|
|
15
|
+
> **v2.0 breaking change:** The `rusqlite` dependency has been removed from
|
|
16
|
+
> `pluresdb-core` by default. `CrdtStore::with_persistence()` now accepts
|
|
17
|
+
> `Arc<dyn StorageEngine>` instead of `Arc<Database>`. If you need the legacy
|
|
18
|
+
> SQL layer, enable the `sqlite-compat` Cargo feature. See
|
|
19
|
+
> [MIGRATION.md](MIGRATION.md) for upgrade instructions.
|
|
13
20
|
|
|
14
|
-
##
|
|
15
|
-
|
|
16
|
-
### Install
|
|
21
|
+
## Install
|
|
17
22
|
|
|
18
23
|
```bash
|
|
19
|
-
# Node.js
|
|
20
|
-
npm install pluresdb
|
|
24
|
+
# Node.js
|
|
25
|
+
npm install @plures/pluresdb
|
|
21
26
|
|
|
22
27
|
# Deno
|
|
23
28
|
deno add @plures/pluresdb
|
|
24
29
|
|
|
25
30
|
# Rust
|
|
26
|
-
cargo add pluresdb-core
|
|
31
|
+
cargo add pluresdb-core
|
|
32
|
+
|
|
33
|
+
# CLI
|
|
34
|
+
cargo install pluresdb-cli
|
|
27
35
|
|
|
28
|
-
# Windows
|
|
36
|
+
# Windows
|
|
29
37
|
winget install pluresdb.pluresdb
|
|
30
38
|
|
|
31
39
|
# Docker
|
|
32
40
|
docker pull pluresdb/pluresdb:latest
|
|
33
41
|
```
|
|
34
42
|
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
```typescript
|
|
38
|
-
import { PluresNode, SQLiteCompatibleAPI } from "pluresdb";
|
|
39
|
-
|
|
40
|
-
// Start the database
|
|
41
|
-
const db = new PluresNode({
|
|
42
|
-
config: { port: 34567, dataDir: "./data" },
|
|
43
|
-
autoStart: true
|
|
44
|
-
});
|
|
45
|
-
|
|
46
|
-
// Use SQLite-compatible API
|
|
47
|
-
const sqlite = new SQLiteCompatibleAPI();
|
|
48
|
-
|
|
49
|
-
// Create tables
|
|
50
|
-
await sqlite.exec(`
|
|
51
|
-
CREATE TABLE users (id INTEGER PRIMARY KEY, name TEXT, email TEXT)
|
|
52
|
-
`);
|
|
53
|
-
|
|
54
|
-
// Insert data
|
|
55
|
-
await sqlite.run(
|
|
56
|
-
"INSERT INTO users (name, email) VALUES (?, ?)",
|
|
57
|
-
["Alice", "alice@example.com"]
|
|
58
|
-
);
|
|
59
|
-
|
|
60
|
-
// Query data
|
|
61
|
-
const users = await sqlite.all("SELECT * FROM users");
|
|
62
|
-
|
|
63
|
-
// Vector search
|
|
64
|
-
const results = await sqlite.vectorSearch("machine learning", 10);
|
|
65
|
-
```
|
|
66
|
-
|
|
67
|
-
## ๐ฏ What PluresDB Does
|
|
68
|
-
|
|
69
|
-
### Core Capabilities
|
|
70
|
-
|
|
71
|
-
- **SQLite Compatibility**: Drop in for SQLite with 95% API compatibility
|
|
72
|
-
- **Graph Relationships**: Store and query connected data with CRDT conflict resolution
|
|
73
|
-
- **Vector Search**: Semantic similarity search with HNSW indexing
|
|
74
|
-
- **Local-First**: Runs entirely on your machine, syncs when you want
|
|
75
|
-
- **P2P Sync**: Encrypted data sharing across devices without servers
|
|
76
|
-
- **Web UI**: 24-tab management interface for data exploration
|
|
77
|
-
|
|
78
|
-
### Built For
|
|
79
|
-
|
|
80
|
-
- **Desktop Applications**: Embedded database with graph and vector capabilities
|
|
81
|
-
- **VSCode Extensions**: SQLite-compatible storage with enhanced features
|
|
82
|
-
- **Knowledge Management**: Personal wikis, note-taking, research databases
|
|
83
|
-
- **Offline-First Apps**: Full functionality without network connectivity
|
|
84
|
-
- **Prototyping**: Quick database setup with TypeScript/Rust support
|
|
85
|
-
|
|
86
|
-
## ๐ How to Use PluresDB
|
|
87
|
-
|
|
88
|
-
### For Node.js Applications
|
|
89
|
-
|
|
90
|
-
```typescript
|
|
91
|
-
import { SQLiteCompatibleAPI } from "pluresdb";
|
|
92
|
-
|
|
93
|
-
const db = new SQLiteCompatibleAPI({
|
|
94
|
-
config: { dataDir: "./data" }
|
|
95
|
-
});
|
|
96
|
-
|
|
97
|
-
// Use familiar SQLite methods
|
|
98
|
-
await db.exec("CREATE TABLE ...");
|
|
99
|
-
await db.run("INSERT INTO ...", params);
|
|
100
|
-
const rows = await db.all("SELECT ...");
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
### For Deno Applications
|
|
104
|
-
|
|
105
|
-
```typescript
|
|
106
|
-
import { GunDB, startApiServer } from "jsr:@plures/pluresdb";
|
|
107
|
-
|
|
108
|
-
const db = new GunDB();
|
|
109
|
-
await db.ready();
|
|
110
|
-
|
|
111
|
-
db.serve({ port: 34567 });
|
|
112
|
-
const api = startApiServer({ port: 8080, db });
|
|
113
|
-
|
|
114
|
-
await db.put("user:alice", { name: "Alice" });
|
|
115
|
-
const user = await db.get("user:alice");
|
|
116
|
-
```
|
|
117
|
-
|
|
118
|
-
### For Rust Applications
|
|
43
|
+
## Quick Example
|
|
119
44
|
|
|
120
45
|
```rust
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
46
|
+
// Rust
|
|
47
|
+
use pluresdb_core::CrdtStore;
|
|
48
|
+
use pluresdb_storage::{MemoryStorage, StorageEngine};
|
|
49
|
+
use serde_json::json;
|
|
50
|
+
use std::sync::Arc;
|
|
51
|
+
|
|
52
|
+
let storage = Arc::new(MemoryStorage::default());
|
|
53
|
+
let store = CrdtStore::default()
|
|
54
|
+
.with_persistence(storage as Arc<dyn StorageEngine>);
|
|
55
|
+
|
|
56
|
+
store.put("user:1", "actor-a", json!({ "name": "Alice" }));
|
|
57
|
+
let record = store.get("user:1");
|
|
130
58
|
```
|
|
131
59
|
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
// Vector search
|
|
181
|
-
await sqlite.vectorSearch(query, limit); // Semantic search
|
|
182
|
-
```
|
|
183
|
-
|
|
184
|
-
### better-sqlite3-Compatible API
|
|
185
|
-
|
|
186
|
-
For synchronous-style ergonomics:
|
|
187
|
-
|
|
188
|
-
```typescript
|
|
189
|
-
import Database from "pluresdb/better-sqlite3";
|
|
190
|
-
|
|
191
|
-
const db = await new Database("./data.db", { autoStart: true }).open();
|
|
192
|
-
|
|
193
|
-
const insert = db.prepare("INSERT INTO users (name) VALUES (?)");
|
|
194
|
-
await insert.run("Ada Lovelace");
|
|
195
|
-
|
|
196
|
-
const select = db.prepare("SELECT * FROM users");
|
|
197
|
-
const users = await select.all();
|
|
198
|
-
```
|
|
199
|
-
|
|
200
|
-
### REST API
|
|
60
|
+
## Features
|
|
61
|
+
|
|
62
|
+
- **CRDT Store** โ conflict-free replicated data with vector clocks
|
|
63
|
+
- **Native Storage** โ sled-backed persistence (WAL, encryption, replay)
|
|
64
|
+
- **Vector Search** โ approximate nearest-neighbour via HNSW (cosine similarity)
|
|
65
|
+
- **Auto-Embedding** โ pluggable `EmbedText` trait; `FastEmbedder` for local ONNX models
|
|
66
|
+
- **P2P Sync** โ Hyperswarm DHT or WebSocket relay, end-to-end encrypted
|
|
67
|
+
- **Local-First** โ full functionality offline; sync is opt-in
|
|
68
|
+
- **Multi-Platform** โ Node.js (N-API), Deno (JSR), Rust, CLI, Docker, WASM
|
|
69
|
+
- **SQLite optional** โ legacy SQL layer via `sqlite-compat` feature flag
|
|
70
|
+
|
|
71
|
+
## Documentation
|
|
72
|
+
|
|
73
|
+
| Document | Description |
|
|
74
|
+
|---|---|
|
|
75
|
+
| [docs/GETTING_STARTED.md](docs/GETTING_STARTED.md) | Quick start for Node.js, Deno, Rust, CLI, Docker, Windows |
|
|
76
|
+
| [docs/API.md](docs/API.md) | Complete API reference (Rust, Node.js, Deno, REST, CLI) |
|
|
77
|
+
| [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) | Internals: CRDTs, storage, HNSW, P2P protocol |
|
|
78
|
+
| [docs/WINDOWS_GETTING_STARTED.md](docs/WINDOWS_GETTING_STARTED.md) | Windows-specific setup guide |
|
|
79
|
+
| [docs/HYPERSWARM_SYNC.md](docs/HYPERSWARM_SYNC.md) | P2P sync deep-dive |
|
|
80
|
+
| [docs/SYNC_TRANSPORT.md](docs/SYNC_TRANSPORT.md) | Relay transport for corporate networks |
|
|
81
|
+
| [docs/LOCAL_FIRST_INTEGRATION.md](docs/LOCAL_FIRST_INTEGRATION.md) | WASM, Tauri, IPC integration guides |
|
|
82
|
+
| [docs/TESTING.md](docs/TESTING.md) | Test suite and CI notes |
|
|
83
|
+
| [MIGRATION.md](MIGRATION.md) | Upgrade guide: v1.x โ v2.0 |
|
|
84
|
+
| [CONTRIBUTING.md](CONTRIBUTING.md) | Contribution guide |
|
|
85
|
+
| [CHANGELOG.md](CHANGELOG.md) | Release history |
|
|
86
|
+
| [SECURITY.md](SECURITY.md) | Security policy |
|
|
87
|
+
|
|
88
|
+
## Architecture
|
|
89
|
+
|
|
90
|
+
PluresDB is a Rust-first monorepo:
|
|
91
|
+
|
|
92
|
+
| Crate | Responsibility |
|
|
93
|
+
|---|---|
|
|
94
|
+
| `pluresdb-core` | CRDT store, HNSW vector index, `EmbedText` trait; SQLite optional via `sqlite-compat` |
|
|
95
|
+
| `pluresdb-storage` | Pluggable backends: Sled (WAL, encryption), in-memory |
|
|
96
|
+
| `pluresdb-sync` | `SyncBroadcaster`, `Transport` trait, Hyperswarm / relay / disabled |
|
|
97
|
+
| `pluresdb-cli` | `pluresdb` binary |
|
|
98
|
+
| `pluresdb-node` | N-API bindings for Node.js |
|
|
99
|
+
| `pluresdb-deno` | Deno FFI bindings |
|
|
100
|
+
| `pluresdb-wasm` | `wasm-bindgen` bindings for browsers |
|
|
101
|
+
| `pluresdb-ipc` | Shared-memory IPC server/client |
|
|
102
|
+
| `legacy/` | TypeScript layer (being replaced by Rust crates) |
|
|
103
|
+
|
|
104
|
+
See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for a full description with
|
|
105
|
+
data-flow diagrams.
|
|
106
|
+
|
|
107
|
+
## Testing
|
|
201
108
|
|
|
202
109
|
```bash
|
|
203
|
-
#
|
|
204
|
-
|
|
205
|
-
-H "Content-Type: application/json" \
|
|
206
|
-
-d '{"id": "user:1", "data": {"name": "Alice"}}'
|
|
207
|
-
|
|
208
|
-
# Retrieve node
|
|
209
|
-
curl http://localhost:34567/api/get?id=user:1
|
|
210
|
-
|
|
211
|
-
# Delete node
|
|
212
|
-
curl -X DELETE http://localhost:34567/api/delete?id=user:1
|
|
213
|
-
|
|
214
|
-
# List all nodes
|
|
215
|
-
curl http://localhost:34567/api/list
|
|
216
|
-
|
|
217
|
-
# Vector search
|
|
218
|
-
curl -X POST http://localhost:34567/api/search \
|
|
219
|
-
-H "Content-Type: application/json" \
|
|
220
|
-
-d '{"query": "machine learning", "limit": 10}'
|
|
221
|
-
```
|
|
222
|
-
|
|
223
|
-
### Local-First APIs
|
|
224
|
-
|
|
225
|
-
PluresDB provides production-ready Rust implementations for local-first integration:
|
|
226
|
-
|
|
227
|
-
**WASM (Browser)** - Rust implementation complete, use directly:
|
|
228
|
-
```javascript
|
|
229
|
-
// Via wasm-bindgen (compile from source)
|
|
230
|
-
import { PluresDBBrowser } from "./pluresdb-wasm/pkg";
|
|
231
|
-
const db = new PluresDBBrowser("my-app");
|
|
232
|
-
await db.init_persistence();
|
|
233
|
-
await db.put("user:1", { name: "Alice" });
|
|
234
|
-
```
|
|
235
|
-
|
|
236
|
-
**Tauri (Desktop Apps)**
|
|
237
|
-
```rust
|
|
238
|
-
#[tauri::command]
|
|
239
|
-
async fn db_put(state: State<'_, AppState>, id: String, data: Value) -> Result<String> {
|
|
240
|
-
state.db.lock().put(id, data)
|
|
241
|
-
}
|
|
242
|
-
```
|
|
243
|
-
|
|
244
|
-
**IPC (Native Apps)**
|
|
245
|
-
```rust
|
|
246
|
-
let mut server = IPCServer::new("my-app", store)?;
|
|
247
|
-
server.start()?;
|
|
248
|
-
// Client connects via shared memory
|
|
110
|
+
npm run verify # TypeScript build + all Deno tests
|
|
111
|
+
cargo test --workspace # Rust tests
|
|
249
112
|
```
|
|
250
113
|
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
## ๐๏ธ Architecture
|
|
254
|
-
|
|
255
|
-
PluresDB is built as a Rust-first monorepo:
|
|
256
|
-
|
|
257
|
-
- **`crates/pluresdb-core`**: CRDT storage engine
|
|
258
|
-
- **`crates/pluresdb-storage`**: Storage backends (Sled, SQLite, RocksDB)
|
|
259
|
-
- **`crates/pluresdb-sync`**: P2P synchronization
|
|
260
|
-
- **`crates/pluresdb-cli`**: Command-line interface
|
|
261
|
-
- **`crates/pluresdb-wasm`**: WebAssembly bindings
|
|
262
|
-
- **`crates/pluresdb-ipc`**: IPC shared memory
|
|
263
|
-
- **`legacy/`**: TypeScript/Node.js/Deno implementations
|
|
264
|
-
- **`web/svelte/`**: Web UI components
|
|
265
|
-
|
|
266
|
-
## ๐ฆ Distribution
|
|
267
|
-
|
|
268
|
-
PluresDB is available through multiple channels:
|
|
269
|
-
|
|
270
|
-
- **npm**: [`pluresdb`](https://www.npmjs.com/package/pluresdb) - Node.js package
|
|
271
|
-
- **JSR**: [`@plures/pluresdb`](https://jsr.io/@plures/pluresdb) - Deno module
|
|
272
|
-
- **crates.io**: Rust crates ([pluresdb-core](https://crates.io/crates/pluresdb-core), [pluresdb-storage](https://crates.io/crates/pluresdb-storage), [pluresdb-sync](https://crates.io/crates/pluresdb-sync))
|
|
273
|
-
- **Winget**: `pluresdb.pluresdb` - Windows package manager
|
|
274
|
-
- **Docker Hub**: [`pluresdb/pluresdb`](https://hub.docker.com/r/pluresdb/pluresdb) - Container images
|
|
275
|
-
- **GitHub Releases**: Pre-built binaries for Windows, macOS, Linux
|
|
276
|
-
|
|
277
|
-
## ๐ Security
|
|
278
|
-
|
|
279
|
-
PluresDB implements comprehensive security measures:
|
|
280
|
-
|
|
281
|
-
- **Input Validation**: All user inputs are validated and sanitized
|
|
282
|
-
- **Prototype Pollution Protection**: Safe object handling
|
|
283
|
-
- **Audit Logging**: Complete operation logs
|
|
284
|
-
- **Local Storage**: Data stays on your machine by default
|
|
285
|
-
- **End-to-End Encryption**: Secure P2P synchronization
|
|
286
|
-
- **AGPL v3 License**: Ensures modifications remain open source
|
|
114
|
+
Network-dependent Hyperswarm tests are skipped automatically in CI.
|
|
115
|
+
See [docs/TESTING.md](docs/TESTING.md) for details.
|
|
287
116
|
|
|
288
|
-
|
|
117
|
+
## Distribution
|
|
289
118
|
|
|
290
|
-
|
|
119
|
+
- **npm**: [`pluresdb`](https://www.npmjs.com/package/pluresdb)
|
|
120
|
+
- **JSR**: [`@plures/pluresdb`](https://jsr.io/@plures/pluresdb)
|
|
121
|
+
- **crates.io**: [`pluresdb-core`](https://crates.io/crates/pluresdb-core), [`pluresdb-sync`](https://crates.io/crates/pluresdb-sync)
|
|
122
|
+
- **Winget**: `pluresdb.pluresdb`
|
|
123
|
+
- **Docker**: [`pluresdb/pluresdb`](https://hub.docker.com/r/pluresdb/pluresdb)
|
|
124
|
+
- **GitHub Releases**: pre-built binaries for Windows, macOS, Linux
|
|
291
125
|
|
|
292
|
-
|
|
293
|
-
- **Vector Search**: HNSW-based similarity search
|
|
294
|
-
- **Storage Backends**: Sled, SQLite, or RocksDB
|
|
295
|
-
- **Local Operations**: ~5-10ms REST API latency
|
|
296
|
-
- **Zero Network**: Full functionality without internet
|
|
126
|
+
## Security
|
|
297
127
|
|
|
298
|
-
|
|
128
|
+
All inputs are validated and sanitised. P2P communications are end-to-end
|
|
129
|
+
encrypted. Report vulnerabilities privately โ see [SECURITY.md](SECURITY.md).
|
|
299
130
|
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
```bash
|
|
303
|
-
npm run verify
|
|
304
|
-
```
|
|
305
|
-
|
|
306
|
-
This executes TypeScript compilation and all Deno test suites (unit, integration, performance, security).
|
|
307
|
-
|
|
308
|
-
## ๐ Documentation
|
|
309
|
-
|
|
310
|
-
- [Windows Getting Started Guide](docs/WINDOWS_GETTING_STARTED.md)
|
|
311
|
-
- [Local-First Integration](docs/LOCAL_FIRST_INTEGRATION.md)
|
|
312
|
-
- [VSCode Extension Example](examples/vscode-extension-integration.ts)
|
|
313
|
-
- [Contributing Guide](CONTRIBUTING.md)
|
|
314
|
-
- [CHANGELOG](CHANGELOG.md)
|
|
315
|
-
|
|
316
|
-
## ๐ค Contributing
|
|
317
|
-
|
|
318
|
-
Contributions are welcome! See [CONTRIBUTING.md](CONTRIBUTING.md) for guidelines.
|
|
131
|
+
## Contributing
|
|
319
132
|
|
|
133
|
+
Contributions are welcome. See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
320
134
|
All contributions are licensed under AGPL v3.
|
|
321
135
|
|
|
322
|
-
##
|
|
323
|
-
|
|
324
|
-
GNU Affero General Public License v3.0 (AGPL v3). See [LICENSE](LICENSE) for details.
|
|
325
|
-
|
|
326
|
-
## ๐ Support
|
|
136
|
+
## License
|
|
327
137
|
|
|
328
|
-
|
|
329
|
-
- **Discussions**: [GitHub Discussions](https://github.com/plures/pluresdb/discussions)
|
|
330
|
-
- **Security**: [Security Policy](SECURITY.md)
|
|
138
|
+
GNU Affero General Public License v3.0. See [LICENSE](LICENSE).
|
|
331
139
|
|
|
332
140
|
---
|
|
333
141
|
|
package/crates/README.md
ADDED
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
# PluresDB Rust Crates
|
|
2
|
+
|
|
3
|
+
This directory contains all Rust crates for the PluresDB project.
|
|
4
|
+
|
|
5
|
+
## Crates Overview
|
|
6
|
+
|
|
7
|
+
### Main Library Crate (Recommended)
|
|
8
|
+
|
|
9
|
+
- **pluresdb** - Unified main crate that re-exports all core functionality
|
|
10
|
+
|
|
11
|
+
### Core Crates
|
|
12
|
+
|
|
13
|
+
- **pluresdb-core** - Core CRDTs, data structures, and query primitives
|
|
14
|
+
- **pluresdb-sync** - Sync orchestration primitives for PluresDB peers
|
|
15
|
+
- **pluresdb-storage** - Storage abstraction layer with multiple backends
|
|
16
|
+
|
|
17
|
+
### Application Crates
|
|
18
|
+
|
|
19
|
+
- **pluresdb-cli** - Command-line interface for managing PluresDB nodes
|
|
20
|
+
|
|
21
|
+
### Bindings
|
|
22
|
+
|
|
23
|
+
- **pluresdb-node** - Node.js bindings using N-API
|
|
24
|
+
- **pluresdb-deno** - Deno bindings using deno_bindgen FFI
|
|
25
|
+
|
|
26
|
+
## Status
|
|
27
|
+
|
|
28
|
+
| Crate | Status | Registry |
|
|
29
|
+
|-------|--------|----------|
|
|
30
|
+
| pluresdb | โ
Ready | crates.io |
|
|
31
|
+
| pluresdb-core | โ
Published | crates.io |
|
|
32
|
+
| pluresdb-sync | โ
Published | crates.io |
|
|
33
|
+
| pluresdb-storage | โ
Ready | crates.io |
|
|
34
|
+
| pluresdb-cli | โ
Ready | crates.io |
|
|
35
|
+
| pluresdb-node | โ
Ready | npm |
|
|
36
|
+
| pluresdb-deno | โ
Ready | JSR |
|
|
37
|
+
|
|
38
|
+
## Quick Start
|
|
39
|
+
|
|
40
|
+
### Installing Rust Crates
|
|
41
|
+
|
|
42
|
+
```bash
|
|
43
|
+
# Install CLI
|
|
44
|
+
cargo install pluresdb-cli
|
|
45
|
+
|
|
46
|
+
# Add main crate to your project (recommended)
|
|
47
|
+
cargo add pluresdb
|
|
48
|
+
|
|
49
|
+
# Or add individual crates if you prefer
|
|
50
|
+
cargo add pluresdb-core
|
|
51
|
+
cargo add pluresdb-storage
|
|
52
|
+
cargo add pluresdb-sync
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
### Installing Node.js Bindings
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
npm install @plures/pluresdb-native
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Installing Deno Bindings
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
deno add jsr:@plures/pluresdb
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
## Building from Source
|
|
68
|
+
|
|
69
|
+
```bash
|
|
70
|
+
# Build all crates
|
|
71
|
+
cargo build --workspace --release
|
|
72
|
+
|
|
73
|
+
# Build specific crate
|
|
74
|
+
cargo build -p pluresdb-cli --release
|
|
75
|
+
|
|
76
|
+
# Run tests
|
|
77
|
+
cargo test --workspace
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## Publishing
|
|
81
|
+
|
|
82
|
+
See [PUBLISHING_GUIDE.md](./PUBLISHING_GUIDE.md) for detailed publishing instructions.
|
|
83
|
+
|
|
84
|
+
## Documentation
|
|
85
|
+
|
|
86
|
+
- [Crate Organization](./CRATE_ORGANIZATION.md) - Guide to choosing the right crate
|
|
87
|
+
- [Implementation Status](./IMPLEMENTATION_STATUS.md)
|
|
88
|
+
- [Completion Summary](./COMPLETION_SUMMARY.md)
|
|
89
|
+
- [Publishing Guide](./PUBLISHING_GUIDE.md)
|
|
90
|
+
- [Next Steps](./NEXT_STEPS.md)
|
|
91
|
+
|
|
92
|
+
## Version
|
|
93
|
+
|
|
94
|
+
All crates use the workspace version: **1.4.2**
|
|
95
|
+
|
|
96
|
+
## License
|
|
97
|
+
|
|
98
|
+
AGPL-3.0
|
|
99
|
+
|