@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.
Files changed (126) hide show
  1. package/README.md +97 -289
  2. package/crates/README.md +99 -0
  3. package/crates/pluresdb-node/README.md +181 -0
  4. package/crates/pluresdb-node/index.d.ts +0 -0
  5. package/crates/pluresdb-node/index.js +265 -0
  6. package/crates/pluresdb-node/package.json +35 -0
  7. package/dist/napi/index.js +60 -0
  8. package/embedded.d.ts +1 -0
  9. package/embedded.js +46 -0
  10. package/package.json +20 -9
  11. package/dist/.tsbuildinfo +0 -1
  12. package/dist/better-sqlite3-shared.d.ts +0 -12
  13. package/dist/better-sqlite3-shared.d.ts.map +0 -1
  14. package/dist/better-sqlite3-shared.js +0 -143
  15. package/dist/better-sqlite3-shared.js.map +0 -1
  16. package/dist/better-sqlite3.d.ts +0 -4
  17. package/dist/better-sqlite3.d.ts.map +0 -1
  18. package/dist/better-sqlite3.js +0 -8
  19. package/dist/better-sqlite3.js.map +0 -1
  20. package/dist/cli.d.ts +0 -7
  21. package/dist/cli.d.ts.map +0 -1
  22. package/dist/cli.js.map +0 -1
  23. package/dist/local-first/unified-api.d.ts +0 -110
  24. package/dist/local-first/unified-api.d.ts.map +0 -1
  25. package/dist/local-first/unified-api.js +0 -348
  26. package/dist/local-first/unified-api.js.map +0 -1
  27. package/dist/node-index.d.ts +0 -150
  28. package/dist/node-index.d.ts.map +0 -1
  29. package/dist/node-index.js +0 -668
  30. package/dist/node-index.js.map +0 -1
  31. package/dist/node-wrapper.d.ts +0 -44
  32. package/dist/node-wrapper.d.ts.map +0 -1
  33. package/dist/node-wrapper.js +0 -296
  34. package/dist/node-wrapper.js.map +0 -1
  35. package/dist/types/index.d.ts +0 -28
  36. package/dist/types/index.d.ts.map +0 -1
  37. package/dist/types/index.js +0 -3
  38. package/dist/types/index.js.map +0 -1
  39. package/dist/types/node-types.d.ts +0 -71
  40. package/dist/types/node-types.d.ts.map +0 -1
  41. package/dist/types/node-types.js +0 -6
  42. package/dist/types/node-types.js.map +0 -1
  43. package/dist/util/debug.d.ts +0 -3
  44. package/dist/util/debug.d.ts.map +0 -1
  45. package/dist/util/debug.js +0 -34
  46. package/dist/util/debug.js.map +0 -1
  47. package/dist/vscode/extension.d.ts +0 -81
  48. package/dist/vscode/extension.d.ts.map +0 -1
  49. package/dist/vscode/extension.js +0 -309
  50. package/dist/vscode/extension.js.map +0 -1
  51. package/examples/basic-usage.d.ts +0 -2
  52. package/examples/basic-usage.d.ts.map +0 -1
  53. package/examples/basic-usage.js +0 -26
  54. package/examples/basic-usage.js.map +0 -1
  55. package/examples/basic-usage.ts +0 -29
  56. package/examples/browser-demo/README.md +0 -204
  57. package/examples/browser-demo/index.html +0 -466
  58. package/examples/browser-wasm-integration.md +0 -411
  59. package/examples/ipc-demo/README.md +0 -127
  60. package/examples/local-first-usage.ts +0 -138
  61. package/examples/native-ipc-integration.md +0 -526
  62. package/examples/tauri-demo/README.md +0 -240
  63. package/examples/tauri-integration.md +0 -260
  64. package/examples/vscode-extension-example/README.md +0 -95
  65. package/examples/vscode-extension-example/package.json +0 -49
  66. package/examples/vscode-extension-example/src/extension.ts +0 -172
  67. package/examples/vscode-extension-example/tsconfig.json +0 -12
  68. package/examples/vscode-extension-integration.d.ts +0 -31
  69. package/examples/vscode-extension-integration.d.ts.map +0 -1
  70. package/examples/vscode-extension-integration.js +0 -319
  71. package/examples/vscode-extension-integration.js.map +0 -1
  72. package/examples/vscode-extension-integration.ts +0 -41
  73. package/legacy/benchmarks/memory-benchmarks.ts +0 -350
  74. package/legacy/benchmarks/run-benchmarks.ts +0 -315
  75. package/legacy/better-sqlite3-shared.ts +0 -157
  76. package/legacy/better-sqlite3.ts +0 -4
  77. package/legacy/cli.ts +0 -241
  78. package/legacy/config.ts +0 -50
  79. package/legacy/core/crdt.ts +0 -107
  80. package/legacy/core/database.ts +0 -529
  81. package/legacy/healthcheck.ts +0 -162
  82. package/legacy/http/api-server.ts +0 -569
  83. package/legacy/index.ts +0 -31
  84. package/legacy/local-first/unified-api.ts +0 -449
  85. package/legacy/logic/rules.ts +0 -46
  86. package/legacy/main.rs +0 -3
  87. package/legacy/main.ts +0 -197
  88. package/legacy/network/websocket-server.ts +0 -115
  89. package/legacy/node-index.ts +0 -827
  90. package/legacy/node-wrapper.ts +0 -329
  91. package/legacy/plugins/README.md +0 -181
  92. package/legacy/plugins/example-embedding-plugin.ts +0 -56
  93. package/legacy/plugins/plugin-system.ts +0 -315
  94. package/legacy/sqlite-compat.ts +0 -633
  95. package/legacy/sqlite3-compat.ts +0 -55
  96. package/legacy/storage/kv-storage.ts +0 -73
  97. package/legacy/tests/core.test.ts +0 -305
  98. package/legacy/tests/fixtures/performance-data.json +0 -71
  99. package/legacy/tests/fixtures/test-data.json +0 -129
  100. package/legacy/tests/integration/api-server.test.ts +0 -334
  101. package/legacy/tests/integration/mesh-network.test.ts +0 -303
  102. package/legacy/tests/logic.test.ts +0 -34
  103. package/legacy/tests/performance/load.test.ts +0 -290
  104. package/legacy/tests/security/input-validation.test.ts +0 -286
  105. package/legacy/tests/unit/core.test.ts +0 -226
  106. package/legacy/tests/unit/local-first-api.test.ts +0 -65
  107. package/legacy/tests/unit/plugin-system.test.ts +0 -388
  108. package/legacy/tests/unit/subscriptions.test.ts +0 -135
  109. package/legacy/tests/unit/vector-search.test.ts +0 -173
  110. package/legacy/tests/vscode_extension_test.ts +0 -281
  111. package/legacy/types/index.ts +0 -32
  112. package/legacy/types/node-types.ts +0 -80
  113. package/legacy/util/debug.ts +0 -27
  114. package/legacy/vector/index.ts +0 -59
  115. package/legacy/vscode/extension.ts +0 -387
  116. package/scripts/compiled-crud-verify.ts +0 -30
  117. package/scripts/dogfood.ts +0 -297
  118. package/scripts/postinstall.js +0 -156
  119. package/scripts/publish-crates.sh +0 -95
  120. package/scripts/release-check.js +0 -224
  121. package/scripts/run-tests.ts +0 -178
  122. package/scripts/setup-libclang.ps1 +0 -209
  123. package/scripts/update-changelog.js +0 -214
  124. package/scripts/validate-npm-publish.js +0 -228
  125. package/web/README.md +0 -27
  126. package/web/svelte/package.json +0 -31
package/README.md CHANGED
@@ -5,329 +5,137 @@
5
5
  [![Deno version](https://img.shields.io/badge/deno-v2.x-blue)](https://deno.land)
6
6
  [![License: AGPL-3.0](https://img.shields.io/badge/License-AGPL--3.0-blue.svg)](https://opensource.org/licenses/AGPL-3.0)
7
7
 
8
- **Local-First Graph Database with SQLite Compatibility**
8
+ **Local-First P2P Graph Database โ€” v2.0**
9
9
 
10
- PluresDB is a CRDT-based graph database that speaks SQLite. Built with Rust for performance and TypeScript for accessibility, it provides SQLite API compatibility while adding graph relationships, vector search, and P2P synchronization. Perfect for desktop applications, VSCode extensions, and personal knowledge management.
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
- > ๐Ÿ’ก **Ideal for Windows Desktop Apps**: Drop-in SQLite replacement with graph capabilities, vector search, and a comprehensive web UI. [Get Started on Windows โ†’](docs/WINDOWS_GETTING_STARTED.md)
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
- ## ๐Ÿš€ Quick Start
15
-
16
- ### Install
21
+ ## Install
17
22
 
18
23
  ```bash
19
- # Node.js / npm
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 pluresdb-storage
31
+ cargo add pluresdb-core
32
+
33
+ # CLI
34
+ cargo install pluresdb-cli
27
35
 
28
- # Windows (Winget)
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
- ### Use It
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
- use pluresdb_core::{Database, DatabaseOptions};
122
-
123
- let db = Database::open(
124
- DatabaseOptions::with_file("./data/plures.db")
125
- .create_if_missing(true)
126
- )?;
127
-
128
- db.put("user:1", json!({"name": "Alice"}))?;
129
- let user = db.get("user:1")?;
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
- ### For VSCode Extensions
133
-
134
- Replace SQLite in your VSCode extension with PluresDB:
135
-
136
- ```typescript
137
- import { SQLiteCompatibleAPI } from "pluresdb";
138
-
139
- export function activate(context: vscode.ExtensionContext) {
140
- const db = new SQLiteCompatibleAPI({
141
- config: {
142
- dataDir: path.join(context.globalStorageUri.fsPath, "pluresdb")
143
- }
144
- });
145
-
146
- // Same SQLite API, enhanced capabilities
147
- await db.exec("CREATE TABLE settings (key TEXT, value TEXT)");
148
- await db.run("INSERT INTO settings VALUES (?, ?)", ["theme", "dark"]);
149
- }
150
- ```
151
-
152
- ## ๐ŸŒ Web Interface
153
-
154
- PluresDB includes a comprehensive Svelte-based web UI at `http://localhost:34568`:
155
-
156
- - **Data Explorer**: Browse, edit, and manage your data with JSON editing
157
- - **Graph Visualization**: Interactive Cytoscape.js graph views
158
- - **Vector Search UI**: Semantic search with similarity scoring
159
- - **Type Management**: Define schemas and validate data
160
- - **P2P Controls**: Manage peers, encryption, and cross-device sync
161
- - **Performance Monitoring**: Real-time metrics and profiling
162
- - **History & Time Travel**: Version history with diff and restore
163
-
164
- ## ๐Ÿ”Œ API Options
165
-
166
- ### SQLite-Compatible API
167
-
168
- ```typescript
169
- // Database operations
170
- await sqlite.exec(sql); // Execute SQL
171
- await sqlite.run(sql, params); // Run with parameters
172
- await sqlite.get(sql, params); // Get single row
173
- await sqlite.all(sql, params); // Get all rows
174
-
175
- // Key-value operations
176
- await sqlite.put(key, value); // Store data
177
- await sqlite.getValue(key); // Retrieve data
178
- await sqlite.delete(key); // Remove data
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
- # Create/update node
204
- curl -X POST http://localhost:34567/api/put \
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
- See [Local-First Integration](docs/LOCAL_FIRST_INTEGRATION.md) for complete guides.
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
- Report security issues privately via our [Security Policy](SECURITY.md).
117
+ ## Distribution
289
118
 
290
- ## ๐Ÿ“Š Performance
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
- - **CRDT Operations**: Efficient conflict-free data structures in Rust
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
- ## ๐Ÿงช Testing
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
- Run the comprehensive test suite:
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
- ## ๐Ÿ“„ License
323
-
324
- GNU Affero General Public License v3.0 (AGPL v3). See [LICENSE](LICENSE) for details.
325
-
326
- ## ๐Ÿ†˜ Support
136
+ ## License
327
137
 
328
- - **Issues**: [GitHub Issues](https://github.com/plures/pluresdb/issues)
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
 
@@ -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
+