{"id":42232123,"url":"https://github.com/nexiles/vue3-rsocket","last_synced_at":"2026-01-27T03:09:15.902Z","repository":{"id":36967496,"uuid":"415822542","full_name":"nexiles/vue3-rsocket","owner":"nexiles","description":"Vue3 library for rsocket-js","archived":false,"fork":false,"pushed_at":"2023-09-04T06:51:16.000Z","size":292,"stargazers_count":8,"open_issues_count":10,"forks_count":2,"subscribers_count":1,"default_branch":"develop","last_synced_at":"2025-06-29T13:44:28.692Z","etag":null,"topics":["communcation","javascript","library","rsocket","vue3","websocket"],"latest_commit_sha":null,"homepage":"","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/nexiles.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-10-11T07:30:41.000Z","updated_at":"2024-06-29T08:02:30.000Z","dependencies_parsed_at":"2023-02-13T18:46:10.578Z","dependency_job_id":null,"html_url":"https://github.com/nexiles/vue3-rsocket","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/nexiles/vue3-rsocket","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexiles%2Fvue3-rsocket","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexiles%2Fvue3-rsocket/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexiles%2Fvue3-rsocket/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexiles%2Fvue3-rsocket/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nexiles","download_url":"https://codeload.github.com/nexiles/vue3-rsocket/tar.gz/refs/heads/develop","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nexiles%2Fvue3-rsocket/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28798662,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-27T01:07:07.743Z","status":"online","status_checked_at":"2026-01-27T02:00:07.755Z","response_time":168,"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":["communcation","javascript","library","rsocket","vue3","websocket"],"created_at":"2026-01-27T03:09:15.138Z","updated_at":"2026-01-27T03:09:15.896Z","avatar_url":"https://github.com/nexiles.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# vue3-rsocket\n\n## What is RSocket?\n\nCheck out the official docs: [RSocket Docs](https://rsocket.io/docs/)\n\n\u003e Most interesting:\n\u003e\u003eNetwork communication is asynchronous. The RSocket protocol embraces\n\u003e\u003ethis and models all communication as multiplexed streams of messages\n\u003e\u003eover a single network connection, and never synchronously blocks while\n\u003e\u003ewaiting for a response\n\nThis library for **vue3** enables to easily connect to an RSocket server and react on incoming messages.\n\nCurrently, only **requestStream** is supported. But this could be easily extended. Feel free to open a PR.\n\n## Motivation\n\nThe goal of this library is to wrap the functionality of [rsocket-js](https://github.com/rsocket/rsocket-js)\nin an easy-to-use plugin for Vue 3.\n\nAn example implementation of RSocket using a SpringCloud Gateway can be found\n[here](https://github.com/nexiles/spring-cloud-gateway-rsocket-websocket).\n\n## Example\n\n:building_construction: Add an example project using this library\n\n## :floppy_disk: Installation\n\n```shell\nyarn add vue3-rsocket\n```\nor\n```shell\nnpm install --save vue3-rsocket\n```\n\n## :gear: Setup\n\nFor all possible configuration values have look at `src/classes/RSocketConfig.ts`.\n\n### [Vue 3]((https://v3.vuejs.org/))\n\n:building_construction: Add setup instructions for vue3 project\n\n### [Quasar](https://quasar.dev/)\n\n#### JWT\n\n```javascript\nimport { boot } from \"quasar/wrappers\";\nimport { Vue3RSocket, BearerAuth, RSocketConfig } from \"vue3-rsocket\";\n\nexport default boot(async ({ app }) =\u003e {\n\n  const rSocketConfig = new RSocketConfig({\n    url: `ws://localhost:8070/server/rsocket`,\n    authFn: async () =\u003e new BearerAuth(token).asAuthentication(),\n    debug: true\n  });\n\n  await app.use(Vue3RSocket, rSocketConfig);\n});\n```\n\n#### Basic auth\n\n```javascript\nimport { boot } from \"quasar/wrappers\";\nimport { Vue3RSocket, UserAuth, RSocketConfig } from \"vue3-rsocket\";\n\nexport default boot(async ({ app }) =\u003e {\n\n  const rSocketConfig = new RSocketConfig({\n    url: `ws://localhost:8070/server/rsocket`,\n    authFn: async () =\u003e new UserAuth(\"username\", \"password\").asAuthentication(),\n    debug: true\n  })\n\n  await app.use(Vue3RSocket, rSocketConfig);\n});\n```\n\n## :envelope: Usage\n\n ```javascript\n\u003cscript\u003e\nimport { onBeforeUnmount, inject } from \"vue\";\nimport { RequestStreamInformation } from \"vue3-rsocket\";\n\nexport default {\n  setup() {\n    const rs = inject(\"vue3-rsocket\");\n\n    rs.requestStream(\"route\", (data) =\u003e console.log(data));\n\n    rs.requestStream(\n      \"routeWithMetadata\",\n      (data) =\u003e console.log(data),\n      new RequestStreamInformation({\n        data: \"Hey\",\n        metaData: { requester: \"Fred Flintstone\" },\n      })\n    );\n\n    // Unsubschribe before component is destroyed.\n    onBeforeUnmount(() =\u003e {\n      rs.cancelRequestStream(\"route\");\n      rs.cancelRequestStream(\"routeWithMetadata\");\n    });\n  },\n};\n\u003c/script\u003e\n```\n\n## Development\n\nWe currently use *Yarn v1* for this project (v1 to not break dependency updated provided by dependabot).\n\nTo build the project hit:\n\n```shell\nyarn \u0026\u0026 yarn build\n```\n\nall generated filed will then be located in `dist/`.\n\n---\n\nTo build when something in `src/` changed, use:\n\n```shell\nyarn dev\n```\n\nand to test it in your desired project hit `yarn link {{absolute-path-to}}/vue3-rsocket`.\n\n## Next up\n\n- [x] Add dependabot\n- [ ] Add Vue setup example\n- [ ] Add full example project with front and backend\n- [ ] Expose more configuration parameters\n- [ ] Implement local subscriptions\n- [ ] Implement more than the *request-stream* interaction model\n\n## Disclaimer\n\nWe are pretty new to *RSocket* and library publishing, so this code or the bundling process might not be optimized,\nsuggestions are welcome. Also, we are pretty new to *TypeScript*, so this code might not be in the best shape possible.\n\n## :handshake: Contributing\n\n**Every contribution is highly appreciated!**\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexiles%2Fvue3-rsocket","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnexiles%2Fvue3-rsocket","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnexiles%2Fvue3-rsocket/lists"}