Skip to content

Commit

Permalink
Merge pull request #234 from abhinavkrin/improve/README.md
Browse files Browse the repository at this point in the history
update README.md
  • Loading branch information
sidmohanty11 authored Sep 27, 2023
2 parents 71d0d87 + 06ffaa9 commit 1feda05
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 53 deletions.
44 changes: 25 additions & 19 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -64,32 +64,38 @@ Read this [wiki page](https://github.com/RocketChat/EmbeddedChat/wiki/Roots-of-E
| showAvatar | show the user's avatar in the chat component, defaults to false |
| showRoles | show the user's roles in the chat component, defaults to false |
| enableThreads | enable RocketChat's style thread messages, defaults to false |
## Development

## Setting up Authentication

Follow this [documentation](https://docs.rocket.chat/guides/administration/admin-panel/settings/oauth/google-oauth-setup) to receive the `GOOGLE_CLIENT_ID` as well as to setup Google SSO for EmbeddedChat.
### Local Setup
To run the embeddedchat, you will need a *Rocket.Chat* server running (development or production). To setup Rocket.Chat dev environment follow this guide.
[https://github.com/RocketChat/Rocket.Chat#%EF%B8%8F-local-development](https://github.com/RocketChat/Rocket.Chat#%EF%B8%8F-local-development)

## Development
We use yarn workspaces. Install yarn if not already installed.

<h3>Local Setup</h3>
#### Install dependencies

```bash
npm i
cd playground && npm i
npm run dev # at the root folder --> EMBEDDEDCHAT

yarn
```

It will open up a playground react app at `http://localhost:4000`.
Make a `.env` file in the playground directory following the `.env[example]` file.
Thats all, This will install all the dependencies and will then build our auth, api and react package.

<h3>Gitpod Setup</h3>
#### Starting auth dev environment
```bash
cd packages/auth
yarn dev
```

Make a `.env` file in the playground directory following the `.env[example]` file.
#### Starting api dev environment
```bash
cd packages/api
yarn dev
```
Api package depends on auth package. If you make any change to auth package, build the package using `yarn build` in `package/auth` directory. Then, restart the api dev environment.

<a href="https://gitpod.io/#https://github.com/RocketChat/EmbeddedChat">
<img
src="https://img.shields.io/badge/Contribute%20with-Gitpod-908a85?logo=gitpod"
alt="Contribute with Gitpod"
/>
</a>
#### Starting react dev environment
```bash
cd packages/react
yarn storybook
```
React package depends on api package. If you make any change to api package, build the package using `yarn build` in `package/api` directory. Then, restart the react dev environment.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"packages/*"
],
"scripts": {
"postinstall": "cd packages/auth && yarn build && cd ../api && yarn build"
"postinstall": "cd packages/auth && yarn build && cd ../api && yarn build && cd ../react && yarn build"
},
"devDependencies": {
"esbuild": "^0.17.19",
Expand Down
33 changes: 0 additions & 33 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1416,39 +1416,6 @@
dependencies:
"@types/hammerjs" "^2.0.36"

"@embeddedchat/react@./packages/react":
version "1.0.0"
dependencies:
"@embeddedchat/api" "1.0.0"
"@emotion/babel-preset-css-prop" "^11.11.0"
"@rocket.chat/fuselage" "^0.31.23"
"@rocket.chat/fuselage-hooks" "^0.31.23"
"@rocket.chat/fuselage-polyfills" "^0.31.23"
"@rocket.chat/fuselage-toastbar" "^0.31.23"
"@rocket.chat/icons" "^0.31.23"
"@rocket.chat/message-parser" "^0.31.25"
"@rocket.chat/sdk" "^1.0.0-alpha.42"
"@rocket.chat/ui-kit" "^0.31.25"
"@rollup/plugin-json" "^6.0.0"
color "^4.2.3"
date-fns "^2.30.0"
dompurify "^3.0.3"
emoji-picker-react "^4.4.9"
emoji-toolkit "^7.0.1"
gapi-cjs "^1.0.3"
he "^1.2.0"
js-cookie "^3.0.5"
marked "^4.0.17"
normalize.css "^8.0.1"
prop-types "^15.8.1"
react "^17.0.2 || ^18"
react-dom "^17.0.2 || ^18"
react-virtuoso "^4.3.10"
reactjs-popup "^2.0.5"
scheduler "^0.23.0"
stylis "^4.2.0"
zustand "^4.3.8"

"@emotion/babel-plugin-jsx-pragmatic@^0.2.1":
version "0.2.1"
resolved "https://registry.yarnpkg.com/@emotion/babel-plugin-jsx-pragmatic/-/babel-plugin-jsx-pragmatic-0.2.1.tgz#01d3306fde73b60d683f78f3bd9f6b2c919b63b6"
Expand Down

0 comments on commit 1feda05

Please sign in to comment.