The communications platform that puts data protection first.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
Rocket.Chat/packages/livechat
rocketchat-github-ci 096e991d25 Release 7.7.0-rc.1 7 months ago
..
.storybook chore: minor deps (#33795) 1 year ago
src fix: Calling registerGuest multiple times causes loss of communication (#35555) 10 months ago
.eslintignore Chore: Livechat convert emoji to ts (#27425) 3 years ago
.eslintrc.json chore: refactor parts of `livechat` to TS (#29882) 2 years ago
.gitignore Chore: Add Livechat repo into Monorepo packages (#25312) 4 years ago
.stylelintrc.json chore: bump stylelint and remove unused css (#33887) 1 year ago
CHANGELOG.md Release 7.7.0-rc.1 7 months ago
LICENSE chore(livechat): Build configuration (#30019) 2 years ago
README.md docs: fix lost image render in markdown (#31013) 2 years ago
babel.config.js fix(livechat): Storybook adjustments and TypeScript migration (#29631) 3 years ago
package.json Release 7.7.0-rc.1 7 months ago
svg-component-loader.ts refactor: Update Livechat webpack version (#30809) 2 years ago
tsconfig.json refactor: Invalid values as React nodes (#34901) 12 months ago
tsconfig.typecheck.json Chore: Improve configurations related to Typescript in Livechat (#27232) 3 years ago
tsconfig.webpack.json chore(livechat): Build configuration (#30019) 2 years ago
webpack.config.ts chore: Upgrade React (#32288) 11 months ago
widget-demo.html [NEW] Ability for RC server to check the business hour for a specific department (#25436) 4 years ago

README.md

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