diff --git a/README.md b/README.md index 4423060..75d2f71 100644 --- a/README.md +++ b/README.md @@ -1,108 +1,48 @@ -
-

Embeddable React Widget

+Embeddable Matrix Chatbox -Easy creation of embeddable widgets - https://seriousben.github.io/embeddable-react-widget +![Demo video of chatbox](https://media.giphy.com/media/Js8Wm7DdbkuFK4MJUC/giphy.gif) -[![CircleCI](https://circleci.com/gh/seriousben/embeddable-react-widget.svg?style=shield)](https://circleci.com/gh/seriousben/embeddable-react-widget) -[![codecov](https://codecov.io/gh/seriousben/embeddable-react-widget/branch/master/graph/badge.svg)](https://codecov.io/gh/seriousben/embeddable-react-widget) -[![Renovate enabled](https://img.shields.io/badge/renovate-enabled-brightgreen.svg)](https://renovatebot.com/) +Built on: +- [Embeddable React Widget](https://github.com/seriousben/embeddable-react-widget) +- [Matrix JS SDK](https://github.com/matrix-org/matrix-js-sdk) -
+## Usage +``` + + +``` +Options: +| Name | Description | Default +| ----------- | ----------- | --------- | +| `matrixServerUrl` (required) | URL for the Matrix homeserver you want to connect to | `https://www.matrix.org` | +| `userToInvite` (required) | Username of the account that should be invited when a new chat is started | `null` | +| `termsUrl` (optional) | URL for the Terms of Use for the chat service | `null` | +| `roomName` (optional) | Name of the chatroom generated in Riot | 'Support Chat' | +| `introText` (optional) | Text to be shown before the Terms of Use url | `null` | +| `agreementText` (optional) | Text to be shown to ask for agreement to continue | `null` | -## Features +## Local development -* Full ES6/ES2015 support (with Babel) -* Package fonts, css, json, javascripts together into one single package (with Webpack) -* No css styling conflicts between the host page and the widget (with https://github.com/premasagar/cleanslate) -* Bookmarklet supported for fast testing and demonstration -* User theming of widget -* Obfuscating of the widget code -* Unit Tested with code coverage enabled -* Continuous Integration ready - -## Demo - - - -## Running the widget - -### Install dependencies - -```sh -$ npm install +Clone the project: +``` +git clone https://github.com/nomadic-labs/ocrcc-chatbox.git +``` +Install the dependencies: +``` +cd ocrcc-chatbox +yarn ``` -### Start the development server - -```sh -$ npm start -... server running at http://localhost:8080/ +Start the development server: +``` +yarn start ``` -### Run tests +Open the demo page at http://localhost:9000/ + +## Production build ``` -$ npm test -... test output +yarn build ``` - -### Production build -``` -$ npm run build -... create files in /dist -``` - -## Roadmap - -- [x] Widget as react app - index.html works (webpack, babel, react) -- [x] React widget (widget builder) -- [x] Webpack changed to output a library -- [x] Add tests -- [x] Add circleci integration -- [x] Add codecov integration for codecoverage -- [x] Production Build -- [x] Minified -- [x] Add greenkeeper -- [x] Bookmarklet -- [x] Reset / Cleanslate / No-conflicts of styles -- [x] Obfuscation -- [ ] Theming support -- [ ] Storyboard and docs -- [ ] Integrate eslint with webpack - -## Background - -### What is an embeddable widget? - -* Usable using a simple `