{"id":15136787,"url":"https://github.com/react-declarative/appwrite-webhook-restreamer","last_synced_at":"2026-02-01T05:32:15.073Z","repository":{"id":247224472,"uuid":"825325266","full_name":"react-declarative/appwrite-webhook-restreamer","owner":"react-declarative","description":"Appwrite Server SDK does not support realtime through WebSocket. Due to the limitations of automatic SDK generator, looks like It would not ever support It. I am solved that problem by using SockJS","archived":false,"fork":false,"pushed_at":"2024-07-07T17:11:59.000Z","size":104,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-08-20T03:42:51.084Z","etag":null,"topics":["appwrite","realtime","restream","sockjs","webhook"],"latest_commit_sha":null,"homepage":"https://github.com/react-declarative/react-declarative","language":"JavaScript","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/react-declarative.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2024-07-07T13:19:00.000Z","updated_at":"2025-05-22T05:32:30.000Z","dependencies_parsed_at":"2024-09-21T11:00:36.944Z","dependency_job_id":null,"html_url":"https://github.com/react-declarative/appwrite-webhook-restreamer","commit_stats":null,"previous_names":["react-declarative/appwrite-webhook-restreamer"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/react-declarative/appwrite-webhook-restreamer","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Fappwrite-webhook-restreamer","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Fappwrite-webhook-restreamer/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Fappwrite-webhook-restreamer/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Fappwrite-webhook-restreamer/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/react-declarative","download_url":"https://codeload.github.com/react-declarative/appwrite-webhook-restreamer/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/react-declarative%2Fappwrite-webhook-restreamer/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28970009,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-01T04:44:20.970Z","status":"ssl_error","status_checked_at":"2026-02-01T04:44:19.994Z","response_time":56,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: 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":["appwrite","realtime","restream","sockjs","webhook"],"created_at":"2024-09-26T06:41:16.605Z","updated_at":"2026-02-01T05:32:15.046Z","avatar_url":"https://github.com/react-declarative.png","language":"JavaScript","readme":"# appwrite-webhook-restreamer\n\n\u003e Appwrite Server SDK does not support realtime through WebSocket. Due to the limitations of automatic SDK generator, [looks like It would not ever support It](https://appwrite.io/threads/1180136902481952838). I am solved that problem by using [SockJS](https://github.com/sockjs/sockjs-client)\n\n## Contribute\n\n\u003e [!IMPORTANT]\n\u003e There is another project named [react-declarative](https://github.com/react-declarative/react-declarative) build especially for AppWrite Realtime development. **⭐Star** and **💻Fork** It on github will be appreciated\n\n# Setup\n\n1. Start this microservice by using the next command\n\n```bash\nnpx -y appwrite-webhook-restreamer\n```\n\n  or\n\n```bash\nnpm install -g appwrite-webhook-restreamer\nappwrite-webhook-restreamer\n```\n\n2. Setup [webhook](https://appwrite.io/docs/advanced/platform/webhooks) in the Appwrite instance settings. Use the next POST URL: `http://127.0.0.1:9999/emit`\n\n![appwrite-webhook-settings](./assets/appwrite-webhook-settings.png)\n\n3. Listen for events by using [any SockJS Client](https://github.com/sypbiz/SockJS.NET) with the next url: `http://127.0.0.1:9999/listen`. The following code might be useful\n\n```tsx\nimport Socket from \"sockjs-client\";\n\nimport { Subject, singleshot } from \"react-declarative\";\n\n...\n\nexport class RealtimeService {\n\n  private readonly _sockjsSubject = new Subject\u003cobject\u003e();\n\n  private _init = singleshot(() =\u003e {\n    new Socket(\"http://127.0.0.1:9999/listen\").onmessage = (msg) =\u003e {\n      const chunk = JSON.parse(msg.data);\n      const data = {\n        payload: chunk.payload,\n        channels: [],\n        events: chunk.events.split(\",\"),\n        timestamp: chusnk.timestamp,\n      };\n      this._sockjsSubject.next(data);\n    };\n  });\n\n  subscribe = \u003cT extends unknown\u003e(\n    channel: string,\n    callback: (payload: RealtimeResponseEvent\u003cT\u003e) =\u003e void,\n  ) =\u003e {\n      this._init();\n      return this._sockjsSubject.subscribe((payload) =\u003e {\n        if (payload.events.some((event: string) =\u003e event.includes(channel))) {\n          callback(payload);\n        }\n      });\n  };\n}\n```\n\n# CLI\n\nThe first command line argument is always a port. The second is the `disallowWs` flag (optional)\n\n```bash\nappwrite-webhook-restream 9999 [--disallowWs]\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-declarative%2Fappwrite-webhook-restreamer","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freact-declarative%2Fappwrite-webhook-restreamer","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freact-declarative%2Fappwrite-webhook-restreamer/lists"}