• Stars
    star
    195
  • Rank 199,374 (Top 4 %)
  • Language
    TypeScript
  • License
    MIT License
  • Created over 3 years ago
  • Updated 2 months 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
240
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
98
star
7

sendbird-uikit-react-native

Build chat in minutes with Sendbird UIKit open source code.
TypeScript
70
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
59
star
10

sendbird-chat-sdk-flutter

Sendbird Chat SDK for Flutter
Dart
52
star
11

sendbird-chat-sample-react

SendBird Chat SDK sample for React.
JavaScript
46
star
12

sb-osc

Sendbird's Online Schema Change Tool for Aurora MySQL
Python
42
star
13

sendbird-uikit-android

Build chat in minutes with Sendbird UIKit open source code and samples.
Java
39
star
14

sendbird-chat-sample-ios

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

SendBird-SDK-Android

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

chat-ai-widget

Build AI Chatbot in minutes with Sendbird Chatbot Widget.
TypeScript
28
star
17

sendbird-chat-sdk-javascript

Sendbird Chat SDK for JavaScript.
JavaScript
25
star
18

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
19

sendbird-chat-sdk-ios

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

sendbird-sample

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

SendBird-iOS-Swift

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

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
23

SendBird-UIKIT-JavaScript

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

sendbird-webrtc-ios

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

sendbird-calls-javascript

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

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
27

sendbird-calls-sdk-react-native-legacy

Sendbird Calls SDK for React-Native
TypeScript
12
star
28

sendbird-calls-android

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

sendbird-platform-sdk-python

Sendbird Platform API SDK for server languages
Python
11
star
30

sendbird-chat-sample-android

Kotlin
11
star
31

sendbird-calls-ios

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

AndroidChatTutorial

Chat tutorial source code
Java
10
star
33

mymessenger_tutorial

Objective-C
10
star
34

sendbird-platform-sdk-typescript

Sendbird Typescript SDK for the server to server API
TypeScript
10
star
35

sendbird-chat-sample-unity

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

sendbird-chat-sdk-android

Sendbird Chat SDK for Android
Shell
9
star
37

sendbird-chat-sdk-dotnet

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

sendbird-platform-sdk-java

Sendbird Platform SDK for Java
Java
8
star
39

sendbird-syncmanager-javascript

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

sendbird-syncmanager-ios

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

sendbird-calls-directcall-quickstart-react-native

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

sendbird-swiftui-ios

https://sendbird.com/docs/chat/uikit/v3/swiftui/overview
Swift
6
star
43

sendbird-chatube

Objective-C
5
star
44

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
45

AndroidChannelListTutorial

Complete Source Code for Channel List Tutorial
Java
5
star
46

sendbird-uikit-nextjs-sample

A sample app the uses Next.js 13 and Sendbird UIKit V3
CSS
5
star
47

sendbird-uikit-sample-react-native-expo

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

sendbird-calls-quickstart-react-native

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

healthcare-ai-chatbot

healthcare-ai-chatbot
Swift
5
star
50

sendbird-platform-sdk-javascript

Sendbird Platform API JavaScript SDK
JavaScript
4
star
51

SyncManager-iOS-Swift

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

guidelines-ios

Sendbird guidelines for iOS development.
4
star
53

examples-calls-android

Kotlin
4
star
54

sendbird-discord-javascript-sample

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

react-native-scrollview-enhancer

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

sendbird-videochat-ios

Objective-C
4
star
57

ecommerce-ai-chatbot

ecommerce-ai-chatbot
Swift
4
star
58

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
4
star
59

sendbird-syncmanager-android

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

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
61

tutorial-react-native

tutorial-react-native
3
star
62

sendbird-react-uikit-vue-sample

Adding UIKit to a Vue 3 application
Vue
3
star
63

python-daemon

Python
3
star
64

sendbird-chat-sample-unreal

C++
3
star
65

quickstart-calls-groupcall-android

Kotlin
3
star
66

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
67

SendBird-Desk-SDK-Android

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

sendbird-uikit-sample-android-jetpack-compose

Build chat in minutes with Sendbird UIKit for Android Jetpack Compose.
Kotlin
3
star
69

SendBird-Desk-SDK-JavaScript

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

sendbird-live-sample-react

TypeScript
2
star
71

sendbird-calls-sdk-unity

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

sendbird-calls-groupcall-quickstart-react-native

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

sendbird-platform-sdk-csharp

Sendbird Platform SDK for C#
C#
2
star
74

sendbird-chat-sdk-unreal

C++
2
star
75

simple_pong_chatbot

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

release-automation-action

Release automation comment bot
TypeScript
2
star
77

sendbird_mymessenger_tutorial

Objective-C
2
star
78

sendbird-webrtc-ios-dev

C++
2
star
79

sendbird-chat-ios-spm

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

quickstart-calls-chat-integration-javascript

Calls integration to Chat for JavaScript Quickstart
JavaScript
2
star
81

react-native-touch-reload

reload helper for react-native
TypeScript
2
star
82

sendbird-videochat-android

2
star
83

sendbird-chatgpt-sample-android

Kotlin
2
star
84

SendBird-iOS-ObjectiveC

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

sendbird-calls-sdk-react-native

Sendbird Calls SDK for React-Native
Kotlin
2
star
86

SendBirdCallKitSampleApp

Swift
2
star
87

sendbird-chat-sdk-windows

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

quickstart-calls-ios

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

sendbird-chat-sample-windows

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

sendbird-live-sample-android

Kotlin
1
star
91

sendbird-videochat-javascript

SendBird VideoChat for JavaScript
1
star
92

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
93

SendBird-Desk-iOS-Framework

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

sendbird-chat-sample-react-native

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

sendbird-chatgpt-sample-ios

GPT Sample in iOS
Swift
1
star
96

sendbird-ai-chatbot-sample-android

Kotlin
1
star
97

LocalCaching-iOS-Swift

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

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