ldkit

LDkit - Linked Data query toolkit for TypeScript developers

https://github.com/karelklima/ldkit

Science Score: 57.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
    Found CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 2 DOI reference(s) in README
  • Academic publication links
  • Committers with academic emails
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.1%) to scientific vocabulary

Keywords

deno linkeddata rdf sparql
Last synced: 6 months ago · JSON representation ·

Repository

LDkit - Linked Data query toolkit for TypeScript developers

Basic Info
  • Host: GitHub
  • Owner: karelklima
  • License: mit
  • Language: TypeScript
  • Default Branch: main
  • Homepage: https://ldkit.io
  • Size: 22.1 MB
Statistics
  • Stars: 66
  • Watchers: 2
  • Forks: 3
  • Open Issues: 5
  • Releases: 39
Topics
deno linkeddata rdf sparql
Created over 4 years ago · Last pushed 7 months ago
Metadata Files
Readme Funding License Citation

README.md

LDkit - Linked Data for TypeScript developers.

LDkit is Linked Data query toolkit for TypeScript developers. It provides ORM-like abstraction over RDF datasources. You define the data model and then you can retrieve or update data without any extra hustle. LDkit will generate SPARQL queries, retrieves RDF data and converts them to TypeScript native types.

💣 Key Features

  • Next-generation ORM-like RDF abstraction.
  • Retrieve and update data using reusable data models.
  • Compatible with Comunica query engine (you can even write your own!).
  • 10+ popular ontologies included.
  • First class TypeScript support, best in class developer experience.
  • Runs in browser, Deno and Node.
  • ...and more!

📖 Documentation

The documentation and examples are available on ldkit.io.

🚀 Getting Started

If you are using Node, then you can install LDkit using your favourite package manager.

bash npm i ldkit

For Deno environment, you can import LDkit like this:

ts import * as ldkit from "https://deno.land/x/ldkit/mod.ts";

Create data schema and set up RDF source

```ts import { createLens, type Options } from "ldkit"; import { dbo, rdfs, xsd } from "ldkit/namespaces";

// Create a schema const PersonSchema = { "@type": dbo.Person, name: rdfs.label, abstract: dbo.abstract, birthDate: { "@id": dbo.birthDate, "@type": xsd.date, }, } as const;

// Create options for query engine const options: Options = { sources: ["https://dbpedia.org/sparql"], // SPARQL endpoint language: "en", // Preferred language };

// Create a resource using the data schema and options above const Persons = createLens(PersonSchema, options); ```

List all available data

```ts // List all persons const persons = await Persons.find(); for (const person of persons) { console.log(person.name); // string console.log(person.birthDate); // Date }

// Get total count of all persons const count = await Persons.count(); console.log(count); // number ```

Get a particular entity

ts // Get a particular person identified by IRI const ada = await Persons.findByIri("http://dbpedia.org/resource/Ada_Lovelace"); console.log(ada?.name); // string "Ada Lovelace" console.log(ada?.birthDate); // Date object of 1815-12-10

Data manipulation - insert, update and delete

```ts // Insert a new person Persons.insert({ $id: "http://dbpedia.org/resource/Alan_Turing", name: "Alan Turing", birthDate: new Date("1912-06-23"), });

// Modify a person's name Persons.update({ $id: "http://dbpedia.org/resource/Alan_Turing", name: "Not Alan Turing", });

// Delete a person Persons.delete("http://dbpedia.org/resource/Alan_Turing"); ```

More complex examples can be found in documentation.

Minimum software requirements

  • TypeScript v5.5 or newer
  • Node.js v20.19.3 or newer
  • Deno v2.1 or newer

Specification Compliance

LDkit complies with the following specifications:

Citation

If you are using LDkit in a scientific publication, we would appreciate a citation of our work.

bibtex @inproceedings{klima2023ldkit, title = {LDkit: Linked Data Object Graph Mapping Toolkit for Web Applications}, author = {Kl{\'\i}ma, Karel and Taelman, Ruben and Ne{\v{c}}ask{\`y}, Martin}, booktitle = {International Semantic Web Conference}, pages = {194--210}, year = {2023}, month = oct, publisher = {Springer Nature Switzerland}, isbn = {978-3-031-47243-5}, url = {https://doi.org/10.1007/978-3-031-47243-5_11} }

License

MIT License

Copyright © 2021-present Karel Klima

Owner

  • Name: Karel Klíma
  • Login: karelklima
  • Kind: user
  • Location: Prague, Czech Republic

Citation (CITATION.cff)

cff-version: 1.2.0
message: "If you use this software, please cite the article."
authors:
  - family-names: "Klima"
    given-names: "Karel"
title: "LDkit"
version: 2.4.0
doi: 10.5281/zenodo.15485481
date-released: 2025-05-21
url: "https://ldkit.io/"
preferred-citation:
  type: conference-paper
  authors:
    - family-names: "Klíma"
      given-names: "Karel"
    - family-names: "Taelman"
      given-names: "Ruben"
    - family-names: "Nečaský"
      given-names: "Martin"
  doi: "10.1007/978-3-031-47243-5_11"
  collection-title: "International Semantic Web Conference"
  publisher:
    name: "Springer Nature Switzerland"
  month: 10
  start: 194 # First page number
  end: 210 # Last page number
  title: "LDkit: Linked Data Object Graph Mapping Toolkit for Web Applications"
  year: 2023

GitHub Events

Total
  • Create event: 25
  • Commit comment event: 1
  • Release event: 7
  • Issues event: 40
  • Watch event: 25
  • Delete event: 18
  • Issue comment event: 21
  • Push event: 25
  • Pull request event: 30
Last Year
  • Create event: 25
  • Commit comment event: 1
  • Release event: 7
  • Issues event: 40
  • Watch event: 25
  • Delete event: 18
  • Issue comment event: 21
  • Push event: 25
  • Pull request event: 30

Committers

Last synced: 7 months ago

All Time
  • Total Commits: 190
  • Total Committers: 2
  • Avg Commits per committer: 95.0
  • Development Distribution Score (DDS): 0.005
Past Year
  • Commits: 23
  • Committers: 1
  • Avg Commits per committer: 23.0
  • Development Distribution Score (DDS): 0.0
Top Committers
Name Email Commits
Karel Klíma k****a@g****m 189
Daniel Beeke d****e@g****m 1

Issues and Pull Requests

Last synced: 6 months ago

All Time
  • Total issues: 93
  • Total pull requests: 74
  • Average time to close issues: 3 months
  • Average time to close pull requests: about 5 hours
  • Total issue authors: 5
  • Total pull request authors: 3
  • Average comments per issue: 0.29
  • Average comments per pull request: 0.08
  • Merged pull requests: 69
  • Bot issues: 0
  • Bot pull requests: 0
Past Year
  • Issues: 22
  • Pull requests: 33
  • Average time to close issues: 5 days
  • Average time to close pull requests: about 2 hours
  • Issue authors: 4
  • Pull request authors: 1
  • Average comments per issue: 0.23
  • Average comments per pull request: 0.0
  • Merged pull requests: 29
  • Bot issues: 0
  • Bot pull requests: 0
Top Authors
Issue Authors
  • karelklima (82)
  • ddeboer (2)
  • ajgribble (1)
  • raisingdibar (1)
  • ragnorc (1)
Pull Request Authors
  • karelklima (82)
  • danielbeeke (1)
  • jakubklimek (1)
Top Labels
Issue Labels
documentation (23) feature (22) tech (13) question (4) bug (3)
Pull Request Labels

Packages

  • Total packages: 2
  • Total downloads:
    • npm 472 last-month
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 1
    (may contain duplicates)
  • Total versions: 47
  • Total maintainers: 1
npmjs.org: ldkit

LDkit, a Linked Data query toolkit for TypeScript developers

  • Homepage: https://ldkit.io
  • License: MIT
  • Latest release: 2.5.1
    published 7 months ago
  • Versions: 26
  • Dependent Packages: 2
  • Dependent Repositories: 1
  • Downloads: 472 Last month
Rankings
Stargazers count: 6.9%
Dependent packages count: 8.9%
Forks count: 8.9%
Average: 9.5%
Dependent repos count: 10.3%
Downloads: 12.3%
Maintainers (1)
Last synced: 7 months ago
deno.land: ldkit

LDkit - Linked Data query toolkit for TypeScript developers

  • Versions: 21
  • Dependent Packages: 0
  • Dependent Repositories: 0
Rankings
Dependent repos count: 0.0%
Forks count: 20.0%
Stargazers count: 21.8%
Average: 25.1%
Dependent packages count: 58.5%
Last synced: 7 months ago

Dependencies

examples/bulletin-boards/package.json npm
  • @emotion/react ^11.4.1
  • @emotion/styled ^11.3.0
  • @ldkit/core *
  • @ldkit/namespaces *
  • @ldkit/rdf *
  • @ldkit/react *
  • @mui/icons-material ^5.0.4
  • @mui/material ^5.0.4
  • @types/react ^17.0.19
  • @types/react-dom ^17.0.9
  • history ^5.1.0
  • n3 ^1.11.1
  • observable-hooks ^4.0.5
  • react ^17.0.2
  • react-dom ^17.0.2
  • react-error-boundary ^3.1.4
  • react-hook-form ^7.20.1
  • react-router ^6.0.2
  • react-router-dom ^6.0.2
  • rxjs ^7.3.0
examples/custom-query/package.json npm
  • @ldkit/core *
  • @ldkit/namespaces *
  • @ldkit/rdf *
  • @ldkit/sparql *
  • rxjs ^7.3.0
examples/dbpedia-actors/package.json npm
  • @emotion/react ^11.4.1
  • @emotion/styled ^11.3.0
  • @ldkit/core *
  • @ldkit/namespaces *
  • @ldkit/rdf *
  • @ldkit/react *
  • @ldkit/sparql *
  • @mui/material ^5.0.4
  • rxjs ^7.4.0
examples/todo-app/package.json npm
  • @emotion/react ^11.4.1
  • @emotion/styled ^11.3.0
  • @ldkit/core *
  • @ldkit/namespaces *
  • @ldkit/rdf *
  • @ldkit/react *
  • @types/react ^17.0.19
  • @types/react-dom ^17.0.9
  • n3 ^1.11.1
  • observable-hooks ^4.0.5
  • react ^17.0.2
  • react-dom ^17.0.2
  • rxjs ^7.3.0
package.json npm
  • @parcel/packager-ts ^2.0.1 development
  • @parcel/transformer-typescript-types ^2.0.1 development
  • parcel ^2.0.1 development
  • rimraf ^3.0.2 development
  • typescript ^4.4.4 development
  • vitepress ^0.22.3 development
  • yargs ^17.2.1 development