Rocket.Chat/packages/livechat
rocketchat-github-ci 0f9345a316 Release 8.0.0-rc.1
[no ci]
2025-12-23 02:19:11 +00:00
..
.storybook chore: Use swc over babel for storybook's webpack5 compiler (#37696) 2025-12-05 20:42:33 +00:00
src chore!: Remove deprecated livechat transfer method and endpoint (#36871) 2025-12-20 15:44:23 -03:00
.eslintrc.json chore: Reformat package manifest files (#37639) 2025-12-05 09:18:08 -03:00
.gitignore
.stylelintrc.json chore: bump stylelint and remove unused css (#33887) 2024-11-18 13:18:20 -05:00
babel.config.js fix(livechat): Storybook adjustments and TypeScript migration (#29631) 2023-06-27 10:54:02 -03:00
CHANGELOG.md Release 8.0.0-rc.1 2025-12-23 02:19:11 +00:00
LICENSE chore(livechat): Build configuration (#30019) 2023-08-04 17:36:04 -03:00
package.json Release 8.0.0-rc.1 2025-12-23 02:19:11 +00:00
README.md docs: fix lost image render in markdown (#31013) 2023-12-05 23:10:35 -03:00
svg-component-loader.ts refactor: Update Livechat webpack version (#30809) 2023-10-30 21:13:00 +00:00
tsconfig.json chore(livechat,gazzodown): Forcefully trim Livechat bundle size (#37763) 2025-12-11 16:12:45 -03:00
tsconfig.typecheck.json Chore: Improve configurations related to Typescript in Livechat (#27232) 2022-11-10 17:45:06 +00:00
tsconfig.webpack.json chore(livechat): Build configuration (#30019) 2023-08-04 17:36:04 -03:00
webpack.config.ts chore: remove unused dependencies (#37468) 2025-11-11 13:15:21 -03:00
widget-demo.html [NEW] Ability for RC server to check the business hour for a specific department (#25436) 2022-05-23 15:45:42 -03:00

Rocket.Chat.Livechat

Language grade: JavaScript Total alerts Storybook

Currently, it's very common to find chat pop-ups when you're browsing websites.

Those widgets, at Rocket.Chat, are called LiveChat.

LiveChat is a small and lightweight application designed to provide B2C (Business-to-customer) communication between Agents and website visitors and is developed with Preact.

Running a development environment

With your Rocket.chat running locally at http://localhost:3000

  1. Install all node dependencies.
yarn
  1. Build preact application to /build folder
yarn dev
  1. In another terminal, run webpack with hot reload at http://localhost:8080
yarn start
  1. Open this file below in your browser
widget-demo.html

OBS: For a better performance, you can run this widget-demo.html on a http server.

Different host

To select a different host on your local widget, check this configuration at /src/api.js file.

const host = window.SERVER_URL
	|| queryString.parse(window.location.search).serverUrl
	|| (process.env.NODE_ENV === 'development' ? 'http://localhost:3000' : null);

Here, you can change to your new configuration.

const host = window.SERVER_URL
	|| queryString.parse(window.location.search).serverUrl
	|| (process.env.NODE_ENV === 'development' ? 'https://your.rocketserver.com' : null);

Available CLI Commands

# install dependencies
yarn

# serve with hot reload at localhost:8080
yarn start

# build preact application to "build" folder
yarn dev

# build for production with minification
yarn build

# test the production build locally
yarn serve

# run tests with jest and preact-render-spy
yarn test

# run the storybook
yarn storybook

Screens:

image image image image image image image