{"id":23638020,"url":"https://github.com/getstream/stream-chat-js","last_synced_at":"2026-02-19T13:06:01.776Z","repository":{"id":37493442,"uuid":"177270024","full_name":"GetStream/stream-chat-js","owner":"GetStream","description":"JS / Browser Client - Build Chat with GetStream.io","archived":false,"fork":false,"pushed_at":"2025-05-09T08:20:36.000Z","size":6041,"stargazers_count":190,"open_issues_count":41,"forks_count":76,"subscribers_count":40,"default_branch":"master","last_synced_at":"2025-05-09T09:28:57.595Z","etag":null,"topics":["chat","chat-api","chat-sdk","chat-sdk-js"],"latest_commit_sha":null,"homepage":"https://getstream.io/chat/","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GetStream.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2019-03-23T09:32:59.000Z","updated_at":"2025-05-09T08:20:38.000Z","dependencies_parsed_at":"2023-10-03T17:58:44.798Z","dependency_job_id":"f87bbc77-264c-4a6a-919e-bf39c29264fb","html_url":"https://github.com/GetStream/stream-chat-js","commit_stats":{"total_commits":1554,"total_committers":79,"mean_commits":"19.670886075949365","dds":0.8629343629343629,"last_synced_commit":"c477fef26ba7b109e8206ac46c186105ba7462f6"},"previous_names":[],"tags_count":317,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-chat-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-chat-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-chat-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetStream%2Fstream-chat-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GetStream","download_url":"https://codeload.github.com/GetStream/stream-chat-js/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254485065,"owners_count":22078767,"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":["chat","chat-api","chat-sdk","chat-sdk-js"],"created_at":"2024-12-28T07:21:37.231Z","updated_at":"2026-01-12T09:34:46.786Z","avatar_url":"https://github.com/GetStream.png","language":"TypeScript","readme":"# Official JavaScript SDK for [Stream Chat](https://getstream.io/chat/)\n\n[![NPM](https://img.shields.io/npm/v/stream-chat.svg)](https://www.npmjs.com/package/stream-chat)\n\n\u003cp align=\"center\"\u003e\n    \u003cimg src=\"./assets/logo.svg\" width=\"50%\" height=\"50%\"\u003e\n\u003c/p\u003e\n\u003cp align=\"center\"\u003e\n    Official JavaScript API client for Stream Chat, a service for building chat applications.\n    \u003cbr /\u003e\n    \u003ca href=\"https://getstream.io/chat/docs/\"\u003e\u003cstrong\u003eExplore the docs »\u003c/strong\u003e\u003c/a\u003e\n    \u003cbr /\u003e\n    \u003cbr /\u003e\n    \u003ca href=\"https://github.com/GetStream/stream-chat-js/issues\"\u003eReport Bug\u003c/a\u003e\n    ·\n    \u003ca href=\"https://github.com/GetStream/stream-chat-js/issues\"\u003eRequest Feature\u003c/a\u003e\n\u003c/p\u003e\n\n## 📝 About Stream\n\nYou can sign up for a Stream account at our [Get Started](https://getstream.io/chat/get_started/) page.\n\nThis library can be used by both frontend and backend applications. For frontend, we have frameworks that are based on this library such as the [Flutter](https://github.com/GetStream/stream-chat-flutter), [React](https://github.com/GetStream/stream-chat-react) and [Angular](https://github.com/GetStream/stream-chat-angular) SDKs. For more information, check out our [documentation](https://getstream.io/chat/docs/).\n\n## ⚙️ Installation\n\n### NPM\n\n```bash\nnpm install stream-chat\n```\n\n### Yarn\n\n```bash\nyarn add stream-chat\n```\n\n## ✨ Getting Started\n\n```ts\nimport { StreamChat } from 'stream-chat';\n// or if you are using CommonJS\nconst { StreamChat } = require('stream-chat');\n\nconst client = new StreamChat('API_KEY', 'API_SECRET', {\n  disableCache: true, // recommended option for server-side use\n  // ...other options like `baseURL`...\n});\n\n// create a user\nawait client.upsertUser({\n  id: 'vishal-1',\n  name: 'Vishal',\n});\n\n// create a channel\nconst channel = client.channel('messaging', 'test-channel', {\n  created_by_id: 'vishal-1',\n});\nawait channel.create();\n\n// send message\nconst { message } = await channel.sendMessage({ text: 'This is a test message' });\n\n// send reaction\nawait channel.sendReaction(message.id, { type: 'love', user: { id: 'vishal-1' } });\n```\n\nThe `StreamChat` client is set up to allow extension of the base types through use of module augmentation, custom types will carry through to all client returns and provide code-completion to queries (if supported). To extend Stream's entities with custom data you'll have to create a declaration file and make sure it's loaded by TypeScript, [see the list of extendable interfaces](https://github.com/GetStream/stream-chat-js/blob/master/src/custom_types.ts) and the example bellow using two of the most common ones:\n\n```ts\n// stream-custom-data.d.ts\n\nimport 'stream-chat';\n\ndeclare module 'stream-chat' {\n  interface CustomMessageData {\n    custom_property?: number;\n  }\n  interface CustomUserData {\n    profile_picture?: string;\n  }\n}\n\n// index.ts\n\n// property `profile_picture` is code-completed and expects type `string | undefined`\nawait client.partialUpdateUser({\n  id: 'vishal-1',\n  set: { profile_picture: 'https://random.picture/1.jpg' },\n});\n\n// property `custom_property` is code-completed and expects type `number | undefined`\nconst { message } = await channel.sendMessage({\n  text: 'This is another test message',\n  custom_property: 255,\n});\n\nmessage.custom_property; // in the response object as well\n```\n\n\u003e [!WARNING]  \n\u003e Generics mechanism has been removed in version `9.0.0` in favour of the module augmentation, please see [the release guide](https://getstream.io/chat/docs/node/upgrade-stream-chat-to-v9) on how to migrate.\n\n## 🔗 (Optional) Development Setup in Combination With Our SDKs\n\n### Connect to [Stream Chat React Native SDK](https://github.com/GetStream/stream-chat-react-native)\n\nRun in the root of this repository:\n\n```sh\nyarn link\n```\n\nRun in the root of one of the example applications (SampleApp/TypeScriptMessaging) in the `stream-chat-react-native` repository:\n\n```sh\nyarn link stream-chat\nyarn start\n```\n\nOpen `metro.config.js` file and set value for `watchFolders` as:\n\n```js\nconst streamChatRoot = '\u003cPATH TO YOUR PROJECT\u003e/stream-chat-js'\n\nmodule.exports = {\n  // the rest of the metro configuration goes here\n  ...\n  watchFolders: [projectRoot].concat(alternateRoots).concat([streamChatRoot]),\n  resolver: {\n    // the other resolver configurations go here\n    ...\n    extraNodeModules: {\n      // the other extra node modules go here\n      ...\n      'stream-chat': streamChatRoot\n    }\n  }\n};\n```\n\nMake sure to replace `\u003cPATH TO YOUR PROJECT\u003e` with the correct path for the `stream-chat-js` folder as per your directory structure.\n\nRun in the root of this repository:\n\n```sh\nyarn start\n```\n\n## 📚 More Code Examples\n\nRead up more on [Logging](./docs/logging.md) and [User Token](./docs/userToken.md) or visit our [documentation](https://getstream.io/chat/docs/) for more examples.\n\n## ✍️ Contributing\n\nWe welcome code changes that improve this library or fix a problem, please make sure to follow all best practices and add tests if applicable before submitting a Pull Request on Github. We are very happy to merge your code in the official repository. Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first. See our [license file](./LICENSE) for more details.\n\nHead over to [CONTRIBUTING.md](./CONTRIBUTING.md) for some development tips.\n\n## 🧑‍💻 We Are Hiring!\n\nWe've recently closed a [$38 million Series B funding round](https://techcrunch.com/2021/03/04/stream-raises-38m-as-its-chat-and-activity-feed-apis-power-communications-for-1b-users/) and we keep actively growing.\nOur APIs are used by more than a billion end-users, and you'll have a chance to make a huge impact on the product within a team of the strongest engineers all over the world.\n\nCheck out our current openings and apply via [Stream's website](https://getstream.io/team/#jobs).\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetstream%2Fstream-chat-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetstream%2Fstream-chat-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetstream%2Fstream-chat-js/lists"}