{"id":30135161,"url":"https://github.com/karelklima/ldkit","last_synced_at":"2026-01-17T07:31:58.577Z","repository":{"id":45890456,"uuid":"400802162","full_name":"karelklima/ldkit","owner":"karelklima","description":"LDkit - Linked Data query toolkit for TypeScript developers","archived":false,"fork":false,"pushed_at":"2025-08-06T09:08:01.000Z","size":23202,"stargazers_count":66,"open_issues_count":6,"forks_count":3,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-08-06T09:16:18.972Z","etag":null,"topics":["deno","linkeddata","rdf","sparql"],"latest_commit_sha":null,"homepage":"https://ldkit.io","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/karelklima.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":"CITATION.cff","codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null},"funding":{"github":"karelklima"}},"created_at":"2021-08-28T13:41:02.000Z","updated_at":"2025-08-06T09:07:11.000Z","dependencies_parsed_at":"2022-09-05T18:21:02.485Z","dependency_job_id":"6a9f14a0-ae8b-485d-b7c3-43e65fc63e86","html_url":"https://github.com/karelklima/ldkit","commit_stats":{"total_commits":136,"total_committers":2,"mean_commits":68.0,"dds":0.007352941176470562,"last_synced_commit":"67f18d4139d709090c4e63c78df24c771cfad316"},"previous_names":[],"tags_count":39,"template":false,"template_full_name":null,"purl":"pkg:github/karelklima/ldkit","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karelklima%2Fldkit","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karelklima%2Fldkit/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karelklima%2Fldkit/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karelklima%2Fldkit/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/karelklima","download_url":"https://codeload.github.com/karelklima/ldkit/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/karelklima%2Fldkit/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":269147498,"owners_count":24368347,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-06T02:00:09.910Z","response_time":99,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deno","linkeddata","rdf","sparql"],"created_at":"2025-08-10T22:01:38.223Z","updated_at":"2026-01-17T07:31:58.569Z","avatar_url":"https://github.com/karelklima.png","language":"TypeScript","funding_links":["https://github.com/sponsors/karelklima"],"categories":[],"sub_categories":[],"readme":"# LDkit - Linked Data for TypeScript developers.\n\n**LDkit** is **Linked Data** query toolkit for **TypeScript** developers. It\nprovides ORM-like abstraction over [RDF](https://www.w3.org/RDF/) datasources.\nYou define the data model and then you can retrieve or update data without any\nextra hustle. LDkit will generate SPARQL queries, retrieves RDF data and\nconverts them to TypeScript native types.\n\n## 💣 Key Features\n\n- Next-generation ORM-like [RDF](https://www.w3.org/RDF/) abstraction.\n- Retrieve and update data using reusable data models.\n- Compatible with [Comunica](https://comunica.dev) query engine (you can even\n  write your own!).\n- 10+ popular ontologies included.\n- First class TypeScript support, best in class developer experience.\n- Runs in browser, [Deno](https://deno.land) and [Node](nodejs.org).\n- ...and more!\n\n## 📖 Documentation\n\nThe [documentation](https://ldkit.io/docs) and examples are available on\n[ldkit.io](https://ldkit.io).\n\n## 🚀 Getting Started\n\nIf you are using Node, then you can install LDkit using your favourite package\nmanager.\n\n```bash\nnpm i ldkit\n```\n\nFor Deno environment, you can import LDkit like this:\n\n```ts\nimport * as ldkit from \"https://deno.land/x/ldkit/mod.ts\";\n```\n\n### Create data schema and set up RDF source\n\n```ts\nimport { createLens, type Options } from \"ldkit\";\nimport { dbo, rdfs, xsd } from \"ldkit/namespaces\";\n\n// Create a schema\nconst PersonSchema = {\n  \"@type\": dbo.Person,\n  name: rdfs.label,\n  abstract: dbo.abstract,\n  birthDate: {\n    \"@id\": dbo.birthDate,\n    \"@type\": xsd.date,\n  },\n} as const;\n\n// Create options for query engine\nconst options: Options = {\n  sources: [\"https://dbpedia.org/sparql\"], // SPARQL endpoint\n  language: \"en\", // Preferred language\n};\n\n// Create a resource using the data schema and options above\nconst Persons = createLens(PersonSchema, options);\n```\n\n### List all available data\n\n```ts\n// List all persons\nconst persons = await Persons.find();\nfor (const person of persons) {\n  console.log(person.name); // string\n  console.log(person.birthDate); // Date\n}\n\n// Get total count of all persons\nconst count = await Persons.count();\nconsole.log(count); // number\n```\n\n### Get a particular entity\n\n```ts\n// Get a particular person identified by IRI\nconst ada = await Persons.findByIri(\"http://dbpedia.org/resource/Ada_Lovelace\");\nconsole.log(ada?.name); // string \"Ada Lovelace\"\nconsole.log(ada?.birthDate); // Date object of 1815-12-10\n```\n\n### Data manipulation - insert, update and delete\n\n```ts\n// Insert a new person\nPersons.insert({\n  $id: \"http://dbpedia.org/resource/Alan_Turing\",\n  name: \"Alan Turing\",\n  birthDate: new Date(\"1912-06-23\"),\n});\n\n// Modify a person's name\nPersons.update({\n  $id: \"http://dbpedia.org/resource/Alan_Turing\",\n  name: \"Not Alan Turing\",\n});\n\n// Delete a person\nPersons.delete(\"http://dbpedia.org/resource/Alan_Turing\");\n```\n\nMore complex examples can be found in [documentation](https://ldkit.io/docs).\n\n## Minimum software requirements\n\n- TypeScript v5.5 or newer\n- Node.js v20.19.3 or newer\n- Deno v2.1 or newer\n\n## Specification Compliance\n\nLDkit complies with the following specifications:\n\n- [RDF/JS: Data model specification](https://rdf.js.org/data-model-spec/)\n- [RDF/JS: Query specification](https://rdf.js.org/query-spec/)\n- [SPARQL 1.1 Query Language](https://www.w3.org/TR/sparql11-query/)\n- [SPARQL 1.1 Update](https://www.w3.org/TR/2013/REC-sparql11-update-20130321/)\n- [SPARQL 1.1 Protocol](https://www.w3.org/TR/2013/REC-sparql11-protocol-20130321/)\n\n## Citation\n\nIf you are using LDkit in a scientific publication, we would appreciate a\ncitation of our work.\n\n```bibtex\n@inproceedings{klima2023ldkit,\n  title     = {LDkit: Linked Data Object Graph Mapping Toolkit for Web Applications},\n  author    = {Kl{\\'\\i}ma, Karel and Taelman, Ruben and Ne{\\v{c}}ask{\\`y}, Martin},\n  booktitle = {International Semantic Web Conference},\n  pages     = {194--210},\n  year      = {2023},\n  month     = oct,\n  publisher = {Springer Nature Switzerland},\n  isbn      = {978-3-031-47243-5},\n  url       = {https://doi.org/10.1007/978-3-031-47243-5_11}\n}\n```\n\n## License\n\n[MIT License](./LICENSE.md)\n\nCopyright © 2021-present [Karel Klima](https://karelklima.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarelklima%2Fldkit","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkarelklima%2Fldkit","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkarelklima%2Fldkit/lists"}