Turnkey model-driven storage for linked data resources.
@metreeca/keep stores and retrieves linked data resources independently of the backend holding them, driven by the resource models that describe them:
| Layer | Package | Description |
|---|---|---|
| Components | @metreeca/keep | Core model-driven storage API |
| @metreeca/keep-flake | Shape-driven traversal trees | |
| @metreeca/keep-suite | Connector conformance test suite | |
| Connectors | @metreeca/keep-rest | REST/JSON proxy connector |
| upcoming | SQL:2011 database connector | |
| upcoming | GQL:2024 graph connector | |
| @metreeca/keep-sparql | SPARQL 1.1 repository connector |
Pick the connector for your backend from the table above and install it. The connector pulls in the framework packages it needs, so you don't install them yourself.
Some connectors also need a separate backend library, such as a driver, runtime or client. The connector README lists any such requirement.
npm install @metreeca/keep-<connector> # connector from the table above
npm install <backend-package> # backend library, if the connector requires one
TypeScript consumers must use "moduleResolution": "nodenext"/"node16"/"bundler" in tsconfig.json.
The legacy "node" resolver is not supported.
Each package documents its own API in its README and API reference; for complete coverage, see the API reference.
An application obtains a store from a backend connector, then reads and writes resources against the models describing them, whatever the backend. For example, with the SPARQL connector over an RDF4J Server repository:
import { createSPARQLStore } from "@metreeca/keep-sparql";
import { createRDF4JRepository } from "@metreeca/wire-sparql-rdf4j";
const store = createSPARQLStore(createRDF4JRepository({
server: "http://localhost:8080/rdf4j-server",
repository: "products"
}));
const product = await store.lookup({
entry: "http://example.com/products/1",
shape: ProductShape,
model: {
name: {},
price: {},
vendor: { id: {}, name: {} }
}
});
This project is licensed under the Apache 2.0 License – see LICENSE file for details.