• Stars
    star
    181
  • Rank 205,337 (Top 5 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created about 3 years ago
  • Updated 18 days ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Build chat in minutes with Sendbird UIKit open source code.

sendbird-uikit

Platform React Language TypeScript

React based UI kit based on sendbird javascript SDK

We are introducing a new version of the Sendbird Chat UIKit. Version 3 features a new modular architecture with more granular components that give you enhanced flexibility to customize your web and mobile apps. Check out our migration guides.

Installation

npm i @sendbird/uikit-react or if you're using yarn yarn add @sendbird/uikit-react

For typescript projects, add node_modules/@sendbird/uikit-react/index.d.ts to your include section in tsconfig file to get type definitions

Getting Started

With Sendbird UI Kit React, we export these components: (See src/index.jsx)

  • SendBirdProvider - The context provider for SDK component

  • useSendbirdStateContext - Hook to access SendBirdProvider context

  • sendBirdSelectors - A bunch of useful selectors that can be used along with useSendbirdStateContext

  • Channel - A UI Component where conversations happen

  • ChannelList - A ChannelList UI component

  • ChannelSettings - A component to handle the settings of a given channel

  • MessageSearch - To search for a message from a Channel

  • OpenChannel - A UI Component where open channel conversations happen

  • OpenChannelSettings - A component to handle the settings of a given channel And many more...

  • App - is a full fledged app(group channel) component made by combining the above components so that you dont have to combine all the above components by hand. Also it can be used as an example for composing components to build a chat UI

Note 1: Dont forget to import the stylesheet from the repo too Note 2: Name of some components are different from the directories they are in(example -> Channel component is from Conversation component). Please keep that in mind

Prerequisites

You need to install:

Caveats

  • We tried development on Mac OS / Linux systems. You might encounter problems in running npm run build or yarn run build in Windows machines
  • If you use node.js >= 17 and see ERR_OSSL_EVP_UNSUPPORTED error on any run cmd, try to set export NODE_OPTIONS=--openssl-legacy-provider in the terminal

Development

We use storybook for development and rollup for building the npm distribution(bundled JS file) Make sure you have nodejs and npm (or yarn) installed and run

Make a copy of .env.example and save it as .env Set your appId STORYBOOK_APP_ID

npm install
npm run storybook

or

yarn install
yarn storybook
  • By default, storybook opens in http://localhost:6006/
  • Smart Components such as ChannelList, Channel, ChannelSetting, App can be found under OTHERS
  • Dumb components such as inputs, buttons etc can be found under OTHERS/UI Components in storybook sidebar
  • Overridden storybook configs can be found in: ./storybook

Husky

We use Husky for githooks

To enable Husky in local, run: yarn husky install or npx husky install

Build

We use rollupJS for building the production bundle script that you want to use inside your applications.

We have both esm and commonjs output

npm run build

or

yarn run build

The bundled JS code can be found in ./release The CSS is in ./release/dist/index.css

Running the tests

We have implemented tests for dumb ui components only. Technologies used: Jest and testing-library

npm run test

or

yarn run test

Lint

npm run lint

or

yarn run lint
  • .eslintrc.json lints ts files and .eslintrc.js lints js files

Typescript

  • We are trying to progressively move our source code to typescript - which means older JS code and newly written TS code will coxist while we migrate older JS code to TS
  • .eslintrc.json lints ts files and .eslintrc.js lints js files
  • Type definition file can be src/index.d.ts which will be copied to /release directory

Webpack 5

Webpack 5 removes stream and buffer componets from default polyfill To enable these, install buffer and stream and then add the following to webpack.cofig.js

module.exports = {
  //...
  resolve: {
    fallback: {
      buffer: require.resolve('buffer'),
      stream: require.resolve('stream-browserify'),
    },
  },
};

To read more: https://webpack.js.org/configuration/resolve/#resolvefallback

Creating/Exporting New Components

  1. Define your component inside ./src.
  2. Add the following line to ./src/index.ts:
    export { default as NewComponent } from './src/location/of/NewComponent';
    
    • Will be imported as: import { NewComponent } from '@sendbird/uikit-react';
    • We don't do this anymore for new components; we prefer fine-grained exports (as in step 3).
  3. Add the following line to ./exports.js:
    NewComponent/SubComponent: 'location/of/NewComponent/SubComponent',
    
    • This component can be imported by the consumer as: import SubComponent from '@sendbird/uikit-react/NewComponent/SubComponent';
  4. Add type definitions to scripts/index_d_ts.

Scaffolding New Components

  1. Use yarn run generate-component to generate a UI component in src/ui. It uses Plop.js to generate the component.
  2. It can also be used to generate reducers.
  3. Plop templates are found in here.

Acknowledgments

LameJS

We use lamejs for converting audio formats It is a fast mp3 encoder written in JavaScript. The original repo is:

More Repositories

1

sendbird-javascript-samples

A guide of the installation and functions of Sendbird Chat, UIKit, and SyncManager for JavaScript samples.
JavaScript
345
star
2

quickstart-calls-reactjs

TypeScript
231
star
3

SendBird-Android

A guide of the installation and functions of Sendbird Chat, and SyncManager for Android samples.
Java
206
star
4

SendBird-iOS

A guide of the installation and functions of Sendbird Chat, UIKit, and SyncManager for iOS in Objective-C samples.
127
star
5

SendBird-SDK-JavaScript

Sendbird Chat SDK for JavaScript for enablement of a rich, engaging, scalable, and real-time chat service.
101
star
6

sendbird-uikit-ios

Sendbird UIKit for iOS is a development kit with a user interface, offering a simplified integration into chat.
Swift
89
star
7

sendbird-uikit-react-native

Build chat in minutes with Sendbird UIKit open source code.
TypeScript
63
star
8

sendbird-ios-framework

[Deprecated] Sendbird Chat SDK for iOS in Objectivce-C for enablement of a rich, engaging, scalable, and real-time chat service.
Objective-C
61
star
9

sendbird-chat-sample-flutter

Dart
58
star
10

sendbird-chat-sdk-flutter

Sendbird Chat SDK for Flutter
Dart
49
star
11

sendbird-chat-sample-react

SendBird Chat SDK sample for React.
JavaScript
41
star
12

sendbird-uikit-android

Build chat in minutes with Sendbird UIKit open source code and samples.
Java
36
star
13

SendBird-SDK-Android

Sendbird Chat SDK for Android for enablement of a rich, engaging, scalable, and real-time chat service.
32
star
14

sendbird-chat-sample-ios

This repository provides feature-level Chat samples with Swift.
Swift
28
star
15

quickstart-calls-directcall-ios

iOS sample for Direct Call of Sendbird Calls, guiding you to build a real-time voice and video calls quickly and easily.
Swift
25
star
16

sendbird-chat-sdk-javascript

Sendbird Chat SDK for JavaScript.
JavaScript
21
star
17

chat-ai-widget

Build AI Chatbot in minutes with Sendbird Chatbot Widget.
TypeScript
21
star
18

sendbird-sample

SendBird - Messaging and Chat API for Mobile Apps and Websites
18
star
19

SendBird-iOS-Swift

A guide of the installation and functions of Sendbird Chat for iOS in Swift sample.
Swift
17
star
20

quickstart-calls-directcall-android

Sendbird Calls for Android sample, guiding you to build a real-time voice and video calls quickly and easily.
Java
15
star
21

sendbird-chat-sdk-ios

Sendbird Chat SDK for iOS for enablement of a rich, engaging, scalable, and real-time chat service.
Shell
15
star
22

SendBird-UIKIT-JavaScript

Sendbird UIKit for JavaScript is a development kit with a user interface, offering a simplified integration into chat.
JavaScript
15
star
23

sendbird-webrtc-ios

This is WebRTC framework for iOS that SendBird builds on top of Google WebRTC
Ruby
13
star
24

sendbird-calls-javascript

A guide of Sendbird Calls SDK for JavaScript for an engaging voice and video call experience.
Shell
13
star
25

quickstart-calls-javascript

Sendbird Calls for JavaScript sample, guiding you to bulid a real-time voice and video calls quickly and easily.
JavaScript
12
star
26

sendbird-calls-sdk-react-native-legacy

Sendbird Calls SDK for React-Native
TypeScript
12
star
27

sendbird-calls-android

A guide of Sendbird Calls SDK for Android for an engaging voice and video call experience.
11
star
28

sendbird-chat-sample-android

Kotlin
11
star
29

sendbird-calls-ios

A guide of Sendbird Calls SDK for iOS for an engaging voice and video call experience.
Objective-C
11
star
30

AndroidChatTutorial

Chat tutorial source code
Java
10
star
31

mymessenger_tutorial

Objective-C
10
star
32

sendbird-platform-sdk-typescript

Sendbird Typescript SDK for the server to server API
TypeScript
9
star
33

sendbird-chat-sample-unity

A guide of the installation and functions of Sendbird Chat for Unity sample.
C#
9
star
34

sendbird-chat-sdk-dotnet

Sendbird Chat SDK for .NET for enablement of a rich, engaging, scalable, and real-time chat service.
9
star
35

sendbird-platform-sdk-python

Sendbird Platform API SDK for server languages
Python
8
star
36

sendbird-chat-sdk-android

Sendbird Chat SDK for Android
Shell
8
star
37

sendbird-syncmanager-javascript

Sendbird SyncManager for JavaScript is an add-on for reliable chat data caching with Chat SDK features.
8
star
38

sendbird-platform-sdk-java

Sendbird Platform SDK for Java
Java
7
star
39

sendbird-syncmanager-ios

Sendbird SyncManager for iOS is an add-on for reliable chat data caching with Chat SDK features.
Objective-C
7
star
40

sendbird-calls-directcall-quickstart-react-native

quickstart-calls-directcall-react-native
TypeScript
6
star
41

sendbird-uikit-sample-react-native-expo

[Sample] uikit-react-native with expo
JavaScript
5
star
42

sendbird-chatube

Objective-C
5
star
43

examples-calls-javascript

This repository provides feature-level Calls samples with JavaScript and lets you know how to implement Sendbird Call's various features.
JavaScript
5
star
44

AndroidChannelListTutorial

Complete Source Code for Channel List Tutorial
Java
5
star
45

sendbird-calls-quickstart-react-native

Download quickstart apps to try the core features for Sendbird Calls SDK.
5
star
46

sendbird-platform-sdk-javascript

Sendbird Platform API JavaScript SDK
JavaScript
4
star
47

SyncManager-iOS-Swift

[Deprecated] Sendbird SyncManager for iOS sample: installation and functions.
Swift
4
star
48

guidelines-ios

Sendbird guidelines for iOS development.
4
star
49

sendbird-uikit-nextjs-sample

A sample app the uses Next.js 13 and Sendbird UIKit V3
CSS
4
star
50

examples-calls-android

Kotlin
4
star
51

react-native-scrollview-enhancer

A utility package enabling onStartReached & maintainVisibleContentPosition in pre-0.72 react-native ScrollView.
TypeScript
4
star
52

sendbird-videochat-ios

Objective-C
4
star
53

sendbird-syncmanager-android

Sendbird SyncManager for Android is an add-on for reliable chat data caching with Chat SDK features.
4
star
54

sendbird-uikit-ios-spm

Sendbird UIKit for iOS is a development kit with a user interface, offering a simplified integration into chat.
Objective-C
3
star
55

tutorial-react-native

tutorial-react-native
3
star
56

sendbird-react-uikit-vue-sample

Adding UIKit to a Vue 3 application
Vue
3
star
57

python-daemon

Python
3
star
58

sendbird-chat-sample-unreal

C++
3
star
59

SendBird-Desk-SDK-Android

Sendbird Desk SDK for Android: customizable live chat customer support system on Sendbird Chat platform.
3
star
60

quickstart-desk-javascript

Sendbird Desk for JavaScript sample for fast and easy implementation of a customizable live chat customer support system on Sendbird Chat platform.
JavaScript
3
star
61

sendbird-discord-javascript-sample

An example of how UIKit can be customized to fit different look and feels
JavaScript
3
star
62

SendBird-Desk-SDK-JavaScript

Sendbird Desk SDK for JavaScript: customizable live chat customer support system on Sendbird Chat platform.
3
star
63

examples-calls-ios

This repository provides feature-level Calls samples with Swift and lets you know how to implement Sendbird Call's various features.
Swift
3
star
64

sendbird-live-sample-react

TypeScript
2
star
65

sendbird-calls-groupcall-quickstart-react-native

quickstart-calls-groupcall-react-native
TypeScript
2
star
66

sendbird-platform-sdk-csharp

Sendbird Platform SDK for C#
C#
2
star
67

simple_pong_chatbot

Describes how to setup a basic chat bot on SendBird, including launching the infrastructure necessary on AWS.
Python
2
star
68

release-automation-action

Release automation comment bot
TypeScript
2
star
69

sendbird_mymessenger_tutorial

Objective-C
2
star
70

sendbird-webrtc-ios-dev

C++
2
star
71

sendbird-chat-ios-spm

[v3] Sendbird Chat SDK for SPM
Shell
2
star
72

quickstart-calls-chat-integration-javascript

Calls integration to Chat for JavaScript Quickstart
JavaScript
2
star
73

quickstart-calls-groupcall-android

Kotlin
2
star
74

react-native-touch-reload

reload helper for react-native
TypeScript
2
star
75

sendbird-calls-sdk-unity

A guide of Sendbird Calls SDK for Unity for an engaging voice and video call experience.
C#
2
star
76

sendbird-videochat-android

2
star
77

sendbird-chatgpt-sample-android

Kotlin
2
star
78

SendBird-iOS-ObjectiveC

[Deprecated] A guide of the installation and functions of Sendbird Chat for iOS sample.
Objective-C
2
star
79

healthcare-ai-chatbot

healthcare-ai-chatbot
Swift
2
star
80

sendbird-chat-sdk-unreal

C++
1
star
81

sendbird-chat-sdk-windows

Sendbird Chat SDK for Windows for enablement of a rich, engaging, scalable, and real-time chat service.
C++
1
star
82

quickstart-calls-ios

Download quickstart apps to try the core features for Sendbird Calls SDK.
1
star
83

sendbird-chat-sample-windows

A guide of the installation and functions of Sendbird Chat for Window sample.
C++
1
star
84

sendbird-live-sample-android

Kotlin
1
star
85

sendbird-videochat-javascript

SendBird VideoChat for JavaScript
1
star
86

sendbird-live-sample-ios

iOS general sample for Sendbird Live, guiding you to build a real-time massive steaming event quickly and easily.
Swift
1
star
87

SendBird-Desk-iOS-Framework

Sendbird Desk SDK for iOS: customizable live chat customer support system on Sendbird Chat platform.
Objective-C
1
star
88

sendbird-chatgpt-sample-ios

GPT Sample in iOS
Swift
1
star
89

sendbird-calls-sdk-react-native

Sendbird Calls SDK for React-Native
Kotlin
1
star
90

sendbird-chat-sample-react-native

Sendbird Chat SDK sample for React-Native.
TypeScript
1
star
91

LocalCaching-iOS-Swift

Sendbird Chat iOS sample app that supports Local Caching
Swift
1
star
92

ecommerce-ai-chatbot

ecommerce-ai-chatbot
Swift
1
star
93

quickstart-desk-android

Sendbird Desk for Android sample for fast and easy implementation of a customizable live chat customer support system on Sendbird Chat platform.
Java
1
star