{"id":13720942,"url":"https://github.com/kuzzleio/sdk-javascript","last_synced_at":"2025-04-05T00:09:25.693Z","repository":{"id":36055369,"uuid":"40353752","full_name":"kuzzleio/sdk-javascript","owner":"kuzzleio","description":"Kuzzle Javascript SDK. High level library including multi-protocol support, offline resiliency, realtime data and more","archived":false,"fork":false,"pushed_at":"2025-02-12T15:41:15.000Z","size":39330,"stargazers_count":40,"open_issues_count":0,"forks_count":16,"subscribers_count":16,"default_branch":"master","last_synced_at":"2025-03-28T23:08:41.640Z","etag":null,"topics":["hacktoberfest","http","isomorphic","javascript","kuzzle","kuzzle-sdk","nodejs","offline-first","realtime","sdk","websocket"],"latest_commit_sha":null,"homepage":"http://docs.kuzzle.io/sdk/js/7","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/kuzzleio.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2015-08-07T09:54:38.000Z","updated_at":"2025-02-12T15:11:01.000Z","dependencies_parsed_at":"2024-01-14T22:04:11.393Z","dependency_job_id":"7bbf4292-2020-4bfb-849e-76e4d02e6af8","html_url":"https://github.com/kuzzleio/sdk-javascript","commit_stats":{"total_commits":1587,"total_committers":60,"mean_commits":26.45,"dds":0.8613736609955891,"last_synced_commit":"9ee5862638ce7664ee992a9909365a7e8c04b233"},"previous_names":[],"tags_count":179,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzzleio%2Fsdk-javascript","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzzleio%2Fsdk-javascript/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzzleio%2Fsdk-javascript/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/kuzzleio%2Fsdk-javascript/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/kuzzleio","download_url":"https://codeload.github.com/kuzzleio/sdk-javascript/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246635960,"owners_count":20809333,"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","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":["hacktoberfest","http","isomorphic","javascript","kuzzle","kuzzle-sdk","nodejs","offline-first","realtime","sdk","websocket"],"created_at":"2024-08-03T01:01:10.209Z","updated_at":"2025-04-05T00:09:25.673Z","avatar_url":"https://github.com/kuzzleio.png","language":"JavaScript","readme":"\u003cp align=\"center\"\u003e\n  \u003cimg src=\"https://user-images.githubusercontent.com/7868838/53197334-3fdcdf00-361a-11e9-8ac4-85f164ee0561.png\"/\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n  \u003ca href=\"https://travis-ci.org/kuzzleio/sdk-javascript\"\u003e\n    \u003cimg src=\"https://travis-ci.org/kuzzleio/sdk-javascript.svg?branch=master\"/\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://david-dm.org/kuzzleio/sdk-javascript\"\u003e\n    \u003cimg src=\"https://david-dm.org/kuzzleio/sdk-javascript.svg\" /\u003e\n  \u003c/a\u003e\n  \u003ca href=\"https://github.com/kuzzleio/sdk-javascript/blob/master/LICENSE\"\u003e\n    \u003cimg alt=\"undefined\" src=\"https://img.shields.io/github/license/kuzzleio/sdk-javascript.svg?style=flat\"\u003e\n  \u003c/a\u003e\n\u003c/p\u003e\n\n## About\n\n### Kuzzle Javascript SDK\n\nThis is the official Javascript SDK for the free and open-source backend Kuzzle. It provides a way to dial with a Kuzzle server from Javascript applications using protocols.\n\n#### Multiprotocols\n\nCurrently, the SDK provides 2 protocols: **Http and WebSocket.**\nWebSocket protocol implement the whole Kuzzle API, while the HTTP protocol does not implement realtime features (rooms and subscriptions).\n\n#### Promises based\n\nAll SDK methods return a promise resolving the result part of Kuzzle API responses. If an error occurs, the promise is rejected with an Error object embedding the error part of the API response.  \nFor example, for the action create of the controller collection (_collection:create_), the property result contains `{ \"acknowledged\": true }` . This is therefore what will be returned by the SDK method if successful.  \nAny error must be caught either at the end of the `Promise` chain, or by using `async/await` and a `try...catch`.\n\n\u003cp align=\"center\"\u003e\n  :books: \u003cb\u003e\u003ca href=\"https://docs.kuzzle.io/sdk-reference/js/7\"\u003eDocumentation\u003c/a\u003e\u003c/b\u003e\n\u003c/p\u003e\n\n### Kuzzle\n\nKuzzle is an open-source backend that includes a scalable server, a multiprotocol API,\nan administration console and a set of plugins that provide advanced functionalities like real-time pub/sub, blazing fast search and geofencing.\n\n- :octocat: **[Github](https://github.com/kuzzleio/kuzzle)**\n- :earth_africa: **[Website](https://kuzzle.io)**\n- :books: **[Documentation](https://docs.kuzzle.io)**\n- :email: **[Discord](http://join.discord.kuzzle.io)**\n\n## Get trained by the creators of Kuzzle :zap:\n\nTrain yourself and your teams to use Kuzzle to maximize its potential and accelerate the development of your projects.  \nOur teams will be able to meet your needs in terms of expertise and multi-technology support for IoT, mobile/web, backend/frontend, devops.  \n:point_right: [Get a quote](https://hubs.ly/H0jkfJ_0)\n\n## Usage\n\n## Compatibility matrix\n\n| Kuzzle Version | SDK Version |\n| -------------- | ----------- |\n| 1.x.x          | 5.x.x       |\n| 1.x.x          | 6.x.x       |\n| 2.x.x          | 7.x.x       |\n\n## Getting started :point_right:\n\n- [Node.js](https://docs.kuzzle.io/sdk/js/7/getting-started/node-js/)\n- [Browser](https://docs.kuzzle.io/sdk/js/7/getting-started/raw-web/)\n- [Webpack](https://docs.kuzzle.io/sdk/js/7/getting-started/webpack/)\n- [React/Redux](https://docs.kuzzle.io/sdk/js/7/getting-started/react/with-redux/)\n- [Vue.js](https://docs.kuzzle.io/sdk/js/7/getting-started/vuejs/standalone/)\n\n### Installation\n\nThis SDK can be used either in NodeJS or in a browser.\n\n#### Node.js\n\n```\nnpm install kuzzle-sdk\n```\n\n#### Browser\n\nTo run the SDK in the browser, you have to build it yourself by cloning this repository and running\n\n```bash\n$ npm install\n$ npm run build\n```\n\nA `dist` directory will be created, containing a browser version of this SDK.\n\n```html\n\u003cscript type=\"text/javascript\" src=\"dist/kuzzle.min.js\"\u003e\u003c/script\u003e\n```\n\nor use the CDN:\n\n```html\n\u003cscript\n  type=\"text/javascript\"\n  src=\"https://cdn.jsdelivr.net/npm/kuzzle-sdk@latest/dist/kuzzle.min.js\"\n\u003e\u003c/script\u003e\n```\n\nThen the Kuzzle SDK will be available under the `KuzzleSDK` variable:\n\n```html\n\u003cscript\u003e\n  const kuzzle = new KuzzleSDK.Kuzzle(new KuzzleSDK.WebSocket(\"localhost\"));\n  // ...\n\u003c/script\u003e\n```\n\n#### Browser with Webpack\n\nIf you use Webpack, you'll likely use the NPM-packaged version of the SDK (like in Node)\n\n```\nnpm install kuzzle-sdk\n```\n\nBut you'll still need to pick the built version (which ships with the package).\n\n```javascript\n// with the classic require...\nconst { Kuzzle } = require(\"kuzzle-sdk\");\n// ... or with the new import directive.\nimport { Kuzzle } from \"kuzzle-sdk\";\n```\n\n### Example\n\nThe SDK supports different protocols. When instantiating,\nyou must choose the protocol to use and fill in the different options needed to connect to Kuzzle.\n\n```js\nconst { Kuzzle, WebSocket } = require(\"kuzzle-sdk\");\nconst kuzzle = new Kuzzle(new WebSocket(\"localhost\", { port: 7512 }));\n\ntry {\n  await kuzzle.connect();\n  const serverTime = await kuzzle.server.now();\n  console.log(serverTime);\n} catch (error) {\n  console.error(error);\n}\n```\n","funding_links":[],"categories":["Javascript"],"sub_categories":["Boilerplates \u0026 Examples"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuzzleio%2Fsdk-javascript","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkuzzleio%2Fsdk-javascript","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkuzzleio%2Fsdk-javascript/lists"}