@objy/server 0.0.0-stage → 0.1.0
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/API.md +1469 -0
- package/LICENSE +21 -0
- package/NOTICE.md +9 -0
- package/README.md +21 -2
- package/objydb.config.json +48 -0
- package/package.json +42 -4
- package/public/index.html +4134 -0
- package/public/objy-db-logo.png +0 -0
- package/src/aggregate.js +438 -0
- package/src/api.js +15 -0
- package/src/auth.js +472 -0
- package/src/clock.js +18 -0
- package/src/cluster-secret.js +25 -0
- package/src/cluster-status.js +562 -0
- package/src/compression-stats.js +32 -0
- package/src/config.js +360 -0
- package/src/crdt.js +1076 -0
- package/src/derived-state-scheduler.js +128 -0
- package/src/files.js +324 -0
- package/src/hnsw.js +269 -0
- package/src/http-cors.js +31 -0
- package/src/http-router.js +162 -0
- package/src/index.js +137 -0
- package/src/interfaces/auth.js +123 -0
- package/src/interfaces/cluster.js +296 -0
- package/src/interfaces/public-object.js +2452 -0
- package/src/interfaces/ui.js +38 -0
- package/src/lib/crypto.cjs +54 -0
- package/src/lib/jwt.cjs +231 -0
- package/src/local-wal.js +122 -0
- package/src/memory-guard.js +152 -0
- package/src/ndjson.js +117 -0
- package/src/node-runtime.js +29 -0
- package/src/object-hooks.js +282 -0
- package/src/object-id.js +7 -0
- package/src/object-storage.js +263 -0
- package/src/object-store.js +288 -0
- package/src/patch.js +87 -0
- package/src/permissions.js +178 -0
- package/src/persistence.js +1918 -0
- package/src/plugin-loader.js +21 -0
- package/src/query-planner.js +266 -0
- package/src/query.js +416 -0
- package/src/references.js +349 -0
- package/src/replication-scheduler.js +303 -0
- package/src/restore-status.js +77 -0
- package/src/runtime.js +47 -0
- package/src/server.js +242 -0
- package/src/shape.js +286 -0
- package/src/shard-map-store.js +85 -0
- package/src/shard-map.js +333 -0
- package/src/shard-router.js +737 -0
- package/src/store.js +3410 -0
- package/src/system-secrets.js +107 -0
- package/src/vector.js +83 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 OBJY DB contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/NOTICE.md
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
# Licensing notice
|
|
2
|
+
|
|
3
|
+
The original source code in this repository is licensed under the [MIT License](LICENSE).
|
|
4
|
+
|
|
5
|
+
The OBJY and OBJY DB names, logos, brand artwork, and product copy are not licensed under the MIT License. All rights are reserved unless explicitly stated otherwise.
|
|
6
|
+
|
|
7
|
+
Third-party software and other materials remain subject to their respective licenses.
|
|
8
|
+
|
|
9
|
+
The browser compression path uses `fflate`, Copyright (c) 2026 Arjun Barrett, under the MIT License.
|
package/README.md
CHANGED
|
@@ -1,3 +1,22 @@
|
|
|
1
|
-
#
|
|
1
|
+
# OBJY DB Server
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
The complete OBJY DB server runtime: HTTP API, authentication, permissions, hooks, sharding, replication, S3 durability, local WAL, and admin UI.
|
|
4
|
+
|
|
5
|
+
```sh
|
|
6
|
+
npm install @objy/server
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
Embed it in Node.js:
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
import { startServer } from "@objy/server";
|
|
13
|
+
|
|
14
|
+
const runtime = await startServer({ port: 8080 });
|
|
15
|
+
console.log(runtime.port);
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
Install the standalone HTTP client from `@objy/client`. Deployments and process management belong to `@objy/cli`. Object-hook registration remains available from `@objy/server/hooks`.
|
|
19
|
+
|
|
20
|
+
Read the [server guide](https://github.com/objy-org/objy/blob/main/SERVER.md), [API reference](https://github.com/objy-org/objy/blob/main/API.md), [JavaScript client](https://github.com/objy-org/objy-client), and [measured benchmarks](https://github.com/objy-org/objy/blob/main/BENCHMARKS.md).
|
|
21
|
+
|
|
22
|
+
Licensed under the MIT License.
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
{
|
|
2
|
+
"node": {
|
|
3
|
+
"id": "node-a",
|
|
4
|
+
"url": "http://localhost:8080",
|
|
5
|
+
"retainOps": 256,
|
|
6
|
+
"syncBatchSize": 1024
|
|
7
|
+
},
|
|
8
|
+
"server": {
|
|
9
|
+
"port": 8080
|
|
10
|
+
},
|
|
11
|
+
"storage": {
|
|
12
|
+
"engine": "object"
|
|
13
|
+
},
|
|
14
|
+
"runtime": {
|
|
15
|
+
"maxOldSpaceSizeMb": 15360
|
|
16
|
+
},
|
|
17
|
+
"memoryGuard": {
|
|
18
|
+
"enabled": true
|
|
19
|
+
},
|
|
20
|
+
"cluster": {
|
|
21
|
+
"syncMs": 2500,
|
|
22
|
+
"forwardTimeoutMs": 60000,
|
|
23
|
+
"replicationTimeoutMs": 60000,
|
|
24
|
+
"hints": {
|
|
25
|
+
"enabled": true,
|
|
26
|
+
"debounceMs": 25,
|
|
27
|
+
"maxScopesPerHint": 128
|
|
28
|
+
},
|
|
29
|
+
"shardMapStore": {
|
|
30
|
+
"mode": "off",
|
|
31
|
+
"prefix": "objydb",
|
|
32
|
+
"key": "cluster/shard-map.json"
|
|
33
|
+
}
|
|
34
|
+
},
|
|
35
|
+
"auth": {
|
|
36
|
+
"accessTokenTtlSeconds": 3600,
|
|
37
|
+
"refreshTokenTtlSeconds": 1209600
|
|
38
|
+
},
|
|
39
|
+
"persistence": {
|
|
40
|
+
"mode": "off",
|
|
41
|
+
"prefix": "objydb",
|
|
42
|
+
"flushMs": 5000,
|
|
43
|
+
"opBatchSize": 1000,
|
|
44
|
+
"snapshotMs": 60000,
|
|
45
|
+
"segmentBytes": 16777216,
|
|
46
|
+
"compactJournals": true
|
|
47
|
+
}
|
|
48
|
+
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,44 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@objy/server",
|
|
3
|
-
"
|
|
4
|
-
"
|
|
5
|
-
|
|
6
|
-
|
|
3
|
+
"description": "OBJY DB: an in-memory, sharded and replicated database for dynamic JavaScript objects.",
|
|
4
|
+
"keywords": [
|
|
5
|
+
"database",
|
|
6
|
+
"in-memory",
|
|
7
|
+
"object-database",
|
|
8
|
+
"nosql",
|
|
9
|
+
"indexes",
|
|
10
|
+
"aggregation",
|
|
11
|
+
"vector-search",
|
|
12
|
+
"browser",
|
|
13
|
+
"embedded",
|
|
14
|
+
"sharding",
|
|
15
|
+
"replication",
|
|
16
|
+
"s3"
|
|
17
|
+
],
|
|
18
|
+
"main": "./src/api.js",
|
|
19
|
+
"exports": {
|
|
20
|
+
".": "./src/api.js",
|
|
21
|
+
"./hooks": "./src/object-hooks.js"
|
|
22
|
+
},
|
|
23
|
+
"engines": {
|
|
24
|
+
"node": ">=20"
|
|
25
|
+
},
|
|
26
|
+
"dependencies": {
|
|
27
|
+
"@aws-sdk/client-s3": "^3.1107.0"
|
|
28
|
+
},
|
|
29
|
+
"publishConfig": {
|
|
30
|
+
"access": "public"
|
|
31
|
+
},
|
|
32
|
+
"version": "0.1.0",
|
|
33
|
+
"type": "module",
|
|
34
|
+
"author": "SPOO Technologies",
|
|
35
|
+
"repository": {
|
|
36
|
+
"type": "git",
|
|
37
|
+
"url": "git+https://github.com/objy-org/objy.git"
|
|
38
|
+
},
|
|
39
|
+
"bugs": {
|
|
40
|
+
"url": "https://github.com/objy-org/objy/issues"
|
|
41
|
+
},
|
|
42
|
+
"homepage": "https://github.com/objy-org/objy#readme",
|
|
43
|
+
"license": "MIT"
|
|
44
|
+
}
|