{"id":27492132,"url":"https://github.com/reductstore/reduct-js","last_synced_at":"2026-04-13T18:00:51.158Z","repository":{"id":40005043,"uuid":"480514180","full_name":"reductstore/reduct-js","owner":"reductstore","description":"ReductStore Client SDK for Javascript","archived":false,"fork":false,"pushed_at":"2026-04-08T11:42:01.000Z","size":721,"stargazers_count":8,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-04-08T13:29:08.315Z","etag":null,"topics":["http","http-client","javascript","nodejs","reductstore","sdk","typescript"],"latest_commit_sha":null,"homepage":"https://www.reduct.store/docs","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/reductstore.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":"AGENTS.md","dco":null,"cla":null}},"created_at":"2022-04-11T19:01:34.000Z","updated_at":"2026-04-08T11:41:39.000Z","dependencies_parsed_at":"2023-12-03T10:25:14.619Z","dependency_job_id":"d8ae0eb5-65f3-4b50-ae65-fc58887f2ac5","html_url":"https://github.com/reductstore/reduct-js","commit_stats":null,"previous_names":[],"tags_count":51,"template":false,"template_full_name":null,"purl":"pkg:github/reductstore/reduct-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reductstore%2Freduct-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reductstore%2Freduct-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reductstore%2Freduct-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reductstore%2Freduct-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/reductstore","download_url":"https://codeload.github.com/reductstore/reduct-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/reductstore%2Freduct-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31764317,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-13T15:25:13.801Z","status":"ssl_error","status_checked_at":"2026-04-13T15:25:09.162Z","response_time":93,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["http","http-client","javascript","nodejs","reductstore","sdk","typescript"],"created_at":"2025-04-16T23:07:11.442Z","updated_at":"2026-04-13T18:00:51.119Z","avatar_url":"https://github.com/reductstore.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ReductStore Client SDK for JavaScript\n\n[![npm](https://img.shields.io/npm/v/reduct-js)](https://www.npmjs.com/package/reduct-js)\n[![npm](https://img.shields.io/npm/dm/reduct-js)](https://www.npmjs.com/package/reduct-js)\n[![GitHub Workflow Status](https://img.shields.io/github/actions/workflow/status/reductstore/reduct-js/ci.yml?branch=main)](https://github.com/reductstore/reduct-js/actions)\n\nThe ReductStore Client SDK for JavaScript is an asynchronous HTTP client for interacting with\na [ReductStore](https://www.reduct.store) instance from a JavaScript application. It is written in TypeScript and provides a set of APIs for accessing and manipulating\ndata stored in ReductStore.\n\n## Requirements\n\n- Node.js 20 or later\n- TypeScript 4.6 or later\n\n## Features\n\n- Based on the Fetch API\n- Promise-based API for easy asynchronous programming\n- Support for [ReductStore HTTP API v1.19](https://www.reduct.store/docs/http-api)\n- Token-based authentication for secure access to the database\n- Labeling for read-write operations and querying\n- Batch operations for efficient data processing\n\n## Getting Started\n\nTo get started with the ReductStore Client SDK for JavaScript, you'll need to have ReductStore installed and running on\nyour machine. You can find instructions for installing ReductStore [here](https://www.reduct.store/docs/getting-started#docker).\n\nOnce you have ReductStore up and running, you can install the ReductStore Client SDK for JavaScript using npm:\n\n```\nnpm i reduct-js\n```\n\nThen, you can use the following example code to start interacting with your ReductStore database from your JavaScript\napplication:\n\n```js\nconst { Client, QuotaType } = require(\"reduct-js\");\n\nconst main = async () =\u003e {\n  // 1. Create a ReductStore client\n  const client = new Client(\"http://127.0.0.1:8383\", {\n    apiToken: \"my-token\",\n  });\n\n  // 2. Get or create a bucket with 1Gb quota\n  const bucket = await client.getOrCreateBucket(\"my-bucket\", {\n    quotaType: QuotaType.FIFO,\n    quotaSize: BigInt(1e9),\n  });\n\n  // 3. Write some data with timestamps and labels to the 'entry-1' entry\n  const us = (dateString) =\u003e BigInt(Date.parse(dateString) * 1000);\n  let record = await bucket.beginWrite(\"sensor-1\", {\n    ts: us(\"2021-01-01T11:00:00Z\"),\n    labels: {\n      score: 10,\n    },\n  });\n\n  await record.write(\"\u003cBlob data\u003e\");\n  record = await bucket.beginWrite(\"sensor-1\", {\n    ts: us(\"2021-01-01T11:00:01Z\"),\n    labels: {\n      score: 20,\n    },\n  });\n  await record.write(\"\u003cBlob data\u003e\");\n\n  // 4. Query the data by time range and condition\n  for await (const record of bucket.query(\n    \"sensor-1\",\n    us(\"2021-01-01T11:00:00Z\"),\n    us(\"2021-01-01T11:00:02Z\"),\n    {\n      when: { \"\u0026score\": { $gt: 10 } },\n    },\n  )) {\n    console.log(`Record timestamp: ${record.time}`);\n    console.log(`Record size: ${record.size}`);\n    console.log(await record.readAsString());\n  }\n};\n\nmain().then(() =\u003e console.log(\"done\"));\n```\n\nFor more examples, see the [Guides](https://www.reduct.store/docs/guides) section in the ReductStore documentation.\n\n## JavaScript Limitations\n\n- The SDK doesn't support steaming data to the server in JavaScript. The `WriteableRecord.write` method\n  is not implemented and will throw a Fetch error.\n\n## Supported ReductStore Versions and Backward Compatibility\n\nThe library is backward compatible with the previous versions. However, some methods have been deprecated and will be\nremoved in the future releases. Please refer to the [Changelog](CHANGELOG.md) for more details.\nThe SDK supports the following ReductStore API versions:\n\n- v1.19\n- v1.18\n- v1.17\n\nIt can work with newer and older versions, but it is not guaranteed that all features will work as expected because\nthe API may change and some features may be deprecated or the SDK may not support them yet.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freductstore%2Freduct-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freductstore%2Freduct-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freductstore%2Freduct-js/lists"}