- Notifications
You must be signed in to change notification settings - Fork320
An easy to use full-stack component (ReactJS) embedding Rocket.Chat into your webapp
RocketChat/EmbeddedChat
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
An easy-to-use, full-stack component (React.js + backend behaviors) for embedding Rocket.Chat into your web app.
EmbeddedChat is a full-stack React component designed to integrate Rocket.Chat into your web app. It is fully configurable, extensible, and flexible, offering various preconfigured designs, multiple login options, and more. The component is tightly integrated with the Rocket.Chat server using the Rocket.Chat SDK, and its entire UI is built using custom components.
Explore our project in action! It's live for a sneak peek and testing at:https://rocketchat.github.io/EmbeddedChat/
Test credentials:
- Username: test_acc
- Password: test_acc
Installation and usage documentation could be found hereEmbeddedChat installation and usage
To develop and testEmbeddedChat, you need a local instance of the Rocket.Chat server. Follow the guide in theRocket.Chat Developer Docs for setting up a Rocket.Chat development environment.
Ensure that the "Enable CORS" option is turned on in your Rocket.Chat server. You can find it under Administration > Settings > General > REST API > Enable CORS. This setting must be enabled to access the app's functionality.
Node.js: Version 16.19.0 is required. UseNode Version Manager (NVM) for easy switching between Node.js versions.
To install and use the correct Node.js version, execute the following commands with the specific version number:
nvm install<version>nvm use<version>
Replace
<version>with the required Node.js versionYarn Workspaces: Ensure Yarn workspaces are enabled. If not, run:
corepackenable
Install all necessary dependencies by navigating to the root directory ofEmbeddedChat and running:
yarn
After installing dependencies, build the packages (auth,api, andreact) by running the following command in the root directory:
yarn build
Navigate to thereact package directory and start Storybook with the following commands:
cd packages/reactyarn storybookStorybook should now be operational. Experiment withEmbeddedChat and its components, observing real-time changes in Storybook.
By default, Storybook connects tohttp://localhost:3000. To use a different Rocket Chat server:
Create a.env file in thepackages/react directory.
Set theSTORYBOOK_RC_HOST variable:
STORYBOOK_RC_HOST=<your-custom-url>
Alternatively, run this command in thepackages/react directory:
STORYBOOK_RC_HOST=<your-custom-url> yarn storybook
The project uses a monorepo structure with three key packages:react,auth, andapi. Each package fulfills a vital role in the application:
Thereact package serves as the main frontend component, having all UI elements and views. It interfaces with theauth andapi packages to manage interactions with the Rocket.Chat server, including API calls and authentication.
To develop and test changes in thereact package:
- Navigate to the directory of the
reactpackage:
cd packages/react- Start Storybook to view live changes:
yarn storybook
To develop and test changes in theauth package:
Navigate to the
authpackage directory:cd packages/authStart the development server:
yarn dev
For development in theapi package:
Navigate to the
apipackage directory:cd packages/apiStart the development server:
yarn dev
Development Workflow Notes:
The
reactpackage relies on theapipackage. After making changes to theapi, rebuild it usingyarn buildinpackages/api, and then restart the React project.Similarly, the
apipackage depends on theauthpackage. After making changes toauth, rebuild it usingyarn buildinpackages/auth, and then restart theapidevelopment environment.
This structured approach facilitates cohesive development and integration across all components of the application.
This environment offers a complete setup for developing and testing theEmbeddedChat component, alongside itsapi andauth packages. Feel free to explore and enhance the capabilities ofEmbeddedChat!
Documentation Overview: For a comprehensive overview of Embedded Chat, including installation, usage, and advanced topics, visit ourDocumentation Page.
Below are specific sections that cover various aspects of Embedded Chat:
Embedded Chat Development:EC Development – Explore development techniques for Embedded Chat.
Embedded Chat Setup:Setup Instructions – Start setting up Embedded Chat in your app.
UI Elements:Setup & Dev Guide – Integration and customization of UI elements.
Layout Editor:Using the Editor – Customize the chat interface with the layout editor.
EmbeddedChat RC Setup:Setup Instructions – Guide for setting up Embedded Chat RC App.
Authentication:Guide – Configure and manage authentication for Embedded Chat.
Theming Guide:Guide – Guide to theming options and customization.
Theming Technical:Technical Overview – Technical aspects of theming.
About
An easy to use full-stack component (ReactJS) embedding Rocket.Chat into your webapp
Topics
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Packages0
Uh oh!
There was an error while loading.Please reload this page.

